SwiftPackageIndex / SwiftPackageIndex-Server

The Swift Package Index is the place to find Swift packages!
https://swiftpackageindex.com
Apache License 2.0
542 stars 42 forks source link

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

Open finestructure opened 3 years ago

finestructure commented 3 years ago

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 commented 3 years ago

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

daveverwer commented 2 years ago

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 commented 2 years ago

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

maxxfrazer commented 2 years ago

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.

ykhandelwal913 commented 2 years ago

Any idea when 5.8/6.0 going to release?