Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix occasional failure to generate rustdoc when RUSTFLAGS="-Dwarnings". #643

Merged
merged 2 commits into from
Jan 26, 2024

Conversation

obi1kenobi
Copy link
Owner

@obi1kenobi obi1kenobi commented Jan 26, 2024

Generating rustdoc JSON for a crate also involves checking that crate's dependencies. The check is done by rustc, not rustdoc, so it's subject to RUSTFLAGS not RUSTDOCFLAGS. We don't want rustc to fail that check if the user has set RUSTFLAGS="-Dwarnings" here.

We resolve this by appending --cap-lints=allow to RUSTFLAGS, which thankfully overrides prior lint-related commands like -Dwarnings.

Fixes: #589

@obi1kenobi obi1kenobi changed the title Reproduce #589. Fix occasional failure to generate rustdoc when RUSTFLAGS="-Dwarnings". Jan 26, 2024
@obi1kenobi obi1kenobi marked this pull request as ready for review January 26, 2024 17:30
@obi1kenobi obi1kenobi merged commit 7d80a7d into main Jan 26, 2024
34 checks passed
@obi1kenobi obi1kenobi deleted the set_cap_lints_in_rustflags branch January 26, 2024 17:31
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.

Failure to generate rustdoc when RUSTFLAGS env var sets -Dwarnings
1 participant