swift-async-algorithms icon indicating copy to clipboard operation
swift-async-algorithms copied to clipboard

Swift 5.8 compilation failure `/Package.swift:4:8: error: no such module 'CompilerPluginSupport'` -> ⚠️ SemVer break

Open weissi opened this issue 8 months ago • 4 comments

As per Package.swift we support Swift 5.8 here. But an actual compilation fails with

error: Invalid manifest (compiled with: ["/usr/bin/swiftc", "-vfsoverlay", "/tmp/TemporaryDirectory.ImEdbq/vfs.yaml", "-L", "/usr/lib/swift/pm/ManifestAPI", "-lPackageDescription", "-Xlinker", "-rpath", "-Xlinker", "/usr/lib/swift/pm/ManifestAPI", "-swift-version", "5", "-I", "/usr/lib/swift/pm/ManifestAPI", "-package-description-version", "5.8.0", "/Package.swift", "-Xfrontend", "-disable-implicit-concurrency-module-import", "-Xfrontend", "-disable-implicit-string-processing-module-import", "-o", "/tmp/TemporaryDirectory.qU2Iyh/swift-async-algorithms-manifest"])
     /Package.swift:4:8: error: no such module 'CompilerPluginSupport'
     import CompilerPluginSupport
            ^ in https://github.com/apple/swift-async-algorithms.git

This is a SemVer break so needs urgent fixing.

weissi avatar Apr 25 '25 08:04 weissi

CC @FranzBusch this also suggests the CI isn't setup correctly

weissi avatar Apr 25 '25 08:04 weissi

5.8 is out of the support policy already so this is expected https://forums.swift.org/t/dropping-support-for-swift-5-8-on-linux/78533

FranzBusch avatar Apr 25 '25 10:04 FranzBusch

5.8 is out of the support policy already so this is expected https://forums.swift.org/t/dropping-support-for-swift-5-8-on-linux/78533

This cannot be expected. The Package.swift says swift-tools-version:5.8 so this will break people. We need to release a final version that is compatible with 5.8 and then we can change it to swift-tools-version:5.10 or whatever and move on. But what's not okay is to leave the last released version that claims 5.8 support not supporting 5.8

weissi avatar Apr 25 '25 11:04 weissi

Hi. We are hitting the same error on Swift 5.8, 5.9, and 5.10 when trying to build an application that uses postgres-kit, based on code in this PR.

  • https://github.com/crate/cratedb-guide/pull/413

As a workaround, we are building the application using Swift 5.7 now.

docker run --rm -it --volume=$(pwd):/src --network=host swift:5.7 bash

However, it is unfortunate that the code doesn't build on more recent versions of Swift. Any suggestions how to resolve this problem are more than welcome. 🙏

Edit: When using more recent Swift >= 6.0, we can build applications using postgres-kit.

docker run --rm -it --volume=$(pwd):/src --network=host swift:6.0 bash

amotl avatar Oct 19 '25 11:10 amotl