Skip to content

Let the one-rev check pass a lockfile with no git sources - #26

Merged
pathscale merged 1 commit into
masterfrom
fix/one-rev-empty-lock
Aug 20, 2026
Merged

Let the one-rev check pass a lockfile with no git sources#26
pathscale merged 1 commit into
masterfrom
fix/one-rev-empty-lock

Conversation

@pathscale

Copy link
Copy Markdown
Owner

one-rev is red on master. It is not a dependency problem: the check itself
fails when there is nothing to check.

grep exits 1 when it matches nothing, and the script runs under
set -euo pipefail, so an empty match fails the whole script. Taking the last
git dependency out of Cargo.lock (#25) is therefore what broke it. The script
that exists to police git dependencies now fails on the best possible lockfile.

The success message was also unconditional — it printed "one rev per git
source" whether or not any git source existed, which reads as a pass of a check
that never ran. It says "no git sources" in that case now.

Verified

lockfile before after
no git sources (current master) exit 1 exit 0, "no git sources"
one rev per source exit 0 exit 0, "one rev per git source"
same repo at two revs exit 1 exit 1, unchanged message

The duplicate-detection path is untouched; only the empty case and the final
message changed.

grep exits 1 when it matches nothing, and set -o pipefail turns that
into a failed check. So the moment the last git dependency went away,
the script that exists to police git dependencies started failing on the
best possible lockfile, and it went red on master.

The success message said "one rev per git source" either way, which
would have read as a pass of a check that never ran. It now says "no git
sources" when there are none.
@pathscale
pathscale merged commit 87eec6f into master Aug 20, 2026
5 checks passed
@pathscale
pathscale deleted the fix/one-rev-empty-lock branch August 20, 2026 20:22
@pathscale
pathscale restored the fix/one-rev-empty-lock branch August 25, 2026 17:48
@pathscale
pathscale deleted the fix/one-rev-empty-lock branch August 25, 2026 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant