fix(boom-tools): pass --locked to cargo-binstall#488
Open
sksat (sksat) wants to merge 1 commit into
Open
Conversation
cargo-binstall falls back to building from source (cargo install) when binary resolution fails, e.g. on network timeouts of the QuickInstall / GitHub fetchers. Without --locked, the fallback build resolves the latest semver-compatible transitive dependencies, which nowadays pulls in edition 2024 crates (e.g. clap_derive 4.6.1, time-macros 0.2.27) that the pinned Rust 1.81.0 toolchain cannot even parse, so the fallback always fails with 'failed to parse manifest'. With --locked, the fallback build uses each crate's bundled Cargo.lock, making it reproducible and buildable with the pinned toolchain. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR addresses intermittent pytest CI failures occurring during c2a-boom-tools preinstall by making source-build fallback via cargo-binstall reproducible under the repository’s pinned Rust toolchain (1.81.0), even when binfetch fails and cargo install is used.
Changes:
- Add
--lockedto allcargo-binstallinvocations in boom-tools install scripts to ensure Cargo.lock is respected during fallback source builds. - Apply the same change to both
mobcandsubobcexample environments to keep behavior consistent.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| examples/subobc/boom-tools/install.sh | Pass --locked to each cargo-binstall install to stabilize fallback source builds in CI. |
| examples/mobc/boom-tools/install.sh | Mirror the same --locked additions to keep installation behavior aligned with subobc. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
概要
pytest CI が稀に setup 段階で落ちる flake の修正その 1。boom-tools の
install.shで cargo-binstall に--lockedを渡す。背景・原因
直近の pytest 失敗 2 件(main の run、PR の run)はいずれも同一パターンで、テスト本体ではなく
c2a-boom-toolspreinstall での失敗だった:WARN resolve: Timeout reached while checking fetcher ...: deadline has elapsedになるcargo install tmtc-c2a --version 1.1.1のソースビルドに fallback する--lockedがないため推移的依存が最新で解決され、edition 2024 の crate(6/9 は clap_derive 4.6.1 = MSRV 1.85、6/10 は time-macros 0.2.27 = MSRV 1.88)を引いてしまうfailed to parse manifestで確実に失敗するつまり「タイムアウト(確率的)× fallback ビルドが現在は必ず失敗(決定的)」の合せ技。昔は fallback でも(遅いだけで)ビルドが通っていたが、edition 2024 crate の普及で fallback = 即死になり顕在化した。
修正
--lockedを渡すと、fallback のcargo installが各 crate 同梱の Cargo.lock を使うため、pin された toolchain で再現性のあるビルドになる。プレビルドバイナリが取得できる通常パスの挙動は変わらない。mobc / subobc の install.sh は同一内容なので両方に適用した。
なお、fallback 自体を避けるためのバイナリキャッシュ導入は別 PR で行う(そちらと本 PR は install.sh で軽微に conflict するため、先にマージされた方に追従して rebase する)。
🤖 Generated with Claude Code