-
Notifications
You must be signed in to change notification settings - Fork 59
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
How to compiletest workspace child crates? #147
Comments
Using Upd: after running cargo clean, it did work for a few times, until in a few runs it stopped working due to "Some errors occurred: E0463, E0464" (how can you even have both at the same time? i.e. crate missing and multiple matching crates) Upd: it looks like it stops working after running either |
Closing since it since to be related to #114 |
If there's a workspace and the crate
foo
being tested lives in a subfolderfoo/
, how do you compile-test it? (in a workspace, thetarget/
folder is at the workspace root) What shouldtarget_rustcflags
be set to?The only way I could make it work was with
cd foo && cargo test --target-dir ./target
(and setting flags to-L target/debug -L target/debug/deps
). But this is kind of ugly and brittle, and requires setting target-dir manually.Simply running
cargo test
from either the root folder or the crate subfolder doesn't seem to work (Can't find crate foo
). Setting link flags to-L ../target/debug
doesn't solve it either.The text was updated successfully, but these errors were encountered: