fix: install cross with --locked to stop crates.io MSRV drift breaking releases - #32
Merged
Merged
Conversation
…g releases
The release-rust job started failing on main with:
rustc 1.85.1 is not supported by the following packages:
home@0.5.12 requires rustc 1.88
textwrap@0.16.3 requires rustc 1.90
Nothing changed on our side. `cargo install cross` without --locked
discards the lockfile cross was published with and re-resolves its
dependencies to the newest semver-compatible versions on crates.io.
Those crates raised their MSRV above the toolchain pinned in this job,
so the step breaks purely as a function of what crates.io published.
Re-running cannot help - it is deterministic, not flaky.
cross 0.2.5's own Cargo.lock pins home 0.5.3 and textwrap 0.15.0, both
well within 1.85, so --locked removes the dependency on ecosystem state.
Also fixes `targets:` -> `target:` on setup-rust-toolchain. The action
had been rejecting it with "Unexpected input(s) 'targets'" and silently
installing no target; masked so far because cross builds inside Docker
and does not need the target on the host.
Note this path is unreachable from PR CI: ci.yml runs only on
pull_request and release.yml only on push to main, so changes to the
release workflow are first executed at merge time.
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.
Fixes the
Releaseworkflow failure onmain(run 34709569942), which failed in bothrelease-rustmatrix jobs at the Install cross step.Root cause
cargo install crosswithout--lockeddiscards the lockfile cross was published with and re-resolves its dependencies to the newest semver-compatible versions on crates.io. Those crates have since raised their MSRV above the1.85toolchain pinned in this job.Nothing changed on our side — crates.io did. The failure is deterministic, not flaky, so re-running the job cannot clear it.
Why CI was green on the PR
ci.ymlpull_requestonlyrelease.ymlpush: branches: [main]onlyrelease.ymlcannot run on a pull request, andci.yml'srustjob never invokescross(the onlycargo install crossin the repo is inrelease.yml). The failing path was structurally unreachable before merge — #31 was green because nothing exercised it.This also means the breakage was not caused by #31. It would have hit the next release regardless, once those crates published.
Fix
cargo install cross --locked. Verified against the published crate rather than assuming —cross 0.2.5's ownCargo.lockpins:home0.5.3 (not 0.5.12)textwrap0.15.0 (not 0.16.3)Both comfortably within 1.85, and
edition = "2021"needs only 1.56+.--lockedremoves this step's dependency on current ecosystem state.Also fixed
targets:→target:onsetup-rust-toolchain. The action was rejecting it withUnexpected input(s) 'targets'and silently installing no target. Masked until now becausecrosscompiles inside Docker and does not need the target on the host.Verification
release.ymlparses as valid YAML.cargo installunder.github/.Follow-ups (not in this PR)
release.ymlis untestable pre-merge.workflow_dispatchwould fix that, but it also makes a workflow that uploads release assets, pushes to GHCR and Cosign-signs manually triggerable — worth a deliberate decision.rust-toolchain.tomllists onlyx86_64-unknown-linux-musl, no aarch64, which is inconsistent with the new arm64 matrix. Harmless today only becausecrossbuilds in containers.