Repository navigation
fix(rust): restore the components a toolchain's profile requires - #14525
Conversation
Co-authored-by: Taku Kodama <79110363+risu729@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. π βΉοΈ Recent review info
π Walkthrough
Merge Risk: βͺ Minimal Β· up to
|
[Medium impact] The PR appears safe to merge. SummaryRestores missing Rust profile components and distinguishes the hostβs standard library from cross-target copies.
Reviews (3) Β· Last reviewed commit: "test(rust): list the host components fro..." Β· Reviewed by Greptile |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
<!-- entire-trail-link-start --> https://entire.io/gh/jdx/mise/trails/781 <!-- entire-trail-link-end --> ### π Features - **(bootstrap)** template repo url and ref, add clone options by @jdx in [#14548](#14548) - **(ls-remote)** list every version range of a registry tool by @jdx in [#14544](#14544) - **(registry)** let one backend carry different options per version range by @jdx in [#14543](#14543) - **(vfox)** allow a headers table in the PreInstall result by @jdx in [#14531](#14531) ### π Bug Fixes - **(ci)** install zipsign with --locked by @fang2hou in [#14551](#14551) - **(github)** install each version with its own request options by @JamBalaya56562 in [#14537](#14537) - **(hooks)** run task hooks with mise instead of the initiating tool shim by @jdx in [#14550](#14550) - **(install)** keep lockfile resolution when a linked version doesn't match the request by @jdx in [#14539](#14539) - **(java)** skip the catalog fetch when installing a locked build by @jdx in [#14534](#14534) - **(lock)** keep other platforms' option variants when mise link rewrites mise.lock by @jdx in [#14519](#14519) - **(ruby)** lock windows platforms when running mise lock on Windows by @jdx in [#14520](#14520) - **(ruby)** lock linux and macos platforms when running mise lock on Windows by @jdx in [#14529](#14529) - **(rust)** restore the components a toolchain's profile requires by @JamBalaya56562 in [#14525](#14525) - **(shim)** keep task lazy tool shims when a task installs another tool by @jdx in [#14533](#14533) - **(task)** avoid deadlock when parallel tasks install the same tool by @jdx in [#14536](#14536) - **(watch)** exit quietly when watchexec is interrupted with Ctrl+C by @jdx in [#14541](#14541) ### π Documentation - say OpenTelemetry export and spinel installs need experimental by @ZainnQureshii in [#14552](#14552) ###βοΈ Revert - Revert "chore(deps): pin zipsign-api to 0.2.1" by @jdx in [baafe33](baafe33) ### π¦οΈ Dependency Updates - pin zipsign-api to 0.2.1 by @jdx in [6d1bd25](6d1bd25) - rerun providers when mise recreates the venv by @halms in [#14532](#14532) ### π¦ Registry - prefer signed xcsift releases and enable Linux by @jdx in [#14540](#14540) - install protoc-gen-connect-go v2 from its /v2 module path by @jdx in [#14545](#14545) ### Chore - **(release)** pin zipsign install to 0.2.1 by @jdx in [d5ef6f9](d5ef6f9) ### Security - **(config)** ignore [settings] from untrusted project configs by @jdx in [#14538](#14538) ### New Contributors - @ZainnQureshii made their first contribution in [#14552](#14552) - @fang2hou made their first contribution in [#14551](#14551)
mise installchecks that an existing Rust toolchain still has the components its profile installed, but it only checkeddefault'sclippy,rust-docsandrustfmt. Ifcargo,rustcor the host'srust-stdwent missing, mise reported the toolchain as installed and left it broken:mise installnow treatscargo,rust-stdandrustcas required for theminimalanddefaultprofiles, alongsidedefault's three, and passes any missing ones to rustup as--component.A component now counts only for the toolchain's own host when that host is known, read from its
rustc-<triple>component, sincerustconly exists for the host. Before, a component with any target suffix counted, so a cross target'srust-std-wasm32-unknown-unknownwould have satisfied the host'srust-std. Whenrustcitself is missing, the host is unknown and any target suffix still counts as before. The toolchain is reinstalled anyway, becauserustcis missing.This takes over #12816 by @risu729, which pr-closer closed after 7 days without contributor activity. They are credited as co-author. Its profile-alias part has since merged as #14220. Its open CodeRabbit Major was that a failed
rustup show active-toolchainleft the host unset and then accepted only unsuffixed names, so a toolchain would be reinstalled on every run. Taking the host from the installedrustcinstead needs no extra rustup call, and an unknown host falls back to the old matching.rust-mingw, which theminimalprofile also installs onwindows-gnuhosts, is left out.Validation
rust:1container,rust = { version = "1.81.0", profile = "minimal" }, thenrustup component remove --toolchain 1.81.0 cargo rust-std:mise install rust --dry-run-codereportsalready installed,mise installleaves onlyrustc-x86_64-unknown-linux-gnu, andcargodoes not run.would install,mise installrestorescargo-x86_64-unknown-linux-gnuandrust-std-x86_64-unknown-linux-gnu, andmise exec -- cargo --versionprintscargo 1.81.0.e2e/core/test_rust_components_reconcilegains that case with the host'scargoandrust-stdremoved and a cross target'srust-stdleft behind. Its fake rustup now gives a new toolchain the host-suffixedcargo,rust-stdandrustc, as rustup does. It fails with the released binary and passes with this branch.plugins::core::rusttests pass.cargo clippy --workspace --all-features --all-targets -- -D warningspasses.AI-assisted β Tool: Claude Code; model: anthropic/claude-opus-5-5; version: unavailable.
π€ Generated with Claude Code
Summary by CodeRabbit
mise installnow ensures Rust toolchains have the components required by their configured profile, including host components even when cross-target components are installed.