Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

6.0-snapshot installed with swiftly doesn't work #92

Open
kkebo opened this issue Jan 15, 2024 · 7 comments
Open

6.0-snapshot installed with swiftly doesn't work #92

kkebo opened this issue Jan 15, 2024 · 7 comments

Comments

@kkebo
Copy link
Contributor

kkebo commented Jan 15, 2024

The current main-snapshot toolchain uses the new swift-driver and it doesn't seem to work with symlinks.

$ swiftly install main-snapshot
...
$ swiftly list
Installed release toolchains                                                                                                                                                             
----------------------------                                                                                                                                                             
                                                                                                                                                                                         
Installed snapshot toolchains                                                                                                                                                            
-----------------------------                                                                                                                                                            
main-snapshot-2024-01-14 (in use)                                                                                                                                                        
$ mkdir example
$ cd example/
$ swift package init --type executable
Creating executable package: example                                                                                                                                                     
Creating Package.swift                                                                                                                                                                   
Creating .gitignore                                                                                                                                                                      
Creating Sources/                                                                                                                                                                        
Creating Sources/main.swift                                                                                                                                                              
$ swift build
error: 'example': Invalid manifest (compiled with: ["/home/kebo/.local/bin/swiftc", "-vfsoverlay", "/tmp/TemporaryDirectory.otDNvO/vfs.yaml", "-L", "/home/kebo/.local/bin", "-lPackageDe
scription", "-Xlinker", "-rpath", "-Xlinker", "/home/kebo/.local/bin", "-swift-version", "5", "-I", "/home/kebo/.local/bin", "-package-description-version", "5.11.0", "/home/kebo/exampl
e/Package.swift", "-Xfrontend", "-disable-implicit-concurrency-module-import", "-Xfrontend", "-disable-implicit-string-processing-module-import", "-o", "/tmp/TemporaryDirectory.xjhMqz/e
xample-manifest"])                                                                                                                                                                       
error: fatalError                                                                                                                                                                        
/home/kebo/example/Package.swift:4:8: error: no such module 'PackageDescription'                                                                                                         
import PackageDescription                                                                                                                                                                
       ^                                                                                                                                                                                 
$ swift build -Xswiftc -disallow-use-new-driver
Building for debugging...
<unknown>:0: warning: legacy driver is now deprecated; consider avoiding specifying '-disallow-use-new-driver'                                                       
<unknown>:0: warning: legacy driver is now deprecated; consider avoiding specifying '-disallow-use-new-driver'                                                     
[7/7] Linking example
Build complete! (1.69s)
$ which swift
/home/kebo/.local/bin/swift
$ ls -l $HOME/.local/bin
lrwxrwxrwx kebo kebo  81 B  Mon Jan 15 21:01:21 2024  clang ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/clang
lrwxrwxrwx kebo kebo  83 B  Mon Jan 15 21:01:21 2024  clang++ ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/clang++
lrwxrwxrwx kebo kebo  84 B  Mon Jan 15 21:01:21 2024  clang-17 ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/clang-17
lrwxrwxrwx kebo kebo  87 B  Mon Jan 15 21:01:21 2024  clang-cache ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/clang-cache
lrwxrwxrwx kebo kebo  84 B  Mon Jan 15 21:01:21 2024  clang-cl ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/clang-cl
lrwxrwxrwx kebo kebo  85 B  Mon Jan 15 21:01:21 2024  clang-cpp ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/clang-cpp
lrwxrwxrwx kebo kebo  82 B  Mon Jan 15 21:01:21 2024  clangd ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/clangd
lrwxrwxrwx kebo kebo  80 B  Mon Jan 15 21:01:21 2024  docc ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/docc                       
lrwxrwxrwx kebo kebo  82 B  Mon Jan 15 21:01:21 2024  ld.lld ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/ld.lld                 
lrwxrwxrwx kebo kebo  84 B  Mon Jan 15 21:01:21 2024  ld64.lld ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/ld64.lld
lrwxrwxrwx kebo kebo  79 B  Mon Jan 15 21:01:21 2024  lld ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/lld
lrwxrwxrwx kebo kebo  84 B  Mon Jan 15 21:01:21 2024  lld-link ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/lld-link
lrwxrwxrwx kebo kebo  80 B  Mon Jan 15 21:01:21 2024  lldb ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/lldb                    
lrwxrwxrwx kebo kebo  90 B  Mon Jan 15 21:01:21 2024  lldb-argdumper ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/lldb-argdumper
lrwxrwxrwx kebo kebo  87 B  Mon Jan 15 21:01:21 2024  lldb-server ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/lldb-server
lrwxrwxrwx kebo kebo  83 B  Mon Jan 15 21:01:21 2024  llvm-ar ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/llvm-ar                 
lrwxrwxrwx kebo kebo  84 B  Mon Jan 15 21:01:21 2024  llvm-cov ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/llvm-cov
lrwxrwxrwx kebo kebo  89 B  Mon Jan 15 21:01:21 2024  llvm-profdata ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/llvm-profdata
lrwxrwxrwx kebo kebo  82 B  Mon Jan 15 21:01:21 2024  plutil ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/plutil
lrwxrwxrwx kebo kebo  86 B  Mon Jan 15 21:01:21 2024  repl_swift ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/repl_swift
lrwxrwxrwx kebo kebo  92 B  Mon Jan 15 21:01:21 2024  sdk-module-lists ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/sdk-module-lists
lrwxrwxrwx kebo kebo  89 B  Mon Jan 15 21:01:21 2024  sourcekit-lsp ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/sourcekit-lsp     
lrwxrwxrwx kebo kebo  81 B  Mon Jan 15 21:01:21 2024  swift ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/swift
lrwxrwxrwx kebo kebo  96 B  Mon Jan 15 21:01:21 2024  swift-api-checker.py ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/swift-api-checker.py
lrwxrwxrwx kebo kebo  94 B  Mon Jan 15 21:01:21 2024  swift-api-digester ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/swift-api-digester
lrwxrwxrwx kebo kebo  93 B  Mon Jan 15 21:01:21 2024  swift-api-extract ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/swift-api-extract
lrwxrwxrwx kebo kebo  98 B  Mon Jan 15 21:01:21 2024  swift-autolink-extract ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/swift-autolink-extract
lrwxrwxrwx kebo kebo  87 B  Mon Jan 15 21:01:21 2024  swift-build ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/swift-build       
lrwxrwxrwx kebo kebo 102 B  Mon Jan 15 21:01:21 2024  swift-build-sdk-interfaces ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/swift-build-sdk-interfaces
lrwxrwxrwx kebo kebo  92 B  Mon Jan 15 21:01:21 2024  swift-build-tool ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/swift-build-tool
lrwxrwxrwx kebo kebo  92 B  Mon Jan 15 21:01:21 2024  swift-cache-tool ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/swift-cache-tool
lrwxrwxrwx kebo kebo  90 B  Mon Jan 15 21:01:21 2024  swift-demangle ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/swift-demangle
lrwxrwxrwx kebo kebo  88 B  Mon Jan 15 21:01:21 2024  swift-driver ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/swift-driver
lrwxrwxrwx kebo kebo  98 B  Mon Jan 15 21:01:21 2024  swift-experimental-sdk ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/swift-experimental-sdk
lrwxrwxrwx kebo kebo  90 B  Mon Jan 15 21:01:21 2024  swift-frontend ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/swift-frontend
lrwxrwxrwx kebo kebo  86 B  Mon Jan 15 21:01:21 2024  swift-help ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/swift-help
lrwxrwxrwx kebo kebo  95 B  Mon Jan 15 21:01:21 2024  swift-legacy-driver ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/swift-legacy-driver
lrwxrwxrwx kebo kebo  89 B  Mon Jan 15 21:01:21 2024  swift-package ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/swift-package
lrwxrwxrwx kebo kebo 100 B  Mon Jan 15 21:01:21 2024  swift-package-collection ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/swift-package-collection
lrwxrwxrwx kebo kebo  98 B  Mon Jan 15 21:01:21 2024  swift-package-registry ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/swift-package-registry
lrwxrwxrwx kebo kebo  95 B  Mon Jan 15 21:01:21 2024  swift-plugin-server ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/swift-plugin-server
lrwxrwxrwx kebo kebo  85 B  Mon Jan 15 21:01:21 2024  swift-run ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/swift-run
lrwxrwxrwx kebo kebo 101 B  Mon Jan 15 21:01:21 2024  swift-symbolgraph-extract ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/swift-symbolgraph-extract
lrwxrwxrwx kebo kebo  86 B  Mon Jan 15 21:01:21 2024  swift-test ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/swift-test
lrwxrwxrwx kebo kebo  82 B  Mon Jan 15 21:01:21 2024  swiftc ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/swiftc
lrwxrwxrwx kebo kebo  96 B  Mon Jan 15 21:01:21 2024  swiftc-legacy-driver ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/swiftc-legacy-driver
.rwxr-xr-x kebo kebo  54 MB Sun Jan  7 17:18:40 2024  swiftly
lrwxrwxrwx kebo kebo  83 B  Mon Jan 15 21:01:21 2024  wasm-ld ⇒ /home/kebo/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin/wasm-ld
$ export PATH=$HOME/.local/share/swiftly/toolchains/main-snapshot-2024-01-14/usr/bin:$PATH
$ swift package clean
$ swift build
Building for debugging...
[8/8] Linking example
Build complete! (1.65s)
@adam-fowler
Copy link
Member

Have you added an issue to https://github.com/apple/swift?

@kkebo
Copy link
Contributor Author

kkebo commented Jan 15, 2024

No, I haven't. I didn't know where this issue should be fixed.

@adam-fowler
Copy link
Member

I'm not sure this is something we can fix without restructuring everything.

The new swift driver is meant to be a drop in replacement for the old one. So if we lose functionality like working with symbolic linked versions of Swift then that is a bug.

If you add an issue can you link back to it here. Thanks

@kkebo
Copy link
Contributor Author

kkebo commented Jan 15, 2024

I have understood why I should create an issue in apple/swift. Thank you. I will create an issue later.

@kkebo
Copy link
Contributor Author

kkebo commented Jan 16, 2024

I created apple/swift#70932.

@kkebo
Copy link
Contributor Author

kkebo commented May 3, 2024

The issue has been fixed in the latest main-snapshot, but 6.0-snapshot still have the issue.

@kkebo kkebo changed the title The new swift-driver doesn't work properly 6.0-snapshot installed with swiftly doesn't work May 3, 2024
@patrickfreed
Copy link
Collaborator

Cherry-pick to 6.0 is in progress: apple/swift-driver#1606

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants