swiftly icon indicating copy to clipboard operation
swiftly copied to clipboard

Should installing 6.0 snapshot be supported?

Open t089 opened this issue 1 year ago • 2 comments

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$ 

t089 avatar Jun 16 '24 06:06 t089

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.

adam-fowler avatar Jun 16 '24 07:06 adam-fowler

Here with the same issue, still. On Ubuntu 22.04 LTS, latest swiftly. Really confusing issue!

gregcotten avatar Jul 17 '24 23:07 gregcotten

I believe this issue can be closed now.

kkebo avatar Aug 20 '24 00:08 kkebo

I have verified this now works with the latest 6.0 snapshot

adam-fowler avatar Aug 20 '24 12:08 adam-fowler