You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling xcodebuild -list -json -project "<Project>.xcodeproj" causes Xcode to automatically re-resolve Swift Package Manager dependencies and write a new Package.resolved into:
When dependencies are already locked at the workspace level (<Project>.xcworkspace/xcshareddata/swiftpm/Package.resolved), this:
Duplicates the lockfile under the .xcodeproj workspace
Pollutes the repo with untracked files
Violates the expectation that -list -json is a read-only metadata query
All of this occurs despite the CLI’s intent being only to fetch schemes, targets, and configurations.
Reproducible Demo
In a React Native iOS project with SPM enabled, open the workspace once in Xcode so that ios/<Project>.xcworkspace/xcshareddata/swiftpm/Package.resolved exists.
Uh oh!
There was an error while loading. Please reload this page.
Environment
Description
In
packages/cli-platform-apple/src/tools/getInfo.ts:71
, the CLI invokes:Calling
xcodebuild -list -json -project "<Project>.xcodeproj"
causes Xcode to automatically re-resolve Swift Package Manager dependencies and write a newPackage.resolved
into:When dependencies are already locked at the workspace level (
<Project>.xcworkspace/xcshareddata/swiftpm/Package.resolved
), this:.xcodeproj
workspace-list -json
is a read-only metadata queryAll of this occurs despite the CLI’s intent being only to fetch schemes, targets, and configurations.
Reproducible Demo
In a React Native iOS project with SPM enabled, open the workspace once in Xcode so that
ios/<Project>.xcworkspace/xcshareddata/swiftpm/Package.resolved
exists.Delete that shared lockfile:
Change into the
ios/
directory and run:xcodebuild -list -json -project "<Project>.xcodeproj"
Verify that a new file was created at:
The text was updated successfully, but these errors were encountered: