Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Xcode 12.5 compatibility #175

Merged
merged 1 commit into from
Apr 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "Quick/Nimble" ~> 8.0.7
github "Quick/Nimble" ~> 9.0.1
4 changes: 2 additions & 2 deletions Cartfile.private
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github "Quick/Quick" ~> 2.0
github "jspahrsummers/xcconfigs" == 1.0
github "Quick/Quick" ~> 3.1.2
github "jspahrsummers/xcconfigs" ~> 1.1
6 changes: 3 additions & 3 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
github "Quick/Nimble" "v8.0.7"
github "Quick/Quick" "v2.2.0"
github "jspahrsummers/xcconfigs" "1.0"
github "Quick/Nimble" "v9.0.1"
github "Quick/Quick" "v3.1.2"
github "jspahrsummers/xcconfigs" "1.1"
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ STRIP_INSTALLED_PRODUCT = NO
// The optimization level (-Onone, -O, -Osize) for the produced Swift binary
SWIFT_OPTIMIZATION_LEVEL = -Onone

// Disable Developer ID timestamping
OTHER_CODE_SIGN_FLAGS = --timestamp=none
// Use a faster hashing algorithm for signing and disable Developer ID timestamping
OTHER_CODE_SIGN_FLAGS = --digest-algorithm=sha1 --timestamp=none
7 changes: 7 additions & 0 deletions Carthage/Checkouts/xcconfigs/Base/Targets/Framework.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ INSTALL_PATH = @rpath
LD_DYLIB_INSTALL_NAME = @rpath/$(PRODUCT_NAME).$(WRAPPER_EXTENSION)/$(PRODUCT_NAME)
SKIP_INSTALL = YES

// Make SwiftUI previews work in frameworks that depend on other non-system
// frameworks. The Xcode agent that renders SwiftUI previews seems to copy all
// required frameworks from the built product into a single temp directory.
// This allows the rendering agent to find the frameworks there.
// Source: https://github.com/NSHipster/articles/issues/673
LD_RUNPATH_SEARCH_PATHS = $(inherited) @loader_path/..

// Disallows use of APIs that are not available
// to app extensions and linking to frameworks
// that have not been built with this setting enabled.
Expand Down
2 changes: 1 addition & 1 deletion Carthage/Checkouts/xcconfigs/macOS/macOS-Base.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ COMBINE_HIDPI_IMAGES = YES
SDKROOT = macosx

// Supported build architectures
VALID_ARCHS = x86_64
VALID_ARCHS = arm64 arm64e i386 x86_64
8 changes: 8 additions & 0 deletions Mobius.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1659,6 +1659,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 69C12F79222F225500DC4F9E /* iOS-StaticLibrary.xcconfig */;
buildSettings = {
ENABLE_TESTING_SEARCH_PATHS = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PLATFORM_DIR)/Developer/Library/Frameworks",
Expand All @@ -1671,6 +1672,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 69C12F79222F225500DC4F9E /* iOS-StaticLibrary.xcconfig */;
buildSettings = {
ENABLE_TESTING_SEARCH_PATHS = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PLATFORM_DIR)/Developer/Library/Frameworks",
Expand Down Expand Up @@ -1794,6 +1796,7 @@
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_BITCODE = NO;
ENABLE_TESTING_SEARCH_PATHS = YES;
INFOPLIST_FILE = "$(SRCROOT)/MobiusNimble/BuildSystem/MobiusNimble-Info.plist";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -1818,6 +1821,7 @@
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_BITCODE = NO;
ENABLE_TESTING_SEARCH_PATHS = YES;
INFOPLIST_FILE = "$(SRCROOT)/MobiusNimble/BuildSystem/MobiusNimble-Info.plist";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand Down Expand Up @@ -1863,6 +1867,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 69C12F79222F225500DC4F9E /* iOS-StaticLibrary.xcconfig */;
buildSettings = {
ENABLE_TESTING_SEARCH_PATHS = YES;
PRODUCT_NAME = MobiusNimble;
};
name = Debug;
Expand All @@ -1871,6 +1876,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 69C12F79222F225500DC4F9E /* iOS-StaticLibrary.xcconfig */;
buildSettings = {
ENABLE_TESTING_SEARCH_PATHS = YES;
PRODUCT_NAME = MobiusNimble;
};
name = Release;
Expand All @@ -1886,6 +1892,7 @@
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_BITCODE = NO;
ENABLE_TESTING_SEARCH_PATHS = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PLATFORM_DIR)/Developer/Library/Frameworks",
Expand Down Expand Up @@ -1914,6 +1921,7 @@
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_BITCODE = NO;
ENABLE_TESTING_SEARCH_PATHS = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PLATFORM_DIR)/Developer/Library/Frameworks",
Expand Down
2 changes: 1 addition & 1 deletion MobiusNimble.podspec.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"0.4.0"
],
"Nimble": [
"~> 8.0.7"
"~> 9.0.1"
]
}
}
6 changes: 3 additions & 3 deletions MobiusNimble/Source/NimbleFirstMatchers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public func haveModel<Model: Equatable, Effect>(_ expected: Model) -> Nimble.Pre
let actualDescription = String(describing: first.model)
return PredicateResult(
bool: first.model == expected,
message: .expectedCustomValueTo("be <\(expectedDescription)>", "<\(actualDescription)>")
message: .expectedCustomValueTo("be <\(expectedDescription)>", actual: "<\(actualDescription)>")
)
})
}
Expand All @@ -70,7 +70,7 @@ public func haveNoEffects<Model, Effect>() -> Nimble.Predicate<First<Model, Effe
let actualDescription = String(describing: first.effects)
return PredicateResult(
bool: first.effects.isEmpty,
message: .expectedCustomValueTo("have no effect", "<\(actualDescription)>")
message: .expectedCustomValueTo("have no effect", actual: "<\(actualDescription)>")
)
})
}
Expand All @@ -92,7 +92,7 @@ public func haveEffects<Model, Effect: Equatable>(_ effects: [Effect]) -> Nimble
bool: effects.allSatisfy(first.effects.contains),
message: .expectedCustomValueTo(
"contain <\(expectedDescription)>",
"<\(actualDescription)> (order doesn't matter)"
actual: "<\(actualDescription)> (order doesn't matter)"
)
)
})
Expand Down
6 changes: 3 additions & 3 deletions MobiusNimble/Source/NimbleNextMatchers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public func haveNoModel<Model, Effect>() -> Nimble.Predicate<Next<Model, Effect>
}
return Nimble.PredicateResult(
bool: next.model == nil,
message: .expectedCustomValueTo("have no model", "<\(actualDescription)>")
message: .expectedCustomValueTo("have no model", actual: "<\(actualDescription)>")
)
})
}
Expand Down Expand Up @@ -89,7 +89,7 @@ public func haveModel<Model: Equatable, Effect>(_ expected: Model) -> Nimble.Pre
let actualDescription = String(describing: nextModel)
return Nimble.PredicateResult(
bool: nextModel == expected,
message: .expectedCustomValueTo("be <\(expectedDescription)>", "<\(actualDescription)>")
message: .expectedCustomValueTo("be <\(expectedDescription)>", actual: "<\(actualDescription)>")
)
})
}
Expand Down Expand Up @@ -122,7 +122,7 @@ public func haveEffects<Model, Effect: Equatable>(_ expected: [Effect]) -> Nimbl
bool: expected.allSatisfy(next.effects.contains),
message: .expectedCustomValueTo(
"contain <\(expectedDescription)>",
"<\(actualDescription)> (order doesn't matter)"
actual: "<\(actualDescription)> (order doesn't matter)"
)
)
})
Expand Down
26 changes: 22 additions & 4 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -1,22 +1,40 @@
{
"object": {
"pins": [
{
"package": "CwlCatchException",
"repositoryURL": "https://github.com/mattgallagher/CwlCatchException.git",
"state": {
"branch": null,
"revision": "f809deb30dc5c9d9b78c872e553261a61177721a",
"version": "2.0.0"
}
},
{
"package": "CwlPreconditionTesting",
"repositoryURL": "https://github.com/mattgallagher/CwlPreconditionTesting.git",
"state": {
"branch": null,
"revision": "02b7a39a99c4da27abe03cab2053a9034379639f",
"version": "2.0.0"
}
},
{
"package": "Nimble",
"repositoryURL": "https://github.com/Quick/Nimble",
"state": {
"branch": null,
"revision": "7fd118ec8795888bcbbebc1a41f6984454c4cd6f",
"version": "8.0.7"
"revision": "7a54aaf19a8ef16f67787c260fda81ead7ba4d67",
"version": "9.0.1"
}
},
{
"package": "Quick",
"repositoryURL": "https://github.com/Quick/Quick",
"state": {
"branch": null,
"revision": "33682c2f6230c60614861dfc61df267e11a1602f",
"version": "2.2.0"
"revision": "8cce6acd38f965f5baa3167b939f86500314022b",
"version": "3.1.2"
}
}
]
Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ let package = Package(
.library(name: "MobiusTest", targets: ["MobiusTest"]),
],
dependencies: [
.package(url: "https://github.com/Quick/Nimble", from: "8.0.7"),
.package(url: "https://github.com/Quick/Quick", from: "2.2.0"),
.package(url: "https://github.com/Quick/Nimble", from: "9.0.1"),
.package(url: "https://github.com/Quick/Quick", from: "3.1.2"),
],
targets: [
.target(name: "MobiusCore", path: "MobiusCore/Source"),
Expand Down
2 changes: 1 addition & 1 deletion Tools/BuildSystemTests/MobiusCarthageTest/Cartfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github "spotify/Mobius.swift" "master"
github "Quick/Nimble" ~> 8.0.7
github "Quick/Nimble" ~> 9.0.1
2 changes: 1 addition & 1 deletion Tools/BuildSystemTests/MobiusCocoaPodsTest/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ target 'MobiusCocoaPodsTest' do
pod 'MobiusExtras', :path => '../../../'
pod 'MobiusNimble', :path => '../../../'
pod 'MobiusTest', :path => '../../../'
pod 'Nimble', '~> 8.0.7'
pod 'Nimble', '~> 9.0.1'
end
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@
repositoryURL = "https://github.com/Quick/Nimble";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 8.0.7;
minimumVersion = 9.0.1;
};
};
2D35A2CD241F8FE400C344AC /* XCRemoteSwiftPackageReference "Mobius.swift" */ = {
Expand All @@ -559,7 +559,7 @@
repositoryURL = "https://github.com/Quick/Nimble";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 8.0.7;
minimumVersion = 9.0.1;
};
};
2D35A2E2241F910200C344AC /* XCRemoteSwiftPackageReference "Mobius.swift" */ = {
Expand All @@ -575,7 +575,7 @@
repositoryURL = "https://github.com/Quick/Nimble";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 8.0.7;
minimumVersion = 9.0.1;
};
};
2D35A2F7241F911700C344AC /* XCRemoteSwiftPackageReference "Mobius.swift" */ = {
Expand Down
7 changes: 0 additions & 7 deletions Tools/helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,6 @@ do_carthage_bootstrap() {
mkdir -p build
carthage checkout

# h4x: patch nimble to legacy build system to work around issue
# https://github.com/Quick/Nimble/issues/702
if [[ "$IS_CI" == "1" ]]; then
patch_to_legacy_build_system "Carthage/Checkouts/Nimble/Nimble.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings"
patch_to_legacy_build_system "Carthage/Checkouts/Quick/Quick.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings"
fi

carthage build --platform iOS \
--cache-builds --no-use-binaries \
--log-path build/carthage.log \
Expand Down