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
I am encountering a bug wherein the tuist generate command fails sporadically–but often–in a Tuist project with dependencies define in Tuist/Package.swift as well as the native Xcode SPM integration.
The failure message reads:
We received an error that we couldn't handle: - Localized description: The file “Package.resolved” couldn’t be opened because there is no such file. - Error: Error Domain=NSCocoaErrorDomain Code=260 "The file “Package.resolved” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Users/jesse/Desktop/TuistBugRepro/TuistBugRepro.xcworkspace/xcshareddata/swiftpm/Package.resolved, NSUnderlyingError=0x6000017d05d0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}If you think it's a legit issue, please file an issue including the reproducible steps: https://github.com/tuist/tuist/issues/new/choose
Consider creating an issue using the following link: https://github.com/tuist/tuist/issues/new/choose
When I see this error, I also notice that the .package.resolved file has been deleted.
This does not happen every time I run tuist generate, but it does happen frequently enough that I encounter it several times a day during development.
How do we reproduce it?
You can reproduce this error with this sample project: TuistBugRepro.zip
You can reproduce the error by running tuist generate repeatedly and waiting for the failure to occur. I've found this tedious, so I included a script in the project (reproduce.sh) that will repeatedly run tuist generate for you. With the script, I'm seeing the error on every 5-10 runs.
Error log
➜ TuistBugRepro git:(main) tuist generate
Loading and constructing the graph
It might take a whileif the cache is empty
Using cache binaries for the following targets:
Generating workspace TuistBugRepro.xcworkspace
Generating project TuistBugRepro
Generating project swift-log
Resolving package dependencies using xcodebuild
We received an error that we couldn't handle: - Localized description: The file “Package.resolved” couldn’t be opened because there is no such file. - Error: Error Domain=NSCocoaErrorDomain Code=260 "The file “Package.resolved” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Users/jesse/Desktop/TuistBugRepro/TuistBugRepro.xcworkspace/xcshareddata/swiftpm/Package.resolved, NSUnderlyingError=0x600001648540 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}If you think it's a legit issue, please file an issue including the reproducible steps: https://github.com/tuist/tuist/issues/new/choose
Consider creating an issue using the following link: https://github.com/tuist/tuist/issues/new/choose
If I run git status after receiving this error, I can see it's because the .package.resolved file has been deleted:
➜ TuistBugRepro git:(main) ✗ git status
On branch main
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
deleted: .package.resolved
no changes added to commit (use "git add" and/or "git commit -a")
macOS version
14.2.1
Tuist version
4.9.0
Xcode version
15.3
The text was updated successfully, but these errors were encountered:
I took a quick look and I can reproduce the issue. The error is coming from here. That being said, I don't understand how that file can be missing when we run xcodebuild -resolvePackageDependencies right before.
We'll try to have a look at some point, but can't promise when since our recommended integration is XcodeProj-based. If you wanna take a look, that'd be much appreciated!
What happened?
I am encountering a bug wherein the
tuist generate
command fails sporadically–but often–in a Tuist project with dependencies define inTuist/Package.swift
as well as the native Xcode SPM integration.The failure message reads:
When I see this error, I also notice that the
.package.resolved
file has been deleted.This does not happen every time I run
tuist generate
, but it does happen frequently enough that I encounter it several times a day during development.How do we reproduce it?
You can reproduce this error with this sample project: TuistBugRepro.zip
You can reproduce the error by running
tuist generate
repeatedly and waiting for the failure to occur. I've found this tedious, so I included a script in the project (reproduce.sh
) that will repeatedly runtuist generate
for you. With the script, I'm seeing the error on every 5-10 runs.Error log
If I run
git status
after receiving this error, I can see it's because the.package.resolved
file has been deleted:macOS version
14.2.1
Tuist version
4.9.0
Xcode version
15.3
The text was updated successfully, but these errors were encountered: