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

Enable unexpected cfg checking in all in-repo builds #6542

Closed
wants to merge 1 commit into from

Conversation

dtolnay
Copy link
Contributor

@dtolnay dtolnay commented May 7, 2024

Submitted for consideration as an alternative to #6538.

This approach relies on having build.rs in the repo, but using package.exclude in Cargo.toml to exclude build.rs from getting published to crates.io. This mitigates the concern about build scripts hurting performance too much for users. Users who build tokio as a git dependency would still get the slowdown from the build scripts, but this should be uncommon.

The benefit of this approach is to "shift left" the unexpected cfgs signal for tokio contributors. Every cargo check in the tokio repo will be checking for unexpected cfgs and reporting warnings, rather than this being something contributors see only in CI after opening a PR.

@Darksonn
Copy link
Contributor

Darksonn commented May 7, 2024

Generally I'm not a super big fan of this kind of thing. We would no longer be testing the same code as what someone who downloads Tokio from crates.io would get.

@dtolnay
Copy link
Contributor Author

dtolnay commented May 7, 2024

Okay! No problem.

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.

2 participants