crater
crater copied to clipboard
Add proper support for rustfix runs
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:
- [ ] Refactor the log handling to combine multiple tasks in the same log
- Ideally I'd like to run rustfix as a separate task in the dependency graph, to avoid duplicating all the modes with
$mode+rustfix
-- this way the first toolchain works the same as before, but the second toolchain also depends on a "rustfix" task
- Ideally I'd like to run rustfix as a separate task in the dependency graph, to avoid duplicating all the modes with
- [ ] Refactor the toml frobber and the directory structure to support a different
Cargo.toml
and source directory for each toolchain - [ ] Add a
rustfix
task and implement support for it like NLL runs
Unfortunately 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
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.
cc @nikomatsakis
+1 to adding a -Z
flag, seems useful. I see that @pietroalbini already implemented it (though it seems to be pending review). I don't really have a lot of insight when it comes to crater's internal workings, but I agree that trying to do something -- even something quick-n-dirty -- is probably a good idea. I imagine that a crater run is going to turn up lots of fun problems.
Well, yeah, I didn't expect to implement proper support in time for the edition preview 2. Once there is a build with the -Z
flag doing some patches on the fly on the runner should not be too hard.
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 rust_2018_preview
feature flag breaks rustfix while trying to compile serde (so almost every crate will fail).