jdx / mise

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

Error installing go dependency #2154

Closed nunofgs closed 6 months ago

nunofgs commented 6 months ago

Describe the bug I can't seem to add another Go dependency to my config. It works if I uninstall everything (mise uninstall --all) then mise install, but if I add a dependency it seems like it can't find the currently-installed Go path.

To Reproduce

  1. Create a mise config with:
[settings]
experimental = true

[tools]
go = "1.22.3"
'go:github.com/golangci/golangci-lint/cmd/golangci-lint' = 'v1.58.1'

Then run mise install. It'll work:

❯ mise install
mise go@1.22.3                    ✓ installed
mise go:github.com/golangci/golangci-lint/cmd/golangci-lint@v1.58.1 ✓ installed

Now add another Go dependency:

'go:github.com/incu6us/goimports-reviser/v3' = 'v3.6.4'

Run install again:

❯ mise install
mise failed to execute command: go install github.com/incu6us/goimports-reviser/v3@v3.6.4
mise No such file or directory (os error 2)
mise Run with --verbose or MISE_VERBOSE=1 for more information

Note: I don't have Go installed by any other means. Just this project-specific one listed on the mise config file.

❯ which go
/Users/nunofgs/.local/share/mise/installs/go/1.22.3/bin/go

Expected behavior It should install the new Go dependency.

mise doctor output

version: 2024.5.18 macos-arm64 (2024-05-19)
activated: yes
shims_on_path: no

build_info:
  Target: aarch64-apple-darwin
  Features: DEFAULT, NATIVE_TLS
  Built: Sun, 19 May 2024 23:13:48 +0000
  Rust Version: rustc 1.78.0 (9b00956e5 2024-04-29) (Homebrew)
  Profile: release

shell:
  /bin/zsh
  zsh 5.9 (x86_64-apple-darwin23.0)

dirs:
  data: ~/.local/share/mise
  config: ~/.config/mise
  cache: ~/Library/Caches/mise
  state: ~/.local/state/mise
  shims: ~/.local/share/mise/shims

config_files:
  ~/.config/mise/config.toml
  /private/tmp/repro/.mise.toml

backends:
  cargo
  core
  go
  npm
  pipx
  ubi

plugins:
  air            ssh://git@github.com/pdemagny/asdf-air#4c5826e
  bun            (core)
  deno           (core)
  erlang         (core)
  go             (core)
  golangci-lint  ssh://git@github.com/hypnoglow/asdf-golangci-lint#fee877b
  java           (core)
  mage           ssh://git@github.com/mathew-fleisch/asdf-mage.git#907e0c9
  mockery        ssh://git@github.com/cabify/asdf-mockery.git#1cb81d6
  node           (core)
  protoc         ssh://git@github.com/paxosglobal/asdf-protoc.git#a44c5cd
  protoc-gen-go  ssh://git@github.com/pbr0ck3r/asdf-protoc-gen-go.git#c3db9cc
  python         (core)
  ruby           (core)
  sqlc           ssh://git@github.com/thokra/asdf-sqlc#656b3e8
  zig            (core)

toolset:
  go@1.22.3
  go:github.com/golangci/golangci-lint/cmd/golangci-lint@v1.58.1
  go:github.com/incu6us/goimports-reviser/v3@v3.6.4  (missing)

env_vars:
  MISE_SHELL=zsh

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_default_packages_file = "/Users/nunofgs/.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 = false

No warnings found
No problems found

Additional context Add any other context about the problem here.

nunofgs commented 6 months ago

FYI, I downgraded to 2024.5.2 and everything works as expected:

curl -LO https://raw.githubusercontent.com/Homebrew/homebrew-core/991aee54e797731e3463cdf6eaf0600a8bc0b56d/Formula/m/mise.rb
brew install mise.rb
jdx commented 6 months ago

yeah I was able to repro. I created an e2e test and will patch soon.