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 generated name field which leads to non-user-friendly outputs.
For example the json output for abseil:
{
"identity" : "abseil-cpp-binary",
"license" : "...",
"name" : "abseil-cpp-binary",
"repositoryURL" : "https:\/\/github.com\/google\/abseil-cpp-binary.git",
"revision" : "748c7837511d0e6a507737353af268484e1745e2",
"version" : "1.2024011601.1"
}
Name should actually be "abseil" here.
As I understood, you get this information from "workspace-state" in derivedData. There it also looks like this:
{
"basedOn" : null,
"packageRef" : {
"identity" : "abseil-cpp-binary",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/abseil-cpp-binary.git",
"name" : "abseil-cpp-binary"
},
"state" : {
"checkoutState" : {
"revision" : "748c7837511d0e6a507737353af268484e1745e2",
"version" : "1.2024011601.1"
},
"name" : "sourceControlCheckout"
},
"subpath" : "abseil-cpp-binary"
},
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 in Package.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.
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
identityis also in the generatednamefield 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
originHashinPackage.resolvedchanges, 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.