Repository navigation
fix(ruby): lock linux and macos platforms when running mise lock on Windows - #14529
Conversation
…indows Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Entire-Checkpoint: 01M52CCJVXBCYCYTX74RSXS7HJ
|
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; no actionable issues were found. SummaryShares Ruby lockfile code between the Unix and Windows backends. Windows hosts can now record Linux and macOS archives instead of returning empty platform details.
Reviews (1) · Last reviewed commit: "fix(ruby): lock linux and macos platform..." · Reviewed by Greptile |
Instruction countsNothing was compared, and so nothing was gated. No series appears on both sides: either the base has no measurements recorded, or the two were measured on different runner classes, which are deliberately not comparable — counts shift between machine types by more than a real regression does. New, nothing to compare against: Only instruction counts gate. Wall clock is shown for context — on identical hardware it moves 4-20% run to run. Measured by tak — instruction-counted CLI benchmarks, stored in this repository's git notes.
|
<!-- 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)
https://entire.io/gh/jdx/mise/trails/782
Follows #14520. On a Windows host,
mise lockrecorded nothing forrubyonlinux-*andmacos-*platforms, so refreshing a shared lockfile from Windows still dropped those entries andmise install --lockedfailed on them. With this change a Windows host produces the same entries a Linux host does:Windows builds compile
ruby_windows.rsinstead ofruby.rs, so the logic that picks the precompiled archive, verifies its attestation, falls back to the source tarball and computes the lock options only existed inruby.rs. That logic now lives in a newruby_lock.rsthat both files use;ruby.rsbehaves as before.Settings::ruby_compileis no longer Windows-excluded because the shared code reads it.Together with #14520 this completes #14517.
Tested: the existing
rubyunit tests pass on Linux (40), clippy with-D warningsis clean, andcargo check --lib --tests --target x86_64-pc-windows-gnucompiles. A new Windows-only unit test checks the Linux lock options and the empty Windows options from a Windows host. I could not runmise lockon a Windows machine from here.Fixes #14517.
AI-assisted — Tool: Claude Code; model: anthropic/claude-sonnet-5-5; version: unavailable.
🤖 Generated with Claude Code
Note
Medium Risk
Changes cross-platform lockfile generation and Ruby download/attestation resolution paths used during
mise lock; behavior on Unix should be a refactor, but Windows lock output for other platforms is newly exercised.Overview
Windows hosts can now write the same
rubylockfile entries for Linux and macOS that Unix hosts already produced, so refreshing a shared lockfile on Windows no longer drops non-Windows platform blocks and breaksmise install --lockedelsewhere.Lock resolution for precompiled GitHub assets, source tarballs from
cache.ruby-lang.org, attestation checks, and lock options (compile,precompiled_url, ruby-build settings, etc.) is extracted into a newruby_lockmodule compiled on all platforms. The Unixruby.rsbackend delegatesresolve_lockfile_options/resolve_lock_infoto sharedlock_options/lock_info;ruby_windows.rsdoes the same instead of returning emptyPlatformInfofor non-Windows targets.Settings::ruby_compileis no longer gated with#[cfg(not(windows))], so the shared lock path can read compile/precompiled settings when locking from Windows.A Windows-only unit test asserts Linux lock options are populated while Windows targets still get an empty options map.
Reviewed by Cursor Bugbot for commit 6bfa19a. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit