Skip to content

fix(ci): show real current version in duplicate-deps error message - #955

Open
lucasmcdonald3 wants to merge 1 commit into
mainlinefrom
rust-fix-duplicate-deps-message
Open

fix(ci): show real current version in duplicate-deps error message#955
lucasmcdonald3 wants to merge 1 commit into
mainlinefrom
rust-fix-duplicate-deps-message

Conversation

@lucasmcdonald3

Copy link
Copy Markdown
Contributor

Issue #, if available:

N/A

Description of changes:

Fixes the error message emitted by the Check for duplicate aws-lc-sys / aws-lc-fips-sys step in rust_duplicate_deps.yml.

When a duplicate is found, the step prints a suggested diff for the offending Cargo.toml. It parsed the "current" version from the output of grep -n, which still carries the N: line-number prefix, so grep -oE '[0-9][0-9.]+' | head -1 grabbed the line number instead of the version. A dependency on line 18 was reported as aws-lc-sys = "18" rather than its real version. The prefix is now stripped before reading the version, so the message shows the actual current version.

Same fix as the companion PRs in aws-cryptographic-material-providers-library and aws-database-encryption-sdk-dynamodb, which share this workflow.

Squash/merge commit message, if applicable:

(dafny/java/python/dotnet/go/rust): 

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

The duplicate aws-lc check parsed the current version from the output of
grep -n, which still carries the "N:" line-number prefix, so a dep on
line 18 was reported as aws-lc-sys = "18" instead of its real version.
Strip the prefix before reading the version.
@lucasmcdonald3
lucasmcdonald3 requested a review from a team as a code owner September 1, 2026 20:56
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