Skip to content

fix(boom-tools): pass --locked to cargo-binstall#488

Open
sksat (sksat) wants to merge 1 commit into
mainfrom
fix/boom-tools-binstall-locked
Open

fix(boom-tools): pass --locked to cargo-binstall#488
sksat (sksat) wants to merge 1 commit into
mainfrom
fix/boom-tools-binstall-locked

Conversation

@sksat

Copy link
Copy Markdown
Member

概要

pytest CI が稀に setup 段階で落ちる flake の修正その 1。boom-tools の install.sh で cargo-binstall に --locked を渡す。

背景・原因

直近の pytest 失敗 2 件(main の runPR の run)はいずれも同一パターンで、テスト本体ではなく c2a-boom-tools preinstall での失敗だった:

  1. cargo-binstall の fetcher (QuickInstall / GitHub) がネットワーク不調で WARN resolve: Timeout reached while checking fetcher ...: deadline has elapsed になる
  2. binstall が「プレビルドバイナリなし」と判断し、cargo install tmtc-c2a --version 1.1.1ソースビルドに fallback する
  3. --locked がないため推移的依存が最新で解決され、edition 2024 の crate(6/9 は clap_derive 4.6.1 = MSRV 1.85、6/10 は time-macros 0.2.27 = MSRV 1.88)を引いてしまう
  4. リポジトリは Rust 1.81.0 に pin されているため、cargo が manifest をパースできず 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

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>
Copilot AI review requested due to automatic review settings June 10, 2026 12:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 --locked to all cargo-binstall invocations in boom-tools install scripts to ensure Cargo.lock is respected during fallback source builds.
  • Apply the same change to both mobc and subobc example 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants