Should installing 6.0 snapshot be supported?
I tried to install a 6.0 snapshot with swiftly, but it seems the installation does not work afterwards. Maybe it is a problem with the snapshot …
tobias@ubuntu:~$ swiftly use 6.0-snapshot
Set the active toolchain to 6.0-snapshot-2024-06-13 (was Swift 5.10.1)
tobias@ubuntu:~$ cd test/
tobias@ubuntu:~/test$ swift build
error: 'test': Invalid manifest (compiled with: ["/home/tobias/.local/bin/swiftc", "-vfsoverlay", "/tmp/TemporaryDirectory.dZtFHJ/vfs.yaml", "-L", "/home/tobias
/.local/bin", "-lPackageDescription", "-Xlinker", "-rpath", "-Xlinker", "/home/tobias/.local/bin", "-swift-version", "6", "-I", "/home/tobias/.local/bin", "-pac
kage-description-version", "6.0.0", "/home/tobias/test/Package.swift", "-o", "/tmp/TemporaryDirectory.7QJOfi/test-manifest"])
/home/tobias/test/Package.swift:4:8: error: no such module 'PackageDescription'
2 | // The swift-tools-version declares the minimum version of Swift required to build this package.
3 |
4 | import PackageDescription
| `- error: no such module 'PackageDescription'
5 |
6 | let package = Package(
error: 'test': Invalid manifest (compiled with: ["/home/tobias/.local/bin/swiftc", "-vfsoverlay", "/tmp/TemporaryDirectory.QvI34V/vfs.yaml", "-L", "/home/tobias
/.local/bin", "-lPackageDescription", "-Xlinker", "-rpath", "-Xlinker", "/home/tobias/.local/bin", "-swift-version", "6", "-I", "/home/tobias/.local/bin", "-pac
kage-description-version", "6.0.0", "/home/tobias/test/Package.swift", "-o", "/tmp/TemporaryDirectory.VcmOIN/test-manifest"])
/home/tobias/test/Package.swift:4:8: error: no such module 'PackageDescription'
2 | // The swift-tools-version declares the minimum version of Swift required to build this package.
3 |
4 | import PackageDescription
| `- error: no such module 'PackageDescription'
5 |
6 | let package = Package(
tobias@ubuntu:~/test$ swiftly list
Installed release toolchains
----------------------------
Swift 5.10.1
Installed snapshot toolchains
-----------------------------
6.0-snapshot-2024-06-13 (in use)
tobias@ubuntu:~/test$
Yes it should work. There was an issue with the new swift-driver not working when referenced through a symbolic link. This was fixed. It appears it has broken again.
EDIT: Ah I was wrong the relevant PR has still to be merged into release/6.0 https://github.com/apple/swift-driver/pull/1606. I always end up using VSCode on Linux which follows the symbolic link to find the actual location of the toolchain so doesn't have this issue.
Here with the same issue, still. On Ubuntu 22.04 LTS, latest swiftly. Really confusing issue!
I believe this issue can be closed now.
I have verified this now works with the latest 6.0 snapshot