SwiftPackageIndex / SwiftPackageIndex-Server

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

Outdated package data #3312

Closed ph1ps closed 3 weeks ago

ph1ps commented 3 weeks ago

Which package(s) are showing incorrect data?

Please explain what data is incorrect and what you expected to see

I've had 3 releases (0.0.3, 0.0.4, 0.1.0) after I submitted my package to the Swift Package Index. However the readme page was never updated. It also did not trigger any builds after the initial. The releases are shown in the release notes tab, however. The earliest release after the initial was 2 days ago. Please correct me if I am wrong, if it takes more than 2 days to refetch changes from a package, but from what I could gather from the FAQs it sounded like it fetches changes every couple of hours.

If the problem relates to the compatibility matrix, does it apply to specific builds?

n/a

Screenshots

n/a

Additional context

n/a

finestructure commented 3 weeks ago

Thanks for the report, @ph1ps . The issue is very likely that your Swift 6 package manifest is using the new swiftLanguageModes key. When we parse this package with the Swift compiler from our base image we're currently using, this causes an error:

❯ dsh registry.gitlab.com/finestructure/spi-base:1.0.1
# bash
################################################################
#                                                              #
# Swift Nightly Docker Image                                   #
# Tag: swift-6.0-DEVELOPMENT-SNAPSHOT-2024-07-07-a             #
#                                                              #
################################################################
root@orbstack:/host# swift package dump-package
error: 'host': Invalid manifest (compiled with: ["/usr/bin/swiftc", "-vfsoverlay", "/tmp/TemporaryDirectory.lBDwzZ/vfs.yaml", "-L", "/usr/lib/swift/pm/ManifestAPI", "-lPackageDescription", "-Xlinker", "-rpath", "-Xlinker", "/usr/lib/swift/pm/ManifestAPI", "-swift-version", "6", "-I", "/usr/lib/swift/pm/ManifestAPI", "-package-description-version", "6.0.0", "/host/Package@swift-6.0.swift", "-o", "/tmp/TemporaryDirectory.cTouU8/host-manifest"])
/host/Package@swift-6.0.swift:26:23: error: extra argument 'swiftLanguageModes' in call
24 |     )
25 |   ],
26 |   swiftLanguageModes: [.v6]
   |                       `- error: extra argument 'swiftLanguageModes' in call
27 | )
28 |

/host/Package@swift-6.0.swift:26:25: error: reference to member 'v6' cannot be resolved without a contextual type
24 |     )
25 |   ],
26 |   swiftLanguageModes: [.v6]
   |                         `- error: reference to member 'v6' cannot be resolved without a contextual type
27 | )
28 |
error: invalid manifests at [<AbsolutePath:"/host">]

I've just minutes ago tagged a new release which updates to a newer version that can parse your package:

❯ dsh registry.gitlab.com/finestructure/spi-base:1.0.2
# bash
################################################################
#                                                              #
# Swift Nightly Docker Image                                   #
# Tag: swift-6.0-DEVELOPMENT-SNAPSHOT-2024-08-02-a             #
#                                                              #
################################################################
root@orbstack:/host# swift package dump-package
{
  "cLanguageStandard" : null,
  ...
  "toolsVersion" : {
    "_version" : "6.0.0"
  }
}

This should deploy in a few minutes and then will automatically re-analyse your package within the next 6 hours (worst case, probably much sooner).

I'll keep the issue open as a reminder to check that everything is ok.

ph1ps commented 3 weeks ago

Thank you!

finestructure commented 3 weeks ago

We had to roll back this release before it got a chance to update your package. We'll have another go at it today!

finestructure commented 3 weeks ago

It's been updated now.