Skip to content

Commit

Permalink
Merge pull request #258 from BoltsFramework/nlutsenko.toolchain
Browse files Browse the repository at this point in the history
Update all configurations to latest and improve naming of targets.
  • Loading branch information
nlutsenko committed Jul 6, 2016
2 parents 3eb2c00 + bba2282 commit ab81902
Show file tree
Hide file tree
Showing 23 changed files with 270 additions and 420 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ cache:
env:
matrix:
- TEST_TYPE=iOS
- TEST_TYPE=OSX
- TEST_TYPE=macOS
- TEST_TYPE=tvOS
- TEST_TYPE=CocoaPods
- TEST_TYPE=Carthage
Expand All @@ -32,7 +32,7 @@ script:
xcodebuild test -project Bolts.xcodeproj -sdk iphonesimulator -scheme Bolts-iOS -configuration Debug -destination "platform=iOS Simulator,name=iPhone 4s" -destination "platform=iOS Simulator,name=iPhone 6 Plus" GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES | xcpretty -c
elif [ "$TEST_TYPE" = OSX ]; then
set -o pipefail
xcodebuild test -project Bolts.xcodeproj -sdk macosx -scheme Bolts-OSX -configuration Debug GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES | xcpretty -c
xcodebuild test -project Bolts.xcodeproj -sdk macosx -scheme Bolts-macOS -configuration Debug GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES | xcpretty -c
elif [ "$TEST_TYPE" = tvOS ]; then
set -o pipefail
xcodebuild test -project Bolts.xcodeproj -sdk appletvsimulator -scheme Bolts-tvOS -destination "platform=tvOS Simulator,name=Apple TV 1080p" -configuration Debug GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES | xcpretty -c
Expand Down
204 changes: 100 additions & 104 deletions Bolts.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,7 @@
BuildableIdentifier = "primary"
BlueprintIdentifier = "8EDDA62817E17DDC00655F8A"
BuildableName = "Bolts.framework"
BlueprintName = "Bolts-OSX"
ReferencedContainer = "container:Bolts.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "NO"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8E8C8F1817F241DA00E3F1C7"
BuildableName = "BoltsTests-OSX.xctest"
BlueprintName = "BoltsTests-OSX"
BlueprintName = "Bolts-macOS"
ReferencedContainer = "container:Bolts.xcodeproj">
</BuildableReference>
</BuildActionEntry>
Expand All @@ -40,16 +26,15 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
codeCoverageEnabled = "YES">
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8E8C8F1817F241DA00E3F1C7"
BuildableName = "BoltsTests-OSX.xctest"
BlueprintName = "BoltsTests-OSX"
BlueprintName = "BoltsTests-macOS"
ReferencedContainer = "container:Bolts.xcodeproj">
</BuildableReference>
</TestableReference>
Expand All @@ -59,7 +44,7 @@
BuildableIdentifier = "primary"
BlueprintIdentifier = "8EDDA62817E17DDC00655F8A"
BuildableName = "Bolts.framework"
BlueprintName = "Bolts-OSX"
BlueprintName = "Bolts-macOS"
ReferencedContainer = "container:Bolts.xcodeproj">
</BuildableReference>
</MacroExpansion>
Expand All @@ -81,7 +66,7 @@
BuildableIdentifier = "primary"
BlueprintIdentifier = "8EDDA62817E17DDC00655F8A"
BuildableName = "Bolts.framework"
BlueprintName = "Bolts-OSX"
BlueprintName = "Bolts-macOS"
ReferencedContainer = "container:Bolts.xcodeproj">
</BuildableReference>
</MacroExpansion>
Expand All @@ -99,7 +84,7 @@
BuildableIdentifier = "primary"
BlueprintIdentifier = "8EDDA62817E17DDC00655F8A"
BuildableName = "Bolts.framework"
BlueprintName = "Bolts-OSX"
BlueprintName = "Bolts-macOS"
ReferencedContainer = "container:Bolts.xcodeproj">
</BuildableReference>
</MacroExpansion>
Expand Down
2 changes: 1 addition & 1 deletion Bolts/Common/BFTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ __attribute__((deprecated("`BFTask` exception handling is deprecated and will be
/*!
A block that can act as a continuation for a task.
*/
typedef __nullable id(^BFContinuationBlock)(BFTask<ResultType> *task);
typedef __nullable id(^BFContinuationBlock)(BFTask<ResultType> *t);

/*!
Creates a task that is already completed with the given result.
Expand Down
26 changes: 13 additions & 13 deletions Bolts/Common/BFTask.m
Original file line number Diff line number Diff line change
Expand Up @@ -127,19 +127,19 @@ + (instancetype)taskForCompletionOfAllTasks:(nullable NSArray<BFTask *> *)tasks

BFTaskCompletionSource *tcs = [BFTaskCompletionSource taskCompletionSource];
for (BFTask *task in tasks) {
[task continueWithBlock:^id(BFTask *task) {
[task continueWithBlock:^id(BFTask *t) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
if (task.exception) {
if (t.exception) {
@synchronized (lock) {
[exceptions addObject:task.exception];
[exceptions addObject:t.exception];
#pragma clang diagnostic pop
}
} else if (task.error) {
} else if (t.error) {
@synchronized (lock) {
[errors addObject:task.error];
[errors addObject:t.error];
}
} else if (task.cancelled) {
} else if (t.cancelled) {
OSAtomicIncrement32Barrier(&cancelled);
}

Expand Down Expand Up @@ -199,23 +199,23 @@ + (instancetype)taskForCompletionOfAnyTask:(nullable NSArray<BFTask *> *)tasks

BFTaskCompletionSource *source = [BFTaskCompletionSource taskCompletionSource];
for (BFTask *task in tasks) {
[task continueWithBlock:^id(BFTask *task) {
[task continueWithBlock:^id(BFTask *t) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
if (task.exception != nil) {
if (t.exception != nil) {
@synchronized(lock) {
[exceptions addObject:task.exception];
[exceptions addObject:t.exception];
#pragma clang diagnostic pop
}
} else if (task.error != nil) {
} else if (t.error != nil) {
@synchronized(lock) {
[errors addObject:task.error];
[errors addObject:t.error];
}
} else if (task.cancelled) {
} else if (t.cancelled) {
OSAtomicIncrement32Barrier(&cancelled);
} else {
if(OSAtomicCompareAndSwap32Barrier(0, 1, &completed)) {
[source setResult:task.result];
[source setResult:t.result];
}
}

Expand Down
File renamed without changes.
29 changes: 0 additions & 29 deletions Bolts/Resources/iOS-Info.plist

This file was deleted.

26 changes: 0 additions & 26 deletions Bolts/Resources/tvOS-Info.plist

This file was deleted.

26 changes: 0 additions & 26 deletions Bolts/Resources/watchOS-Info.plist

This file was deleted.

8 changes: 4 additions & 4 deletions Bolts/iOS/BFURL.m
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ - (instancetype)initWithURL:(NSURL *)url forOpenInboundURL:(BOOL)forOpenURLEvent
NSString *refererAppName = refererAppLink[BFAppLinkRefererAppName];

if (refererURLString && refererAppName) {
BFAppLinkTarget *target = [BFAppLinkTarget appLinkTargetWithURL:[NSURL URLWithString:refererURLString]
appStoreId:nil
appName:refererAppName];
BFAppLinkTarget *appLinkTarget = [BFAppLinkTarget appLinkTargetWithURL:[NSURL URLWithString:refererURLString]
appStoreId:nil
appName:refererAppName];
_appLinkReferer = [BFAppLink appLinkWithSourceURL:[NSURL URLWithString:refererURLString]
targets:@[ target ]
targets:@[ appLinkTarget ]
webURL:nil
isBackToReferrer:YES];
}
Expand Down
6 changes: 3 additions & 3 deletions BoltsTests/ExecutorTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ - (void)testExecuteImmediately {

XCTestExpectation *expectation = [self expectationWithDescription:@"test immediate executor"];
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
task = [task continueWithExecutor:[BFExecutor immediateExecutor] withBlock:^id(BFTask *task) {
task = [task continueWithExecutor:[BFExecutor immediateExecutor] withBlock:^id(BFTask *_) {
return nil;
}];
XCTAssertTrue(task.completed);
Expand All @@ -37,7 +37,7 @@ - (void)testExecuteOnDispatchQueue {
BFExecutor *queueExecutor = [BFExecutor executorWithDispatchQueue:queue];

BFTask *task = [BFTask taskWithResult:nil];
task = [task continueWithExecutor:queueExecutor withBlock:^id(BFTask *task) {
task = [task continueWithExecutor:queueExecutor withBlock:^id(BFTask *_) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
XCTAssertEqual(queue, dispatch_get_current_queue());
Expand All @@ -52,7 +52,7 @@ - (void)testExecuteOnOperationQueue {
BFExecutor *queueExecutor = [BFExecutor executorWithOperationQueue:queue];

BFTask *task = [BFTask taskWithResult:nil];
task = [task continueWithExecutor:queueExecutor withBlock:^id(BFTask *task) {
task = [task continueWithExecutor:queueExecutor withBlock:^id(BFTask *_) {
XCTAssertEqual(queue, [NSOperationQueue currentQueue]);
return nil;
}];
Expand Down

0 comments on commit ab81902

Please sign in to comment.