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

fix: use proper version comparison to support installation of ruff 0.10.x #10

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pdecat
Copy link

@pdecat pdecat commented Mar 14, 2025

Without this change, installation of ruff 0.10.0 fails with:

# mise up -i
mise upgrade
Select tools to upgrade
 > ✓ ruff                 0.9.10               -> 0.10.0     (~/.config/mise/config.toml)
↑/↓/k/j up/down • x/space toggle • a toggle all • / filter • enter confirm
mise upgrade ruff                 0.9.10               -> 0.10.0     (~/.config/mise/config.toml)
curl: (22) The requested URL returned error: 404
mise ERROR ~/.local/share/mise/plugins/ruff/bin/download failed
* Downloading ruff release 0.10.0...
curl: (22) The requested URL returned error: 404
asdf-ruff: Could not download https://github.com/astral-sh/ruff/releases//download/v0.10.0/ruff-0.10.0-x86_64-unknown-linux-gnu.tar.gz
mise ERROR failed to install asdf:[email protected]
mise ERROR ~/.local/share/mise/plugins/ruff/bin/download exited with non-zero status: exit code 1
mise ERROR Run with --verbose or MISE_VERBOSE=1 for more information

I've also verified that installation of older versions such a 0.9.10, 0.5.0 and 0.4.0 still works.

@@ -76,6 +76,10 @@ get_ext() {
esac
}

version_lt() {
test "$(echo "$@" | tr " " "\n" | sort -rV | head -n 1)" != "$1"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sm-moshi
Copy link

Hi,

just to support your pull request: As it's just a syntax thing it's happening with 0.11.0 and the aarch64 Darwin versions also.

DEBUG ARGS: /Users/smeya/.local/share/../bin/mise install ruff@latest --verbose
DEBUG config: ~/.config/mise/config.toml
DEBUG install_some_versions: ruff@latest
INFO  [email protected]     install
DEBUG EnvResults { env: ["PERL_SEMVER_V5_ENABLE_STRICT"] }
INFO  [email protected]     bin/download
INFO  [email protected]     ~/.local/share/mise/plugins/ruff/bin/download
DEBUG $ ~/.local/share/mise/plugins/ruff/bin/download 
INFO  [email protected]     * Downloading ruff release 0.11.0...
curl: (56) The requested URL returned error: 404
INFO  [email protected]     asdf-ruff: Could not download https://github.com/astral-sh/ruff/releases//download/v0.11.0/ruff-0.11.0-aarch64-apple-darwin.tar.gz
ERROR ~/.local/share/mise/plugins/ruff/bin/download failed
Error: 
   0: failed to install asdf:[email protected]
   1: ~/.local/share/mise/plugins/ruff/bin/download exited with non-zero status: exit code 1

Location:
   src/plugins/script_manager.rs:184

Version:
   2025.3.6 macos-arm64 (2025-03-18)

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                                ⋮ 3 frames hidden ⋮                               
   4: mise::plugins::script_manager::ScriptManager::run_by_line::hb15740bc1be1d4a0
      at <unknown source file>:<unknown line>
   5: <mise::backend::asdf::AsdfBackend as mise::backend::Backend>::install_version_::h26c696dbb8e18c9b
      at <unknown source file>:<unknown line>
   6: mise::backend::Backend::install_version::hfce1bdde8b4596a6
      at <unknown source file>:<unknown line>
   7: std::sys::backtrace::__rust_begin_short_backtrace::h36aa52417a74c70e
      at <unknown source file>:<unknown line>
   8: core::ops::function::FnOnce::call_once{{vtable.shim}}::h7db3352e84c0c5d8
      at <unknown source file>:<unknown line>
   9: std::sys::pal::unix::thread::Thread::new::thread_start::h02b173395cbbc15c
      at <unknown source file>:<unknown line>
  10: __pthread_cond_wait<unknown>
      at <unknown source file>:<unknown line>

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.```

Greets

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

Successfully merging this pull request may close these issues.

2 participants