SwiftPackageIndex-Server
SwiftPackageIndex-Server copied to clipboard
Replace `swift package dump-package` with `swift package describe --type json`
describe
is going to replace dump-package
in the future and has more information. For instance c99name
and module_membership
, which we need for package collections.
As part of this issue, make sure to migrate the changes made in #1171 over to use data from describe
.
I was just chatting with @maxxfrazer about an issue he's having with generating a package collection and it became clear that we should approach this change with some caution as there are packages that output from dump-package
without issues that fail with describe
.
For example AgoraRtcKit:
$ swift package dump-package
{
"cLanguageStandard" : null,
"cxxLanguageStandard" : null,
"dependencies" : [
],
"name" : "AgoraRtcKit",
... etc ...
But with describe
:
$ swift package describe --type json
error: artifact not found for target 'AgoraAIDenoiseExtension'
Max thinks it's because that package (and others where the same issue happens) only have binary targets, which we currently have no problems with.
He logged a bug with this last year and we should probably wait until that’s fixed and shipped before making this change.
@maxxfrazer let me know that this bug has now been fixed.
I think the 5.7 releases have already been frozen, but let's keep an eye on this for 5.8/6.0.
This is the issue I was looking for!
It does work with the 5.7 snapshot I tried; the 2022-05-18 build. Once Swift 5.7 is released the fix should already be in there.
Any idea when 5.8/6.0 going to release?