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

Swiftly first toolchain download fails on waiting for user input #170

Open
vsarunas opened this issue Sep 25, 2024 · 3 comments
Open

Swiftly first toolchain download fails on waiting for user input #170

vsarunas opened this issue Sep 25, 2024 · 3 comments

Comments

@vsarunas
Copy link
Contributor

Leaving new version of swiftly causes a hang went run via ansible:

 FAILED! => {"changed": true, "cmd": "SWIFTLY_HOME_DIR=/usr/local/share SWIFTLY_BIN_DIR=/usr/local/bin /usr/local/bin/swiftly install 6.0.0 --no-verify", "delta": "0:04:40.989830", "end": "2024-09-25 09:04:35.952845", "msg": "non-zero return code", "rc": 137, "start": "2024-09-25 08:59:54.963015", "stderr": "Killed", "stderr_lines": ["Killed"], "stdout": "Installing Swift 6.0.0\nDownloading Swift 6.0.0\n1%: Downloaded 13.3 MiB of 775.1 MiB\n4%: Downloaded 32.4 MiB of 775.1 MiB\n7%: Downloaded 54.7 MiB of 775.1 MiB\n10%: Downloaded 81.5 MiB of 775.1 MiB\n13%: Downloaded 106.8 MiB of 775.1 MiB\n17%: Downloaded 133.6 MiB of 775.1 MiB\n20%: Downloaded 160.2 MiB of 775.1 MiB\n23%: Downloaded 182.7 MiB of 775.1 MiB\n26%: Downloaded 209.2 MiB of 775.1 MiB\n30%: Downloaded 235.8 MiB of 775.1 MiB\n33%: Downloaded 256.8 MiB of 775.1 MiB\n36%: Downloaded 282.4 MiB of 775.1 MiB\n39%: Downloaded 308.1 MiB of 775.1 MiB\n43%: Downloaded 334.6 MiB of 775.1 MiB\n46%: Downloaded 358.0 MiB of 775.1 MiB\n49%: Downloaded 384.6 MiB of 775.1 MiB\n53%: Downloaded 411.5 MiB of 775.1 MiB\n56%: Downloaded 437.2 MiB of 775.1 MiB\n59%: Downloaded 464.0 MiB of 775.1 MiB\n62%: Downloaded 488.3 MiB of 775.1 MiB\n66%: Downloaded 515.6 MiB of 775.1 MiB\n69%: Downloaded 542.3 MiB of 775.1 MiB\n73%: Downloaded 568.2 MiB of 775.1 MiB\n76%: Downloaded 594.0 MiB of 775.1 MiB\n79%: Downloaded 617.5 MiB of 775.1 MiB\n83%: Downloaded 644.3 MiB of 775.1 MiB\n86%: Downloaded 671.0 MiB of 775.1 MiB\n89%: Downloaded 696.8 MiB of 775.1 MiB\n93%: Downloaded 723.5 MiB of 775.1 MiB\n96%: Downloaded 748.4 MiB of 775.1 MiB\n99%: Downloaded 774.7 MiB of 775.1 MiB\n100%: Downloaded 775.1 MiB of 775.1 MiB", "stdout_lines": ["Installing Swift 6.0.0", "Downloading Swift 6.0.0", "1%: Downloaded 13.3 MiB of 775.1 MiB", "4%: Downloaded 32.4 MiB of 775.1 MiB", "7%: Downloaded 54.7 MiB of 775.1 MiB", "10%: Downloaded 81.5 MiB of 775.1 MiB", "13%: Downloaded 106.8 MiB of 775.1 MiB", "17%: Downloaded 133.6 MiB of 775.1 MiB", "20%: Downloaded 160.2 MiB of 775.1 MiB", "23%: Downloaded 182.7 MiB of 775.1 MiB", "26%: Downloaded 209.2 MiB of 775.1 MiB", "30%: Downloaded 235.8 MiB of 775.1 MiB", "33%: Downloaded 256.8 MiB of 775.1 MiB", "36%: Downloaded 282.4 MiB of 775.1 MiB", "39%: Downloaded 308.1 MiB of 775.1 MiB", "43%: Downloaded 334.6 MiB of 775.1 MiB", "46%: Downloaded 358.0 MiB of 775.1 MiB", "49%: Downloaded 384.6 MiB of 775.1 MiB", "53%: Downloaded 411.5 MiB of 775.1 MiB", "56%: Downloaded 437.2 MiB of 775.1 MiB", "59%: Downloaded 464.0 MiB of 775.1 MiB", "62%: Downloaded 488.3 MiB of 775.1 MiB", "66%: Downloaded 515.6 MiB of 775.1 MiB", "69%: Downloaded 542.3 MiB of 775.1 MiB", "73%: Downloaded 568.2 MiB of 775.1 MiB", "76%: Downloaded 594.0 MiB of 775.1 MiB", "79%: Downloaded 617.5 MiB of 775.1 MiB", "83%: Downloaded 644.3 MiB of 775.1 MiB", "86%: Downloaded 671.0 MiB of 775.1 MiB", "89%: Downloaded 696.8 MiB of 775.1 MiB", "93%: Downloaded 723.5 MiB of 775.1 MiB", "96%: Downloaded 748.4 MiB of 775.1 MiB", "99%: Downloaded 774.7 MiB of 775.1 MiB", "100%: Downloaded 775.1 MiB of 775.1 MiB"]}

The toolchain is installed:

 SWIFTLY_HOME_DIR=/usr/local/share SWIFTLY_BIN_DIR=/usr/local/bin /usr/local/bin/swiftly install 6.0.0 --no-verify
Swift 6.0.0 is already installed, exiting.

Probably it hangs on activating the new toolchain and asking for confirmation:

sudo SWIFTLY_HOME_DIR=/usr/local/share SWIFTLY_BIN_DIR=/usr/local/bin /usr/local/bin/swiftly use 6.0.0
The following existing executables will be overwritten:
  /usr/local/bin/ld.lld
  /usr/local/bin/swift-build-sdk-interfaces
  /usr/local/bin/swift-package
  /usr/local/bin/docc
  /usr/local/bin/plutil
  /usr/local/bin/lld-link
  /usr/local/bin/swiftc
  /usr/local/bin/clangd
  /usr/local/bin/swift-test
  /usr/local/bin/lldb-server
  /usr/local/bin/wasm-ld
  /usr/local/bin/swift-package-registry
  /usr/local/bin/swift-api-extract
  /usr/local/bin/clang
  /usr/local/bin/swift-api-checker.py
  /usr/local/bin/repl_swift
  /usr/local/bin/swift-package-collection
  /usr/local/bin/swift-build-tool
  /usr/local/bin/clang++
  /usr/local/bin/sourcekit-lsp
  /usr/local/bin/llvm-cov
  /usr/local/bin/swift-api-digester
  /usr/local/bin/llvm-profdata
  /usr/local/bin/swift
  /usr/local/bin/swift-driver
  /usr/local/bin/clang-cl
  /usr/local/bin/swift-help
  /usr/local/bin/swift-autolink-extract
  /usr/local/bin/sdk-module-lists
  /usr/local/bin/ld64.lld
  /usr/local/bin/llvm-ar
  /usr/local/bin/swift-build
  /usr/local/bin/swift-demangle
  /usr/local/bin/swift-plugin-server
  /usr/local/bin/swift-cache-tool
  /usr/local/bin/swift-experimental-sdk
  /usr/local/bin/clang-cpp
  /usr/local/bin/clang-cache
  /usr/local/bin/lld
  /usr/local/bin/swift-symbolgraph-extract
  /usr/local/bin/lldb
  /usr/local/bin/lldb-argdumper
  /usr/local/bin/swift-frontend
  /usr/local/bin/swift-run
Proceed? (y/n): 

Should expand the use of --assume-yes flag that exists in uninstall?

@0xTim
Copy link
Member

0xTim commented Sep 25, 2024

@vsarunas there's a --disable-confirmation flag that should fix this

@vsarunas
Copy link
Contributor Author

@0xTim; correct, but the --disable-confirmation is only there for the initial shell script bootstrap process.

/usr/local/bin/swiftly install 6.0.0 --disable-confirmation
Error: Unknown option '--disable-confirmation'

The --assume-yes is present for example in update.

@cmcgee1024
Copy link
Member

I think that this gets better in the next release of swiftly with the --asume-yes option being available in install/use subcommands.

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