Skip to content

Suggest/Talk about --all-targets and feature gating #19

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

Closed
Mark-Simulacrum opened this issue Jun 7, 2018 · 4 comments
Closed

Suggest/Talk about --all-targets and feature gating #19

Mark-Simulacrum opened this issue Jun 7, 2018 · 4 comments
Assignees
Labels
Milestone

Comments

@Mark-Simulacrum
Copy link
Member

See rust-lang/rust#51208 (comment); copying:

So --all-targets seems to work great. Feature handling is harder, but since rustfix supports incremental migration that's fine, for crates with non-mutually exclusive features, cargo +nightly fix --prepare-for 2018 -- --all-targets --no-default-features and cargo +nightly fix --prepare-for 2018 --allow-dirty -- --all-targets --all-features should be sufficient to migrate.

If exclusive features are present users need to run with --feature blah and then --features baz. For the alpha release that seems sufficient; we might want rustfix to automatically do this with some flag, but I don't think that's very feasible due to exclusionary feature groups.

We should update the migration docs.

@Mark-Simulacrum
Copy link
Member Author

@nikomatsakis suggested that we also ask users to provide feedback about the feature patterns beyond all/none that they use.

@alexcrichton
Copy link
Member

One question that I think would be worth considering is whether to enable this sort of behavior by default as well, as

cargo +nightly fix --prepare-for 2018 --allow-dirty -- --all-targets --all-features 

is pretty wordy!

@Mark-Simulacrum
Copy link
Member Author

--all-features is also not technically enough, as you might have features which enable/disable functionality when enabled/disabled, e.g. something like a std feature which is on by default but when disabled you'll see alloc or core imports, for example

@Centril
Copy link
Contributor

Centril commented Aug 3, 2018

Closing since #70 rendered this moot.

@Centril Centril closed this as completed Aug 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants