jdx / mise

dev tools, env vars, task runner
https://mise.jdx.dev
MIT License
10.05k stars 290 forks source link

Lua 5.1.* errors on install #1806

Closed nulty closed 7 months ago

nulty commented 7 months ago

Describe the bug mise i lua@5.1.5

To Reproduce Install mise mise i lua@5.1

Expected behavior Expected lua v5.1.5 (or any v 5.1) to be installed successfully.

mise doctor output

version: 2024.3.6 linux-x64 (4a7676e 2024-03-17)
activated: yes
shims_on_path: no

build_info: 
  Target: x86_64-unknown-linux-gnu
  Features: DEFAULT, NATIVE_TLS, OPENSSL
  Built: Sun, 17 Mar 2024 04:10:31 +0000
  Rust Version: rustc 1.76.0 (07dca489a 2024-02-04)
  Profile: release

shell: 
  /bin/bash
  GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)
  Copyright (C) 2020 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

  This is free software; you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.

dirs: 
  data: /usr/local/.local/data/mise/
  config: /usr/local/.config/mise/
  cache: /usr/local/.cache/mise/
  state: /usr/local/.local/state/mise/
  shims: /usr/local/.local/data/mise/shims

config_files: 
  /usr/local/.config/mise/config.toml

plugins: 
  adr-tools  https://gitlab.com/td7x/asdf/adr-tools.git#e0f6e9e
  azure-cli  https://github.com/EcoMind/asdf-azure-cli.git#4735c27
  bun        (core)
  caddy      https://github.com/salasrod/asdf-caddy.git#8a65148
  deno       (core)
  erlang     (core)
  fd         https://gitlab.com/wt0f/asdf-fd.git#201dc8b
  go         (core)
  java       (core)
  jq         https://github.com/lsanwick/asdf-jq.git#addae51
  kubectl    https://github.com/asdf-community/asdf-kubectl.git#cbe6df4
  kubelogin  https://github.com/sechmann/asdf-kubelogin.git#5f8fc23
  lua        https://github.com/Stratus3D/asdf-lua.git#0ea06ff
  make       https://github.com/yacchi/asdf-make.git#2f12c4d
  node       (core)
  python     (core)
  redis      https://github.com/smashedtoatoms/asdf-redis.git#d5a67c5
  ruby       https://github.com/asdf-vm/asdf-ruby#c71034c
  rust       https://github.com/code-lever/asdf-rust.git#95acf4f
  terraform  https://github.com/asdf-community/asdf-hashicorp.git#197e3ec
  tmux       https://github.com/aphecetche/asdf-tmux.git#eb8deee
  yarn       https://github.com/twuni/asdf-yarn.git#376c540

toolset: 
  ruby@3.2.3     
  tmux@3.4       
  fd@9.0.0       
  python@3.10.1  
  rust@1.75.0    
  node@20.10.0   

env_vars: 
  MISE_DATA_DIR=/usr/local/.local/data/mise/
  MISE_GLOBAL_CONFIG_FILE=/usr/local/.config/mise/config.toml
  MISE_CACHE_DIR=/usr/local/.cache/mise/
  MISE_STATE_DIR=/usr/local/.local/state/mise/
  MISE_SHELL=bash
  MISE_CONFIG_DIR=/usr/local/.config/mise/

settings: 
  activate_aggressive = false
  all_compile = false
  always_keep_download = false
  always_keep_install = false
  asdf_compat = false
  cargo_binstall = true
  color = true
  disable_default_shorthands = false
  disable_tools = []
  experimental = true
  go_default_packages_file = "~/.default-go-packages"
  go_download_mirror = "https://dl.google.com/go"
  go_repo = "https://github.com/golang/go"
  go_set_gopath = false
  go_set_goroot = true
  go_skip_checksum = false
  jobs = 4
  legacy_version_file = true
  legacy_version_file_disable_tools = []
  node_compile = false
  not_found_auto_install = true
  paranoid = false
  plugin_autoupdate_last_check_duration = "7d"
  python_compile = false
  python_default_packages_file = "/home/iain/.default-python-packages"
  python_pyenv_repo = "https://github.com/pyenv/pyenv.git"
  raw = false
  trusted_config_paths = []
  quiet = false
  verbose = false
  yes = false
  ci = false
  debug = false
  trace = false
  log_level = "info"
  python_venv_auto_create = false

  [status]
  missing_tools = "if_other_versions_installed"
  show_env = false
  show_tools = true

No problems found

Additional context

Output from mise i lua

[DEBUG] ARGS: /usr/local/bin/mise --verbose i lua 2
[DEBUG] Config {
    Config Files: [
        "~/.tool-versions",
        "/usr/local/.config/mise/config.toml",
    ],
}
[DEBUG] Toolset: ruby@3.2.2, tmux@3.4, python@3.10.11, rust@1.75.0, node@20.10.0, lua@5.1.5, gcloud@421.0.0, yarn@1.22, fd@9.0
downloading
/usr/local/.local/data/mise/plugins/lua/bin/download
[DEBUG] $ /usr/local/.local/data/mise/plugins/lua/bin/download 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   153  100   153    0     0    815      0 --:--:-- --:--:-- --:--:--   818
installing
/usr/local/.local/data/mise/plugins/lua/bin/install
[DEBUG] $ /usr/local/.local/data/mise/plugins/lua/bin/install 
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
[ERROR] /usr/local/.local/data/mise/plugins/lua/bin/install failed
Error: 
   0: /usr/local/.local/data/mise/plugins/lua/bin/install exited with non-zero status: exit code 2

Location:
   /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/convert/mod.rs:757

Version:
   2024.3.6 linux-x64 (4a7676e 2024-03-17)

Suggestion: Run with --verbose or MISE_VERBOSE=1 for more information.

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
roele commented 7 months ago

Most likely an issue with the plugin. Please note that mise i lua@5.1 will install 5.1 not 5.1.5. Looking at the download numbers, they indicate that download might have already failed.

A quick try on a dev container showed me following output which differs from yours.

root ➜ /workspaces/mise (main) $ target/debug/mise i lua@5.1
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  202k  100  202k    0     0  1454k      0 --:--:-- --:--:-- --:--:-- 1463k
make: *** No rule to make target 'guess'.  Stop.

Do newer versions work? What does manual invocation of the plugin scripts output?

mkdir -p /tmp/lua
cd /usr/local/.local/data/mise/plugins/lua/bin
ASDF_INSTALL_TYPE=version ASDF_INSTALL_VERSION=5.1.5 ASDF_DOWNLOAD_PATH=/tmp ./download 
ASDF_INSTALL_TYPE=version ASDF_INSTALL_VERSION=5.1.5 ASDF_INSTALL_PATH=/tmp/lua ASDF_DOWNLOAD_PATH=/tmp ./install
nulty commented 7 months ago

Thanks for checking this out.

I've run your script and it fails as yours does.

Only v5.4.* seems to work.

I see the plugin maintainer made a change a few weeks ago. I'll go checking with them.

https://github.com/Stratus3D/asdf-lua/pull/34

nulty commented 7 months ago

I'll close this now

https://github.com/Stratus3D/asdf-lua/pull/35

powerman commented 4 days ago

Please note that mise i lua@5.1 will install 5.1 not 5.1.5.

@roele What should I write in a mise.toml to have latest 5.1.x installed? lua = '5.1' result in installing 5.1, not 5.1.5.

roele commented 4 days ago

@powerman Since fuzzy matching 5.1 will not work since there is an exact match for 5.1, you should probably use a scope like lua@prefix:5.1 to install the latest 5.1.x version.