fix(install): apply precompiled options to all platforms in lockfile#8396
fix(install): apply precompiled options to all platforms in lockfile#8396
Conversation
Previously, `resolve_lockfile_options` only included precompiled settings (flavor, arch, os) for the current/host platform. This caused `mise lock` to split the host platform into a separate `[[tools.python]]` entry since its options differed from non-host platforms. Apply precompiled options uniformly to all platforms so they share a single lockfile entry. The `compile` option remains host-only since compiling from source is inherently platform-specific. Fixes #8390 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses an issue where Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request correctly addresses the issue of precompiled options causing split lockfile entries by applying them to all platforms. The changes in node.rs and python.rs effectively remove the is_current_platform guard, ensuring consistent options across platforms for precompiled builds.
I've added a couple of suggestions to improve the code's efficiency and idiomaticity by changing how Option values are handled. These are minor improvements but contribute to better code maintainability.
| if let Some(flavor) = settings.node.flavor.clone() { | ||
| opts.insert("flavor".to_string(), flavor); | ||
| } |
There was a problem hiding this comment.
While the current implementation is correct, it can be made slightly more efficient and idiomatic by borrowing instead of cloning the Option. This avoids cloning the Option itself and only clones the inner String when it's present.
| if let Some(flavor) = settings.node.flavor.clone() { | |
| opts.insert("flavor".to_string(), flavor); | |
| } | |
| if let Some(flavor) = &settings.node.flavor { | |
| opts.insert("flavor".to_string(), flavor.clone()); | |
| } |
Greptile SummaryThis PR correctly fixes the lockfile entry splitting issue by removing Key changes:
The fix correctly addresses the root cause: Confidence Score: 5/5
Important Files Changed
Last reviewed commit: 8adfeee |
Hyperfine Performance
|
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.2.23 x -- echo |
27.2 ± 0.5 | 26.2 | 33.5 | 1.00 |
mise x -- echo |
30.9 ± 0.8 | 28.7 | 37.4 | 1.14 ± 0.04 |
x -- echo is 14% |
mise env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.2.23 env |
25.1 ± 1.1 | 24.0 | 39.8 | 1.00 |
mise env |
29.1 ± 1.1 | 27.7 | 45.7 | 1.16 ± 0.07 |
env is 16% |
mise hook-env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.2.23 hook-env |
26.5 ± 1.0 | 25.1 | 41.9 | 1.00 |
mise hook-env |
30.1 ± 0.6 | 28.6 | 32.2 | 1.14 ± 0.05 |
hook-env is 14% |
mise ls
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.2.23 ls |
23.5 ± 0.4 | 22.5 | 25.3 | 1.00 |
mise ls |
24.0 ± 1.2 | 22.7 | 35.3 | 1.02 ± 0.06 |
xtasks/test/perf
| Command | mise-2026.2.23 | mise | Variance |
|---|---|---|---|
| install (cached) | 162ms | 164ms | -1% |
| ls (cached) | 91ms | 93ms | -2% |
| bin-paths (cached) | 95ms | 98ms | -3% |
| task-ls (cached) | 838ms | 832ms | +0% |
### 🚀 Features - **(hooks)** add task references to hooks and watch_files by @jdx in [#8400](#8400) - **(prepare)** add git-submodule built-in provider by @jdx in [#8407](#8407) - **(prepare)** add human-readable stale reasons to prepare output by @jdx in [#8408](#8408) - **(prepare)** add dependency ordering to prepare steps by @jdx in [#8401](#8401) - **(prepare)** add --explain flag for provider diagnostics by @jdx in [#8409](#8409) - **(prepare)** add per-provider timeout support by @jdx in [#8405](#8405) - **(prepare)** add blake3 content-hash freshness checking by @jdx in [#8404](#8404) - **(tasks)** monorepo vars and per-task vars by @halms in [#8248](#8248) ### 🐛 Bug Fixes - **(aqua)** restore bin_paths disk cache with fresh_file invalidation by @jdx in [#8398](#8398) - **(idiomatic)** use generic parser for idiomatic files by @risu729 in [#8171](#8171) - **(install)** apply precompiled options to all platforms in lockfile by @jdx in [#8396](#8396) - **(install)** normalize "v" prefix when matching lockfile versions by @jdx in [#8413](#8413) - **(prepare)** improve git submodule parser and fix check_staleness error handling by @jdx in [#8412](#8412) - **(python)** respect precompiled settings in lock file generation by @jdx in [#8399](#8399) - **(python)** clarify uv_venv_auto docs + prevent uv shim recursion in venv creation by @halms in [#8402](#8402) - **(task)** remove deprecated `# mise` task header syntax by @jdx in [#8403](#8403) - **(vfox)** avoid eager metadata loading during config file detection by @jdx in [#8397](#8397) - clarify GitHub attestations to be artifact ones by @scop in [#8394](#8394) - ignore comments in idiomatic version files by @iloveitaly in [#7682](#7682) ### 🚜 Refactor - unify archive detection by @risu729 in [#8137](#8137) ### 📚 Documentation - remove duplicated docs for npm.package_manager by @risu729 in [#8414](#8414)
Summary
mise locksplitting host platform into a separate[[tools.python]]entry whenprecompiled_flavoror similar settings are configuredprecompiled_flavor,precompiled_arch,precompiled_os) uniformly to all platforms inresolve_lockfile_optionsinstead of only the current/host platformnode.flavorThe root cause was that
resolve_lockfile_optionsgated precompiled settings behindis_current_platform, producing different options for host vs non-host platforms. Sinceset_platform_infogroups entries by(version, options), mismatched options caused the host platform to get its own separate entry.Fixes #8390
Test plan
mise lockwithpython.precompiled_flavorset and verify a single[[tools.python]]entry is producedmise lockwithout any precompiled settings and verify behavior is unchangedmise lockwithpython.compile=trueand verify the compile entry is still separate (expected, since compiling is platform-specific)🤖 Generated with Claude Code
Note
Medium Risk
Changes how
resolve_lockfile_optionsis computed fornodeandpython, which can alter generated lockfiles and potentially which binaries are selected during cross-platform installs. Scope is limited to lockfile option metadata and keepscompileplatform-specific.Overview
Prevents
mise lockfrom generating separate host-only tool entries when platform-specific settings are configured.For
python, precompiled selectors (precompiled_arch,precompiled_os,precompiled_flavor) are now written into lockfile options for all targets (when not compiling) rather than only the current platform. Fornode,flavoris likewise applied to all targets so lockfile entries stay grouped by(version, options)instead of splitting per host vs non-host platform.Written by Cursor Bugbot for commit 8adfeee. This will update automatically on new commits. Configure here.