mise lock silently drops all platform checksums/URLs when resolved options gain a key not yet in the lockfile
#10564
Unanswered
zeitlinger
asked this question in
Troubleshooting and bug reports
Replies: 2 comments 5 replies
-
|
@risu729 can you take a look? |
Beta Was this translation helpful? Give feedback.
5 replies
-
|
Opened follow-up PR #10918: #10918 #10710 fixed the empty-options to non-empty-options migration. This follow-up covers the remaining case where an existing non-empty option map is a strict subset of newly resolved options, such as Java EA shorthand moving from This comment was generated by an AI coding assistant. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
mise lockproduces a duplicate[[tools.java]]entry — one with the existing platform checksums/URLs (emptyoptions) and one fresh entry with[tools.java.options] shorthand_vendor = "openjdk"(and no platform info). A subsequentmise lockinvocation prunes the original entry as "stale", leaving the lockfile withcore:javapinned to a version but with zero platform checksums or URLs.mise install --lockedon any platform then breaks.The root cause looks to be the dedup key in
merge_tool_entriesatsrc/lockfile.rs:1894:When mise's java resolution starts attaching
shorthand_vendor = "openjdk"to a tool that previously had no options stored in the lockfile, the new and old entries get different keys, so they don't merge — instead they coexist briefly, and the next prune cycle keeps the "fresh" (empty-platforms) one and drops the platforms-only one.Reproduction
mise.toml:Lockfile that has been around for a while already contains the java entry with all 5 platform checksums/URLs and no
[tools.java.options]block.After this run
mise.lockcontains two[[tools.java]]entries:The second invocation of
mise lockthen prunes the first entry (because the resolved tool now reports options, so the entry without options is "stale"), leaving:No platform info.
mise install --lockedon linux/x64 fails becauselinux-x64is not in the lockfile.Mise version
2026.6.12 linux-x64Why I think this is a bug
The dedup key includes
options, but the platform info is keyed on(version, platform)and is identical regardless of whether resolution attachedshorthand_vendor = "openjdk". When mise gains a new option that didn't used to round-trip through the lockfile, every existing lockfile silently loses all platform data on the nextmise lock.Suggested directions
merge_tool_entriesinsensitive tooptionskeys that are purely informational / derivable (or always merge by(version,)and union the option maps).options, merge platforms from the existing entry into the new one rather than spawning a sibling.(version,)is being dropped — fail loudly instead of silently producing a useless lockfile.Happy to send a PR if you can confirm the preferred direction.
Related
#10563 — separate bug (npm backend tool drops out of toolset when
npmCLI absent). Same end-user symptom (broken lockfile aftermise lock) but different code path.Beta Was this translation helpful? Give feedback.
All reactions