-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Rustbuild: attempt to match path without /src/* #86459
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
Rustbuild: attempt to match path without /src/* #86459
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
src/bootstrap/builder.rs
Outdated
let mut attempted_run = match_run(v, builder, &should_runs, path); | ||
if !attempted_run { | ||
// If the path is like this: compiler/rustc_data_structures/src/... | ||
// Then get rid of the src/... part and try again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of this splitting (which I don't think works ideally on e.g. src/foo paths, where we'll try to look for an empty path... I think it may be enough to add a ShouldRun::krate variant that adds each crate as a suite path instead of a set -- that would give us prefix detection "for free".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So should I change krate
and all_krates
to do this or should I add separate functions that do this? I am not sure, for the latter, what crates should use the krate_suite
variant.
469fa04
to
e5e0941
Compare
e5e0941
to
b20daab
Compare
@fee1-dead Ping from triage. What's the status here, is this ready for review now? |
No, this is not yet ready for review, I am waiting on @Mark-Simulacrum's response. |
I have done some more thinking on this and I'm going to go ahead and close #86421 for the time being at least. It seems generally useful, but it doesn't match cargo's behavior at all (i.e., there's no similar or equivalent cargo feature). That means I'm not inclined currently to add it to x.py, despite the similarity to the compiletest run-specific-file feature. Partially this is because the current proposals for trying to facilitate this don't really manage to find a good way of doing so - I suspect deeper integration with libtest would likely be the better path - and I don't feel prepared to champion that as part of rustbuild work. I would be excited to see someone start a conversation on the general topic of making test-args a little more friendly (perhaps through a test-path mechanism of some kind) -- my guess is that currently talking to T-libs who 'own' libtest is the right path. Thanks for taking a stab at an implementation though! |
Helps with #86421.