Hi @marekfort apologies for the delay!
As we mentioned offline, the command I used in the Tuist directory that works is:
hyperfine --prepare 'rm -rf ~/.swiftpm .build && swift package purge-cache' --warmup 1 'tuist install'
Results - without Registry
Time (mean ± σ): 76.274 s ± 7.563 s [User: 39.720 s, System: 20.860 s]
Range (min … max): 67.811 s … 90.747 s 10 runs
Results - with Registry
Time (mean ± σ): 101.805 s ± 9.781 s [User: 30.174 s, System: 17.020 s]
Range (min … max): 89.292 s … 123.899 s 10 runs
How do these numbers look?
Configuring the Registry
I configured the registry in our org as per the docs which worked great. Then I updated our Tuist object with --replace-scm-with-registry
set but tuist install would fail with the following output:
The 'swift' command exited with error code 1 and message:
warning: 'newrelic-ios-agent-spm': /Users/kelvinharron/IdeaProjects/ehr-ios/Tuist/.build/checkouts/newrelic-ios-agent-spm/Package.swift:9:15: warning: 'v9' is deprecated: iOS 12.0 is the oldest supported version
7 | name: "NewRelic",
8 | platforms: [
9 | .iOS(.v9), .macOS(.v10_14), .tvOS(.v9), .watchOS(.v10)
| `- warning: 'v9' is deprecated: iOS 12.0 is the oldest supported version
10 | ],
11 | products: [
/Users/kelvinharron/IdeaProjects/ehr-ios/Tuist/.build/checkouts/newrelic-ios-agent-spm/Package.swift:9:44: warning: 'v9' is deprecated: tvOS 12.0 is the oldest supported version
7 | name: "NewRelic",
8 | platforms: [
9 | .iOS(.v9), .macOS(.v10_14), .tvOS(.v9), .watchOS(.v10)
| `- warning: 'v9' is deprecated: tvOS 12.0 is the oldest supported version
10 | ],
11 | products: [
error: 'Quick.Quick': unknown dependency 'Nimble' in target 'QuickTests'; valid dependencies are: 'Quick.Nimble', 'apple.swift-argument-parser', 'apple.swift-algorithms', 'Quick.swift-fakes'
error: 'Quick.Quick': unknown dependency 'Nimble' in target 'QuickLintTests'; valid dependencies are: 'Quick.Nimble', 'apple.swift-argument-parser', 'apple.swift-algorithms', 'Quick.swift-fakes'
error: 'Quick.Quick': unknown dependency 'Nimble' in target 'QuickTests'; valid dependencies are: 'Quick.Nimble', 'apple.swift-argument-parser', 'apple.swift-algorithms', 'Quick.swift-fakes'
error: 'Quick.Quick': unknown dependency 'Nimble' in target 'QuickLintTests'; valid dependencies are: 'Quick.Nimble', 'apple.swift-argument-parser', 'apple.swift-algorithms', 'Quick.swift-fakes'
Consider creating an issue using the following link: https://github.com/tuist/tuist/issues/new/choose
I removed that replace text command and moved all the dependencies from urls to ids, with the following dependencies:
.package(url: "https://github.com/realm/realm-swift", exact: "20.00.0"),
.package(url: "https://github.com/hmlongco/Factory", exact: "2.3.2"),
.package(url: "https://github.com/1024jp/GzipSwift", exact: "6.0.1"),
.package(url: "https://github.com/evgenyneu/keychain-swift", exact: "24.0.0"),
.package(url: "https://github.com/siteline/swiftui-introspect", exact: "1.2.0"),
.package(url: "https://github.com/apple/swift-algorithms", exact: "1.2.0"),
.package(url: "https://github.com/apple/swift-collections", exact: "1.1.1"),
.package(url: "https://github.com/Quick/Quick", exact: "7.6.0"),
.package(url: "https://github.com/Quick/Nimble", exact: "13.3.0"),
.package(url: "https://github.com/pendo-io/pendo-mobile-sdk", exact: "3.5.0"),
.package(url: "https://github.com/IDScanNet/IDScanIDParserIOS", exact: "1.220127.1"),
.package(url: "https://github.com/Kolos65/Mockable", exact: "0.1.3"),
.package(url: "https://github.com/newrelic/newrelic-ios-agent-spm", exact: "7.5.3"),
.package(url: "https://github.com/auth0/JWTDecode.swift", exact: "3.2.0"),
.package(url: "https://github.com/Alamofire/Alamofire.git", exact: "5.10.2"),
To get tuist install to work correctly, I needed to change the following back to URLs
.package(url: "https://github.com/realm/realm-swift", exact: "20.00.0"),
.package(url: "https://github.com/IDScanNet/IDScanIDParserIOS", exact: "1.220127.1"),
.package(url: "https://github.com/newrelic/newrelic-ios-agent-spm", exact: "7.5.3"),
.package(url: "https://github.com/auth0/JWTDecode.swift", exact: "3.2.0"),
I faced repeated failures trying to bench it after all these changes.
Benchmark 1: tuist install
Error: Command terminated with non-zero exit code 1 in benchmark iteration 2. Use the '-i'/'--ignore-failure' option if you want to ignore this. Alternatively, use the '--show-output' option to debug what went wrong.
I appended --show-output
to the command and given how new relic or pendo resolution would often fail in our CI runs, I think I got lucky when it did work. Let me know if you have anything else for me to try. Tuist version 4.39.0
.