Skip to content

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