Description
See also: Manishearth/compiletest-rs#238
cc @rust-lang/compiler @rust-lang/clippy @rust-lang/devtools
Currently compiletest is used by Rust in two different forms: It's used by rustc itself in rust-lang/rust as a testsuite, and it's also used by clippy via https://github.com/Manishearth/compiletest-rs/ . Compiletest-rs is used by both clippy and some proc macro libraries (like syn) for testing diagnostics.
This is suboptimal. The clippy team already primarily maintains this fork (and recently the repo owner transferred it to my account). We've been considering moving it into rust-lang, but it feels super weird for Rust to maintain multiple compiletest forks.
It would be nice if compiletest-rs could be moved out of tree. A blocker to doing this is moving libtest out of tree -- this was tried before and had problems -- but I think we might be able to move the relevant parts of libtest out of tree since compiletest really only uses the parts of libtest that handle output formatting.
I propose the following steps:
- Identify the "test output formatting" parts of libtest, put them in a separate crate, make libtest and compiletest depend on them
- Identify features in compiletest-rs that compiletest does not have (it will likely be very minor stuff -- compiletest-rs largely does not add new features), try to add them
- Move compiletest out of tree into a temporary branch on compiletest-rs
- Try to make clippy use this temporary test branch, make sure it works. Upstream any necessary fixes.
- Try to make
syn
/serde
use this temporary test branch, make sure it works. Upstream any necessary fixes. - Release this as a major version bump of compiletest-rs
- Update clippy, rustc, and syn to use this new version
I feel like this will be a win-win for everyone. The resultant repo will be able to get the maintenance efforts of the clippy team and the compiler team, and will also get polish from community crates like syn slowly turning it into a general purpose tool.