ci(lazer): pass --locked to cargo in publisher and solana workflows - #134
Open
jayantk wants to merge 1 commit into
Open
ci(lazer): pass --locked to cargo in publisher and solana workflows#134jayantk wants to merge 1 commit into
jayantk wants to merge 1 commit into
Conversation
Without --locked, a PR with a stale Cargo.lock silently re-resolves dependencies at CI time instead of failing, which defeats the point of committing the lockfile. cargo build-sbf does not accept --locked as a top-level flag; it only forwards arguments after `--` to the inner cargo build.
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.
What
Adds
--lockedto the cargo invocations inci-lazer-publisher.ymlandci-lazer-solana.ymlthat were missing it:ci-lazer-publisher.yml: clippy, testci-lazer-solana.yml: clippy,cargo build-sbf, testWhy
Without
--locked, a PR whoseCargo.tomlhas drifted from itsCargo.locksilently re-resolves dependencies at CI time instead of failing. That defeats the purpose of committing a lockfile — CI can end up green on a dependency set that nobody reviewed, and the same build on a different day can pull different versions.ci-lazer-stellar.ymlalready did this correctly; these two workflows are now consistent with it.Note on
cargo build-sbf -- --lockedcargo-build-sbfhas its own argument parser and rejects--lockedas a top-level flag:Only arguments after
--are forwarded to the innercargo build, hence the--separator. Please keep it — "simplifying" it tocargo build-sbf --lockedwill break the job.Not changed
The three
cargo fmtsteps are left alone:cargo fmtdoes not accept--locked. Allcargo installsteps already carried the flag.Verification
Ran every changed command locally against the toolchains the jobs pin, including
cargo-build-sbf 4.1.0/platform-tools v1.54installed from the samerelease.anza.xyz/stableinstaller the workflow uses. All five exit 0, andcargo metadata --lockedconfirms both lockfiles are already in sync, so no lockfile regeneration was needed.