-
Notifications
You must be signed in to change notification settings - Fork 16
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
Package identity in name field #117
Comments
Hey, thanks for reaching out! If you say pipeline does it mean you only experience this during a CI job? I feel like it could have something to do with timing, so when it is invoked during your build process. The not so user-friendly repo-name is the fallback until the dependency is fully fetched and loaded, see swift-package-manager for reference; you can actually see that happening in Xcode when SPM is in progress.
I've intentionally avoided that in #72 because this either requires a error-prone string lookup or an actual compilation step of the |
Thanks for the detailed answer.
We are only using your tool in our CI jobs, so usually we don't check the "workspace-state" file. What happens on CI is that the repo is checked-out from scratch and we build the project using gym (xcodebuild). I could also reproduce it with a test package. If you want to try it, you can find it here: https://github.com/martinK-7/PackageDependenciesTest
It actually also happens when you open the Package with Xcode and wait for packages to be resolved. |
Thanks for all the details, that is very helpful. I could produce it with the |
Having the same issue while building locally: |
Hey, first thanks for creating this great tool!
We are using it in our pipelines to generate license information for the packages of our Xcode project.
We noticed that sometimes it happens that the package
identity
is also in the generatedname
field which leads to non-user-friendly outputs.For example the json output for abseil:
Name should actually be "abseil" here.
As I understood, you get this information from "workspace-state" in derivedData. There it also looks like this:
It seems like an issue with Xcode itself, unfortunately I cannot really tell how to reproduce it. We found that in our case it happens only when
originHash
inPackage.resolved
changes, for example after updating some package. After reverting only the change in the hash it starts working as expected again (🤷).To avoid these random Xcode issues, would it be an option to get package names directly from "Package.swift" in checkouts? Or maybe you have some other ideas.
Setup:
Xcode 15.4
swift-package-list 4.1.0
Input Parameters:
.../x.xcworkspace
--output-path '.'
--custom-file-name 'tmpDeps'
--output-type 'json'
--custom-derived-data-path '/Users/x/Library/Developer/Xcode/DerivedData'
Please let me know if you need more information.
Thanks in advance.
The text was updated successfully, but these errors were encountered: