Skip to content

Update RUSTFLAGS warning to suggest CARGO_BUILD_RUSTFLAGS#2252

Merged
leighmcculloch merged 1 commit into
mainfrom
update-rustflags-warning
Oct 13, 2025
Merged

Update RUSTFLAGS warning to suggest CARGO_BUILD_RUSTFLAGS#2252
leighmcculloch merged 1 commit into
mainfrom
update-rustflags-warning

Conversation

@leighmcculloch
Copy link
Copy Markdown
Member

@leighmcculloch leighmcculloch commented Oct 13, 2025

What

Update the warning message when RUSTFLAGS is set to suggest using CARGO_BUILD_RUSTFLAGS instead, which the CLI can merge with remapping.

Why

When users set RUSTFLAGS, dependency path remapping is disabled because the CLI cannot merge remapping with RUSTFLAGS. However, CARGO_BUILD_RUSTFLAGS supports merging, so the warning should guide users to use that instead to maintain reproducible builds.

Came across this myself where I wanted to set RUSTFLAGS but the warning warned me not to. I just happened to remember that we added support for merging with the CARGO_BUILD_RUSTFLAGS, but that's some serioues tribal knowledge. The CLI should help someone move forward with using custom flags.

Known limitations

N/A

Modify the warning message when RUSTFLAGS is set to recommend using
CARGO_BUILD_RUSTFLAGS instead, which the CLI can merge with remapping.
@leighmcculloch leighmcculloch requested a review from a team as a code owner October 13, 2025 13:20
@github-project-automation github-project-automation Bot moved this to Backlog (Not Ready) in DevX Oct 13, 2025
@leighmcculloch leighmcculloch requested a review from fnando October 13, 2025 13:21
@leighmcculloch leighmcculloch enabled auto-merge (squash) October 13, 2025 13:39
@leighmcculloch leighmcculloch merged commit 0628884 into main Oct 13, 2025
29 checks passed
@leighmcculloch leighmcculloch deleted the update-rustflags-warning branch October 13, 2025 16:34
@github-project-automation github-project-automation Bot moved this from Backlog (Not Ready) to Done in DevX Oct 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants