Fix multiple-installs false positives for asdf and mise shims - #408
Draft
gtsiolis wants to merge 2 commits into
Draft
Fix multiple-installs false positives for asdf and mise shims#408gtsiolis wants to merge 2 commits into
gtsiolis wants to merge 2 commits into
Conversation
Member
Author
Contributor
|
@gtsiolis thanks, didn't know about this. I thought we were fine deduping symlinks 😄 |
gtsiolis
force-pushed
the
devx-1015-multiple-installs-warning-false-positives-on-asdf-shim-npm
branch
from
July 27, 2026 07:08
4f50e57 to
2eb1a75
Compare
gtsiolis
force-pushed
the
devx-1015-multiple-installs-warning-false-positives-on-asdf-shim-npm
branch
from
July 27, 2026 12:49
2eb1a75 to
111b373
Compare
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
gtsiolis
force-pushed
the
devx-1015-multiple-installs-warning-false-positives-on-asdf-shim-npm
branch
from
July 28, 2026 07:11
111b373 to
a0a392c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
lstk warns about "multiple installs" whenever a version-manager shim and the install it dispatches to are both reachable on PATH, even though they are the same install — a false positive that fires on every run.
~/.local/share/mise/shims/lstkand~/.local/share/mise/installs/<tool>/<version>/lstkboth land on PATH. A mise shim is a bare symlink to themisebinary itself (argv[0] dispatch, no metadata), so neither symlink dedup nor content parsing can relate it to its install.Changes
internal/update/installs_unix.go) by parsing the# asdf-plugin: <name> <version>comment asdf writes into each shim, before dedup runs inFindInstalls(internal/update/installs.go)shims/dir that symlink-resolves to an executable not namedlstkis aliased to the first PATH candidate under the siblinginstalls/tree — the same check mise itself uses to recognize its shims (is_active_mise_shim), no hardcoded tool names. A shim with no backing install on PATH (pure shim mode + e.g. a homebrew lstk) still counts, so genuine conflicts keep warning.executableAliason Windows (installs_windows.go); mise's Windows.exe-copy shims are a known gap left out of scopeTestFindInstallsDeduplicatesAsdfShimAlias,TestFindInstallsDeduplicatesMiseShimAlias,TestFindInstallsKeepsMiseShimWithoutBackingInstallOnPathand integration testsTestUpdateCheckDoesNotWarnOnAsdfShimAlias,TestUpdateCheckDoesNotWarnOnMiseShimAliasKnown limitation: mise resolves the shim's dispatch target per-invocation from its config, so a hand-pinned stale
installs/<tool>/<old-version>PATH entry diverged from the configured version is deduped rather than warned. Inherent to any heuristic that doesn't execute mise; documented in the code.Review
Human review advised — user-facing behavior with a teammate-reported case (Daniel's mise setup), and the dispatcher heuristic deserves a second pair of eyes.
Tests
New unit + integration tests reproduce both false positives and confirm they're resolved. Also verified against real installs: asdf + npm on this machine, and a real
mise use github:localstack/lstkinstall (dual shim + PATH mode) that reproduced Daniel's warning byte-for-byte with released v0.18.0 and is silent with this branch, while a mise shim + separate binary install still warns.Closes DEVX-1015
Co-Authored-By: Claude noreply@anthropic.com