SwiftPackageIndex-Server icon indicating copy to clipboard operation
SwiftPackageIndex-Server copied to clipboard

Replace `swift package dump-package` with `swift package describe --type json`

Open finestructure opened this issue 3 years ago • 5 comments

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.

finestructure avatar Jun 14 '21 07:06 finestructure

As part of this issue, make sure to migrate the changes made in #1171 over to use data from describe.

finestructure avatar Jun 14 '21 07:06 finestructure

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.

daveverwer avatar Mar 01 '22 10:03 daveverwer

@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.

daveverwer avatar May 30 '22 09:05 daveverwer

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.

maxxfrazer avatar May 30 '22 09:05 maxxfrazer

Any idea when 5.8/6.0 going to release?

ykhandelwal913 avatar Jul 15 '22 18:07 ykhandelwal913