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

go backend can't install tools without "v" prefix in git repo tags #2593

Closed
rgeraskin opened this issue Sep 18, 2024 · 8 comments · Fixed by #2606
Closed

go backend can't install tools without "v" prefix in git repo tags #2593

rgeraskin opened this issue Sep 18, 2024 · 8 comments · Fixed by #2606
Labels
bug Something isn't working

Comments

@rgeraskin
Copy link
Contributor

Describe the bug
Can't install go-backend tools that don't have "v" in git repo tags

To Reproduce
mise use go:github.com/dadav/helm-schema/cmd/helm-schema@0.13.1-2

Expected behavior
helm-schema installed

mise doctor output

version: 2024.9.5 macos-arm64 (2024-09-17)
activated: yes
shims_on_path: no

build_info:
  Target: aarch64-apple-darwin
  Features: DEFAULT, NATIVE_TLS
  Built: Tue, 17 Sep 2024 13:35:49 +0000
  Rust Version: rustc 1.81.0 (eeb90cda1 2024-09-04) (Homebrew)
  Profile: release

shell:
  /bin/zsh
  zsh 5.9 (arm64-apple-darwin24.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
  ~/Projects/work/XXX/repos/helm-charts/helm-charts_master/.mise.toml

backends:
  cargo
  core
  go
  npm
  pipx
  spm
  ubi
  vfox

plugins:
  awscli        https://github.com/MetricMike/asdf-awscli.git#2e31396
  hadolint      https://github.com/devlincashman/asdf-hadolint.git#335e230
  pre-commit    https://github.com/jonathanmorley/asdf-pre-commit.git#26bfc42
  terraform     https://github.com/asdf-community/asdf-hashicorp.git#f1602b6
  terraform-ls  https://github.com/asdf-community/asdf-hashicorp.git#f1602b6
  terramate     https://github.com/martinlindner/asdf-terramate.git#61261e3
  usage         https://github.com/jdx/mise-usage.git#fe3888a

toolset:
  pre-commit@3.7.0
  hadolint@2.12.0
  usage@0.1.18
  terraform@1.9.1
  terramate@0.4.8
  python@3.12.3
  awscli@2.15.42

env_vars:
  MISE_SHELL=zsh

settings:
  activate_aggressive = false
  all_compile = false
  always_keep_download = false
  always_keep_install = false
  asdf = true
  asdf_compat = false
  cargo_binstall = true
  color = true
  disable_default_shorthands = false
  disable_hints = []
  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
  http_timeout = 30
  jobs = 4
  legacy_version_file = false
  legacy_version_file_disable_tools = []
  libgit2 = true
  node_compile = false
  not_found_auto_install = true
  paranoid = false
  pipx_uvx = false
  plugin_autoupdate_last_check_duration = "7d"
  python_default_packages_file = "~/.default-python-packages"
  python_pyenv_repo = "https://github.com/pyenv/pyenv.git"
  raw = false
  trusted_config_paths = []
  quiet = false
  use_versions_host = true
  verbose = false
  vfox = 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
1 problem found:

1. shims are missing, run mise reshim to create them
   Missing shims: hadolint

Additional context
Log:

❯ mise use go:github.com/dadav/helm-schema/cmd/helm-schema@0.13.1-2
go: github.com/dadav/helm-schema/cmd/helm-schema@v0.13.1-2: github.com/dadav/helm-schema/cmd/helm-schema@v0.13.1-2: invalid version: unknown revision cmd/helm-schema/v0.13.1-2
mise go failed
go: github.com/dadav/helm-schema/cmd/helm-schema@v0.13.1-2: github.com/dadav/helm-schema/cmd/helm-schema@v0.13.1-2: invalid version: unknown revision cmd/helm-schema/v0.13.1-2
mise go exited with non-zero status: exit code 1
mise Run with --verbose or MISE_VERBOSE=1 for more information

go install github.com/dadav/helm-schema/cmd/helm-schema@0.13.1-2 works fine

@rgeraskin rgeraskin added the bug Something isn't working label Sep 18, 2024
@roele
Copy link
Contributor

roele commented Sep 18, 2024

Relates to #1753 and #2085

@roele
Copy link
Contributor

roele commented Sep 24, 2024

@jdx guess this can be closed (forgot to mention issue in the PR)

@sgtsquiggs
Copy link

sgtsquiggs commented Sep 24, 2024

This now breaks any existing configuration that was using v in their mise config w/ go backend: #2634

@jdx jdx closed this as completed Sep 25, 2024
@davepgreene
Copy link

Fyi this also breaks installs using latest.

@roele
Copy link
Contributor

roele commented Oct 15, 2024

@davepgreene Do you have an example?

The following seems to work fine for modules which have a v prefix. Modules without v prefix also don't resolve when using mise latest which might be the cause of what you're seeing.

[tools]
"go:github.com/DarthSim/hivemind" = "latest"

@davepgreene
Copy link

Yep that's exactly what I'm seeing (and meant when I was saying "using latest" but I misphrased it)

❯ mise use -g go:github.com/mrtazz/checkmake/cmd/checkmake@latest
go: invalid github.com import path "github.com/mrtazz"
go: invalid github.com import path "github.com"
mise WARN  No versions found for go:github.com/mrtazz/checkmake/cmd/checkmake
mise WARN  No versions found for go:github.com/mrtazz/checkmake/cmd/checkmake
mise WARN  No versions found for go:github.com/mrtazz/checkmake/cmd/checkmake
go: github.com/mrtazz/checkmake/cmd/checkmake@vlatest: github.com/mrtazz/checkmake/cmd/checkmake@vlatest: invalid version: unknown revision vlatest
mise ERROR go failed
go: github.com/mrtazz/checkmake/cmd/checkmake@vlatest: github.com/mrtazz/checkmake/cmd/checkmake@vlatest: invalid version: unknown revision vlatest
mise WARN  Failed to install, trying again without added 'v' prefix
mise go:github.com/mrtazz/checkmake/cmd/checkmake@latest ✓ installed
mise ~/.config/mise/config.toml tools: go:github.com/mrtazz/checkmake/cmd/checkmake@latest

That adds the following line to the tools section in my ~/.config/mise/config.toml

"go:github.com/mrtazz/checkmake/cmd/checkmake" = "latest"

@roele
Copy link
Contributor

roele commented Oct 15, 2024

By definition versions of a go module start with a v as stated in https://go.dev/ref/mod#versions. The fix in this issue is rather an ugly hack to get those invalid modules installed regardless. mise is using go list -m -versions -json <module> (see https://go.dev/ref/mod#go-list-m) behind the scenes get the versions of a module. This command does not seem to support versions without prefix and a workaround is not known to my knowledge.

@davepgreene
Copy link

davepgreene commented Oct 15, 2024

That's true but if you recall go install isn't focused specifically on modules as such but allowing tag or ref resolution for binary installation. For example:

❯ go install -x github.com/mrtazz/checkmake/cmd/checkmake@latest                                                                       1.23.2
# get https://proxy.golang.org/github.com/@v/list
# get https://proxy.golang.org/github.com/mrtazz/checkmake/cmd/checkmake/@v/list
# get https://proxy.golang.org/github.com/mrtazz/checkmake/@v/list
# get https://proxy.golang.org/github.com/mrtazz/@v/list
# get https://proxy.golang.org/github.com/mrtazz/checkmake/cmd/@v/list
# get https://proxy.golang.org/github.com/mrtazz/@v/list: 404 Not Found (0.013s)
# get https://proxy.golang.org/github.com/mrtazz/checkmake/cmd/checkmake/@v/list: 404 Not Found (0.014s)
# get https://proxy.golang.org/github.com/@v/list: 404 Not Found (0.014s)
# get https://proxy.golang.org/github.com/mrtazz/checkmake/cmd/@v/list: 404 Not Found (0.014s)
# get https://proxy.golang.org/github.com/mrtazz/checkmake/@v/list: 200 OK (0.014s)
# get https://proxy.golang.org/github.com/mrtazz/checkmake/@latest
# get https://proxy.golang.org/github.com/mrtazz/checkmake/@latest: 200 OK (0.009s)
WORK=/tmp/go-build101671154
mkdir -p $WORK/b001/
cat >/tmp/go-build101671154/b001/importcfg.link << 'EOF' # internal
packagefile github.com/mrtazz/checkmake/cmd/checkmake=/home/dgreene/.cache/go-build/77/77dd0eef2b058c022a701854da75a44793e0f98b5d180e19b1d426f4adf8bc29-d
packagefile fmt=/home/dgreene/.cache/go-build/ac/ac2d1de410b1c6d7fe69307174f74cd32500f44ba177fd73ee023a03f5d13f99-d
packagefile github.com/docopt/docopt-go=/home/dgreene/.cache/go-build/b6/b60383c85c87de662060b738c8e088a3b68914537c4d55589744e9668c39395b-d
packagefile github.com/mrtazz/checkmake/config=/home/dgreene/.cache/go-build/94/94a647fc0aa6e363e281ae64ba6a54cb75982b41c441c0c1e49671cc263eff39-d
packagefile github.com/mrtazz/checkmake/formatters=/home/dgreene/.cache/go-build/cd/cd5e27965d042c5395d581f39f5bcb9ff046efb47f3a389901a8929d0859fece-d
packagefile github.com/mrtazz/checkmake/logger=/home/dgreene/.cache/go-build/7b/7b68b5cd1dc595dfbf61c403bec4e8f06e008f7332a29a463efe4dddb18ae760-d
packagefile github.com/mrtazz/checkmake/parser=/home/dgreene/.cache/go-build/24/24cb637bdb2fce13b8dc82ba85f6b5981ac46b670ffa0cce2debacc1c4732cd0-d
packagefile github.com/mrtazz/checkmake/rules=/home/dgreene/.cache/go-build/1d/1d4440e05dfe2ea35c5c8650f7e6a8974e9af1ae54b4876d036f9122d5add3ab-d
packagefile github.com/mrtazz/checkmake/validator=/home/dgreene/.cache/go-build/49/49070c21f3e6943e5ae1dcd710e916b95b64439d2355e3ac3a3ed649567d27df-d
packagefile github.com/olekukonko/tablewriter=/home/dgreene/.cache/go-build/27/2722720a44c0b6d18d201bcb2242bba5bbcef264489f131984d30931f6f8b66c-d
packagefile io=/home/dgreene/.cache/go-build/65/65c8bc30c4d9d8c0ec0f606212a970944648c341107cf65ad82a72173e6dac22-d
packagefile log=/home/dgreene/.cache/go-build/c9/c9673da1028cfeead312c1de68b334bb4e9c9fe15d44116dcb65197b9669d002-d
packagefile os=/home/dgreene/.cache/go-build/8b/8b92449c66092fb81aa1019cb19a45b347601b847c81406b2096d6e8dc0b55b9-d
packagefile runtime=/home/dgreene/.cache/go-build/18/18cd32b0ea57951a406105170e29dc49e0c722993dfe4a09ec5db17caeaf8655-d
packagefile errors=/home/dgreene/.cache/go-build/1c/1c3d686a723e8d2bf121fb660b420bcb7eb0172b7857119a14b11f36e9c62288-d
packagefile internal/fmtsort=/home/dgreene/.cache/go-build/cb/cb41931eb5fbc18d9902611bb1930e3625ddd61fa5cd2036d90891e0f2ac70be-d
packagefile math=/home/dgreene/.cache/go-build/ae/ae281d1077cddda4ec036b44fe5e5535d148f5a6794225e6c76180c91c98ac03-d
packagefile reflect=/home/dgreene/.cache/go-build/c5/c57ab101e990309fbde95c18523bc8d5296b5e96405725abf26c3eff40196d5c-d
packagefile slices=/home/dgreene/.cache/go-build/34/34043a267e82840637383fb9fb76f0ff62ffb37ac2eb8c9ff866fddc891e4370-d
packagefile strconv=/home/dgreene/.cache/go-build/d1/d102a4675516aae0f933dde2d273dce2d6a33a13379b05fa1be53c4c77e1dc33-d
packagefile sync=/home/dgreene/.cache/go-build/9d/9d95b69a3a8d00851e42f790b85296fb77baedf54fb1254af94006b947c3c535-d
packagefile unicode/utf8=/home/dgreene/.cache/go-build/7f/7f5de739a2c30a2c8cac95e6313107c86a49a7bb46de75555d2a81900274f1bd-d
packagefile regexp=/home/dgreene/.cache/go-build/11/119b50dccebc8fae9f66f25b0f0d215ff85e2234556cefe76e732916cdae2dbe-d
packagefile strings=/home/dgreene/.cache/go-build/4b/4bfe9589c844c88f14e26d4aa0ac533a9200936387d85da898a6308c23660398-d
packagefile unicode=/home/dgreene/.cache/go-build/76/769b7766d67b4c2a6e6ad87bb4f32563531a6b475b5684ff14b3df967a52be6e-d
packagefile github.com/go-ini/ini=/home/dgreene/.cache/go-build/21/216c843f2bc45e5d3572c9ea049f4aaee73e0a26f9426d444eeb04e2ba3aa689-d
packagefile text/template=/home/dgreene/.cache/go-build/55/551fd5903b24461204b52b4b7fc269396baac23167d0f19108ea7e82f5efa9aa-d
packagefile bufio=/home/dgreene/.cache/go-build/73/734213a00bb85d558929f13068c919e1bef2d37cea54fb3d3afb2734011164f4-d
packagefile github.com/mrtazz/checkmake/rules/maxbodylength=/home/dgreene/.cache/go-build/bb/bb3e801e1589e1511fab88f8732cd2128b2a1a81a00db2818b312baab6ca36a0-d
packagefile github.com/mrtazz/checkmake/rules/minphony=/home/dgreene/.cache/go-build/5c/5c78e16755b2a1ee1a0810bd786b402e7a30525b42bdc81990c7073459fcf44b-d
packagefile github.com/mrtazz/checkmake/rules/phonydeclared=/home/dgreene/.cache/go-build/72/7232ba41b59623f415b1162baeb92ba4e87d16727d49abfde607ed50c549d507-d
packagefile github.com/mrtazz/checkmake/rules/timestampexpanded=/home/dgreene/.cache/go-build/c5/c5d4a14d54ba483ceef465e9463d93cb85b1b251fa3d99f044a3ad0885942ac6-d
packagefile encoding/csv=/home/dgreene/.cache/go-build/b6/b659e8bb5abd920742f5145b0ee9f51d49f6068a0b19f0a2c576b7f53ced125a-d
packagefile log/internal=/home/dgreene/.cache/go-build/c2/c2d6332ee793baa27a74d249c611e38554c7b02019b9bdccdf86f2dc82afa127-d
packagefile sync/atomic=/home/dgreene/.cache/go-build/f7/f75ad5e639567cb3dcf7fce51280678483fe9e5997155ee6fc92ae115c71114c-d
packagefile time=/home/dgreene/.cache/go-build/e7/e7b6596747861b26035362c49823e30636f78b5480b0105517291bc7332616f3-d
packagefile internal/bytealg=/home/dgreene/.cache/go-build/5e/5e8bb2ccc18ce5312c294c97f9e6ea8c9c415ae5415951751613302ee694636f-d
packagefile internal/byteorder=/home/dgreene/.cache/go-build/d1/d10be292e40aadd1ebb15dced26243a0119dff8838e75230b7fc282e751b9b62-d
packagefile internal/filepathlite=/home/dgreene/.cache/go-build/ea/ea56b3ec0e993d738efeaa2a2022ffd06f640b49b3a3af02c734b270cf830cf4-d
packagefile internal/goarch=/home/dgreene/.cache/go-build/f8/f83f0c6d29c82ecaf042bd6ed472408d04f98e1608b0d9eebfbda2a6c1bdc272-d
packagefile internal/itoa=/home/dgreene/.cache/go-build/d0/d0fde7fec6f166992f7a8c67e55c96ae28bf079f93e3bc51c8cbf25a533b9f03-d
packagefile internal/poll=/home/dgreene/.cache/go-build/89/89b4d1282d28636644b5c41347bc18fc4bd93fae0115b9912a89f124aa4ac7d0-d
packagefile internal/stringslite=/home/dgreene/.cache/go-build/75/75b1fe0762b19ce05358ac36905a3dc1d6309ebe28f4f71b869bb39f088769b7-d
packagefile internal/syscall/execenv=/home/dgreene/.cache/go-build/61/614359a65d6ce84e6febb3da962f7c4b5c4a451490eb109600ae700edec6c679-d
packagefile internal/syscall/unix=/home/dgreene/.cache/go-build/f0/f020edce1c163f2fe639528c781f58b636d3332ed59ac58c813eb835da5dab37-d
packagefile internal/testlog=/home/dgreene/.cache/go-build/dc/dcdb5ba09e034a42da3d630559bf0776d03a9b9cf20ebb9c02a7d1c1074f9ed2-d
packagefile io/fs=/home/dgreene/.cache/go-build/d7/d7f5f03f4ceb23670ff159d9e05a3c261c1510645e1abe5af41de02d3bd90495-d
packagefile syscall=/home/dgreene/.cache/go-build/dc/dc7ae26c57eda4d54cf0471502878c0d0bec99bd8c6bd054832bb380518ecd96-d
packagefile internal/abi=/home/dgreene/.cache/go-build/17/17edb8a484a0f308b1d6b726758d894d4799c4f813a6feb76051fe5976390fe9-d
packagefile internal/chacha8rand=/home/dgreene/.cache/go-build/fa/fae1f695c9010a9a8a21ad233ea097782f877f1aac6dcf2939b2d5398fa5e338-d
packagefile internal/coverage/rtcov=/home/dgreene/.cache/go-build/ea/ea46b51a7f340e553e6ef9ebc653e4509be5eabc25788d8b6145f2d7ac72659b-d
packagefile internal/cpu=/home/dgreene/.cache/go-build/7d/7da00d1324b4717a82aed707ec609940f04a569bee78380719876818ed6340b4-d
packagefile internal/godebugs=/home/dgreene/.cache/go-build/44/4419ab90e9bca4ab4d59e46ab851b39bb4a2f50eed0c8412c71c05f99172024d-d
packagefile internal/goexperiment=/home/dgreene/.cache/go-build/04/04753429b3e38a362739e2729de8c6f7999c91e416f40c6adef814851a9edf89-d
packagefile internal/goos=/home/dgreene/.cache/go-build/7f/7f0e8aa9e92d423d6f49b41c50bb9f4cbf92503a97c69a42baed2eccc157499d-d
packagefile internal/profilerecord=/home/dgreene/.cache/go-build/c9/c9db384e1be309532aeead261a09526d62143df3cd36b51c19e7dcb55460d1ae-d
packagefile internal/runtime/atomic=/home/dgreene/.cache/go-build/50/50c4cc4c9fed761632738d825095632f6e4aee70db8fcad2684f698fe777ed3a-d
packagefile internal/runtime/exithook=/home/dgreene/.cache/go-build/e2/e25745b4fd2abd8946864e4e5a135684b25198503309ee05e7e32a9a35275d35-d
packagefile internal/runtime/syscall=/home/dgreene/.cache/go-build/8d/8d8aed0b7bdeaf67d8df55d4be7dca5418a1e527504d86a511b929c52e1a6f60-d
packagefile runtime/internal/math=/home/dgreene/.cache/go-build/a7/a77ca40e2845d494ee3a27d775f87bc72f1afa089b1238231d5327b6f34ce2fc-d
packagefile runtime/internal/sys=/home/dgreene/.cache/go-build/a6/a6a03b5dc9fdeba07674bd325b448ead21e54466df8a85e485443f430d3172e7-d
packagefile internal/reflectlite=/home/dgreene/.cache/go-build/f5/f544fb96f3b93fc2866814e786d36d19cac7e2bc689e826d273060a6bc8988b5-d
packagefile cmp=/home/dgreene/.cache/go-build/70/703784d9b60dea6b530821953401d13b4acacfecd01a4b1c93d829deeb7c9fa8-d
packagefile math/bits=/home/dgreene/.cache/go-build/3c/3cafd6bdd8cc12a899fd5f8f72f757652c0d0dd64d7f5a299fdc6ad3151a65d9-d
packagefile internal/unsafeheader=/home/dgreene/.cache/go-build/92/92c99dddd5d4f049bd6797b23ad55a75a12650b3b03d2b0a662910e3a950dba2-d
packagefile iter=/home/dgreene/.cache/go-build/c6/c67dc866b5b656783aa74ab6d8cc790a715c1f96a9546dc2271ebf07608be9a5-d
packagefile internal/race=/home/dgreene/.cache/go-build/b6/b651c5df43f8d5d2007e73b6554f8e083181f943b0b1f29a81107851d0d83441-d
packagefile bytes=/home/dgreene/.cache/go-build/55/55bb2d59f08fbf6688397d7b95beaa3d209888a6efce2550c3f33cf554c714b8-d
packagefile regexp/syntax=/home/dgreene/.cache/go-build/fa/fadf022c922a65f82c8dfe13b2547f2374a43c3bf793b5024803ac491e3f7e17-d
packagefile net/url=/home/dgreene/.cache/go-build/db/db272d2a4a5a34d2ed08edd732dbdb22d22658462f138b1ca2241214969d6b9d-d
packagefile path=/home/dgreene/.cache/go-build/65/65bb3a4fdd37b0e9a30e9b87555a162601ef502d7664b570858fe7840eb4f7a2-d
packagefile path/filepath=/home/dgreene/.cache/go-build/79/79a9ddbafc1d080d687efee073c858a9eeab8b85bd0481d2ef63444c1c6e8f79-d
packagefile text/template/parse=/home/dgreene/.cache/go-build/be/be0337dd9d2cc3e642a6de38622667748fbe33941d76578949e5b6399b9d9072-d
packagefile internal/godebug=/home/dgreene/.cache/go-build/8e/8ec6a83983c62efa388e579eb26a26778cd946c1cccc9a3aa7d59d938d3fbd94-d
packagefile internal/oserror=/home/dgreene/.cache/go-build/39/39ca7b937926f7a429b1e86cd7cb9d7de40dbb34561ee04ab4076d842408c088-d
packagefile internal/asan=/home/dgreene/.cache/go-build/9b/9bf8033b575c23cbc9fde96b691a033eaf198f65a5a93bd8510de54e6d0572e8-d
packagefile internal/msan=/home/dgreene/.cache/go-build/84/84f8758393f8d2c3fe8ba5dfd3e85ad9f543b46fe7b53e4cbab5d51e22b2a21d-d
packagefile sort=/home/dgreene/.cache/go-build/2c/2cdeb6ea5f17f41bb5a3b5b5de2b822f0d688077fde05d1de2824e89ed176f90-d
packagefile internal/bisect=/home/dgreene/.cache/go-build/56/56dc7b84e7dd9bfca5fc0161d26348cfe6ab742f5d46cd2cd6d742dc7679d15d-d
modinfo "0w\xaf\f\x92t\b\x02A\xe1\xc1\a\xe6\xd6\x18\xe6path\tgithub.com/mrtazz/checkmake/cmd/checkmake\nmod\tgithub.com/mrtazz/checkmake\tv0.0.0-20230817110936-bd26d7905e47\th1:rmQ0hKeAdGpokOFKiETzNz/rBo3hKbYk8o40ILnASj8=\ndep\tgithub.com/docopt/docopt-go\tv0.0.0-20141128170934-854c423c8108\th1:WJse1njqIlgvQjtOPAALBLhopGR+FKKo9OjxT7Sb6s0=\ndep\tgithub.com/go-ini/ini\tv1.11.0\th1:EDp2zFK6TR11mvDrWDask1bXLBUgqbIqG4R6Lq3EoKI=\ndep\tgithub.com/olekukonko/tablewriter\tv0.0.0-20150822215231-b9346ac189c5\th1:ZxRrPRTX45eVRfhXfZUgH1MG173pWRdOMFsnJoTaxwU=\nbuild\t-buildmode=exe\nbuild\t-compiler=gc\nbuild\tDefaultGODEBUG=asynctimerchan=1,gotypesalias=0,httplaxcontentlength=1,httpmuxgo121=1,httpservecontentkeepheaders=1,netedns0=0,panicnil=1,tls10server=1,tls3des=1,tlskyber=0,tlsrsakex=1,tlsunsafeekm=1,winreadlinkvolume=0,winsymlink=0,x509keypairleaf=0,x509negativeserial=1\nbuild\tCGO_ENABLED=1\nbuild\tCGO_CFLAGS=\nbuild\tCGO_CPPFLAGS=\nbuild\tCGO_CXXFLAGS=\nbuild\tCGO_LDFLAGS=\nbuild\tGOARCH=amd64\nbuild\tGOOS=linux\nbuild\tGOAMD64=v1\n\xf92C1\x86\x18 r\x00\x82B\x10A\x16\xd8\xf2"
EOF
mkdir -p $WORK/b001/exe/
cd .
GOROOT='/home/dgreene/.local/share/mise/installs/go/1.23.2' /home/dgreene/.local/share/mise/installs/go/1.23.2/pkg/tool/linux_amd64/link -o $WORK/b001/exe/a.out -importcfg $WORK/b001/importcfg.link -X=runtime.godebugDefault=asynctimerchan=1,gotypesalias=0,httplaxcontentlength=1,httpmuxgo121=1,httpservecontentkeepheaders=1,netedns0=0,panicnil=1,tls10server=1,tls3des=1,tlskyber=0,tlsrsakex=1,tlsunsafeekm=1,winreadlinkvolume=0,winsymlink=0,x509keypairleaf=0,x509negativeserial=1 -buildmode=exe -buildid=SkJB4i8aHFAGx9s-P8Qr/rYc0fqyQ31coYgvWpjJF/byhF5yJWQa0tgRxj0q7e/SkJB4i8aHFAGx9s-P8Qr -extld=gcc /home/dgreene/.cache/go-build/77/77dd0eef2b058c022a701854da75a44793e0f98b5d180e19b1d426f4adf8bc29-d
/home/dgreene/.local/share/mise/installs/go/1.23.2/pkg/tool/linux_amd64/buildid -w $WORK/b001/exe/a.out # internal
mkdir -p /home/dgreene/.local/share/mise/installs/go/1.23.2/bin/
mv $WORK/b001/exe/a.out /home/dgreene/.local/share/mise/installs/go/1.23.2/bin/checkmake
rm -rf $WORK/b001/
❯ which checkmake
/home/dgreene/.local/share/mise/installs/go/1.23.2/bin/checkmake

I figure based on this discussion that mise does something quite different under the hood but I just want to put out there that go's tooling does support installing a binary using @latest.

Edit: so I took a look at how the go backend works and most of the warnings are just from the version resolution stuff. The thing that's actually causing a failure is the swapping in and out of the v prefix by trimming it here: https://github.com/jdx/mise/blob/main/src/backend/go.rs#L67 and then re-adding it here: https://github.com/jdx/mise/blob/main/src/backend/go.rs#L82.

Anyway, probably worth filing a separate ticket for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants