Skip to content

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

Conversation

fee1-dead
Copy link
Member

Helps with #86421.

@rust-highfive
Copy link
Contributor

r? @Mark-Simulacrum

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 19, 2021
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
Copy link
Member

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".

Copy link
Member Author

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.

@Mark-Simulacrum Mark-Simulacrum added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 28, 2021
@fee1-dead fee1-dead force-pushed the rustbuild-match-path-without-src branch from 469fa04 to e5e0941 Compare June 29, 2021 07:28
@fee1-dead fee1-dead force-pushed the rustbuild-match-path-without-src branch from e5e0941 to b20daab Compare June 29, 2021 10:21
@crlf0710
Copy link
Member

@fee1-dead Ping from triage. What's the status here, is this ready for review now?

@fee1-dead
Copy link
Member Author

No, this is not yet ready for review, I am waiting on @Mark-Simulacrum's response.

@Mark-Simulacrum Mark-Simulacrum added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 17, 2021
@Mark-Simulacrum
Copy link
Member

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!

@fee1-dead fee1-dead deleted the rustbuild-match-path-without-src branch April 22, 2022 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants