-
Notifications
You must be signed in to change notification settings - Fork 90
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
Add proper support for rustfix runs #282
Comments
Note that currently I believe we need to edit not just Cargo.toml but the root files (lib.rs, main.rs) to insert the preview feature gate. That's likely quite hard to get right; we might want an alternative like a -Z flag. |
+1 to adding a |
Well, yeah, I didn't expect to implement proper support in time for the edition preview 2. Once there is a build with the |
Add the -Zfeature=foo unstable rustc option This PR adds a new unstable option to `rustc`: `-Zfeature=foo`. The option can be used to enable nightly features from the CLI, and it's meant to be used by tools like Crater to try enabling features without changing the crate's source code. The exact reason I need this is to implement "edition runs" in Crater: we need to add the preview feature flag to every crate, and editing the crates' source code on the fly might produce unexpected results, while a compiler flag is more reliable. Obviously this won't be stabilized in the future. cc rust-lang/crater#282 @Mark-Simulacrum
Add the -Zcrate-attr=foo unstable rustc option This PR adds a new unstable option to `rustc`: `-Zcrate-attr=foo`. The option can be used to inject crate-level attributes from the CLI, and it's meant to be used by tools like Crater that needs to add their own attributes to a crate without changing the source code. The exact reason I need this is to implement "edition runs" in Crater: we need to add the preview feature flag to every crate, and editing the crates' source code on the fly might produce unexpected results, while a compiler flag is more reliable. cc rust-lang/crater#282 @Mark-Simulacrum
Add the -Zcrate-attr=foo unstable rustc option This PR adds a new unstable option to `rustc`: `-Zcrate-attr=foo`. The option can be used to inject crate-level attributes from the CLI, and it's meant to be used by tools like Crater that needs to add their own attributes to a crate without changing the source code. The exact reason I need this is to implement "edition runs" in Crater: we need to add the preview feature flag to every crate, and editing the crates' source code on the fly might produce unexpected results, while a compiler flag is more reliable. cc rust-lang/crater#282 @Mark-Simulacrum
I left some notes to run rustfix runs with the temporary branch. It's not possible to run them at the moment since enabling the |
As far as I understood, we want to execute Crater runs between a nightly and the same nightly with rustfix and the edition enabled, as part of the Rust 2018 preparation. Is this right?
We can surely do this in an hackish way (by doing a quick and dirty patch on the runner), but we should also add proper support for the long term (as we did with NLL runs). My implementation plan:
$mode+rustfix
-- this way the first toolchain works the same as before, but the second toolchain also depends on a "rustfix" taskCargo.toml
and source directory for each toolchainrustfix
task and implement support for it like NLL runsUnfortunately properly implementing this is going to take time, and I probably won't have time to do everything before the second edition preview (we could as always implement a quick one-time patch and apply it on one of the runners, executing it manually).
cc @Mark-Simulacrum @Centril @aturon
The text was updated successfully, but these errors were encountered: