Intermittent dependency problems #4551
-
I have always had intermittent issues with resolving package dependencies when using Tuist for generating my project. Below is the last part of the error log. $ tuist clean && tuist fetch && tuist generate -n
...[redacted]...
Generating workspace MyProject.xcworkspace
Generating project MyProject
Resolving package dependencies using xcodebuild
2022-06-13 13:13:34.879 xcodebuild[26293:66969] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-06-13 13:13:34.879 xcodebuild[26293:66969] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
xcodebuild: error: Could not resolve package dependencies:
failed downloading 'https://github.com/facebook/facebook-ios-sdk/releases/download/v13.2.0/FBSDKCoreKit-Static_XCFramework.zip' which is required by binary target 'FBSDKCoreKit': /Users/myuser/Library/Developer/Xcode/DerivedData/MyProject-czcmeodudoicsferjxklyuazdlfa/SourcePackages/artifacts/facebook-ios-sdk/FBSDKCoreKit-Static_XCFramework.zip already exists in file system
fatalError
The 'xcodebuild' command exited with error code 74 and message:
2022-06-13 13:13:34.879 xcodebuild[26293:66969] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-06-13 13:13:34.879 xcodebuild[26293:66969] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
xcodebuild: error: Could not resolve package dependencies:
failed downloading 'https://github.com/facebook/facebook-ios-sdk/releases/download/v13.2.0/FBSDKCoreKit-Static_XCFramework.zip' which is required by binary target 'FBSDKCoreKit': /Users/myuser/Library/Developer/Xcode/DerivedData/MyProject-czcmeodudoicsferjxklyuazdlfa/SourcePackages/artifacts/facebook-ios-sdk/FBSDKCoreKit-Static_XCFramework.zip already exists in file system
fatalError
Consider creating an issue using the following link: https://github.com/tuist/tuist/issues/new/choose Re-running the command resolves the issue. Sometimes I'll have to re-run it again. That's why I'm saying it's intermittent, it's almost random. It works maybe 80% of the time. This has gone on ever since I started using Tuist some months ago. After Tuist succeeds, sometimes Xcode will still fail with strange errors about the dependencies, and then it's about all of the project dependencies, not specifically this Facebook one. Right-clicking "Package Dependencies" in the sidebar and choosing "Reset Package Caches" resolves that problem. Unforuntately I can't show you the entire Tuist configuration (not a public project), but basically I have a few relatively simple targets with the following dependencies: .package(product: "FacebookCore"),
.package(product: "FacebookLogin"),
.package(product: "FacebookShare"), The Tuist project has an SPM dependency as such: .remote(url: "https://github.com/facebook/facebook-ios-sdk", requirement: .upToNextMinor(from: "13.2.0")), The Dependencies object is defined as follows, with the seemingly non-offending dependencies redacted: let dependencies = Dependencies(
swiftPackageManager: SwiftPackageManagerDependencies(
[
.remote(...),
.remote(...),
.remote(...),
.remote(...),
.remote(...),
.remote(...),
.remote(url: "https://github.com/facebook/facebook-ios-sdk", requirement: .upToNextMinor(from: "13.2.0")),
.remote(...),
.remote(...),
.remote(...),
.remote(...),
.remote(...),
.remote(...),
.remote(...),
.local(path: "..."),
],
productTypes: [
"...": .staticLibrary,
],
targetSettings: [
"...": [
"MODULEMAP_FILE": "...",
],
]
),
platforms: [.iOS]
) The Config is defined simply as: let config = Config(
compatibleXcodeVersions: .upToNextMajor("13.3"),
swiftVersion: "5.6"
) Any ideas what's going on here? Tuist version: 3.3.0 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You should use .external, not .package to define external dependencies |
Beta Was this translation helpful? Give feedback.
You should use .external, not .package to define external dependencies