bootstrap: Don't pass Kind to some places that don't need it - #160191
bootstrap: Don't pass Kind to some places that don't need it#160191Zalathar wants to merge 3 commits into
Kind to some places that don't need it#160191Conversation
|
r? @jieyouxu rustbot has assigned @jieyouxu. Use Why was this reviewer chosen?The reviewer was selected based on:
|
There was a problem hiding this comment.
Thanks, this seems right.
I wonder if Kind was previously used to do... Kind-dependent resolution 😰
@bors r+
| // This order is important for retro-compatibility, as `starts_with` was introduced later. | ||
| p.path.ends_with(needle) || p.path.starts_with(needle) |
There was a problem hiding this comment.
Remark (unrelated to this PR): I really dislike this behavior of both prefix and postfix matching, it's a nightmare, but alas
There was a problem hiding this comment.
It makes sense that you would want both ./x test compiler and ./x test rustc_middle to test the crate compiler/rustc_middle, for example.
But yeah, selector matching is several layers of inside-out spaghetti stacked on top of each other, so it's a nightmare to touch anything at the moment.
| @@ -1,137 +1,137 @@ | |||
| --- | |||
| source: src/bootstrap/src/core/builder/cli_paths/tests.rs | |||
| expression: test --skip=tests --skip=coverage-map --skip=coverage-run --skip=library --skip=tidyselftest | |||
There was a problem hiding this comment.
I think this weirdness is because the “expression” isn't actually checked by insta, so it became stale after #159131 which changed the expression but didn't invalidate the actual snapshotted results.
|
Actually, r=me once PR CI is 🍏, just in case |
|
This pull request was unapproved. |
This comment has been minimized.
This comment has been minimized.
|
Oh interesting, does this change linkcheck skipping? 🤔 (Can't dig into this rn, but can check later) |
Given that #91965 mentions linkchecker specifically, this might be a real problem. 😿 |
|
For linkcheck I think we generally need to skip it for stage 1... 🤔 EDIT: i.e. #156792 (but I forgot to backlink to the original PR where this was discussed, argh) |
|
I think something relevant is happening in EDIT: I think it's bogus for that function to be calling |
|
Further notes:
|
|
I'm contemplating a narrower hack where we pass a two-value enum down through That's still super gross, but it might be a net improvement. |
|
Pushed an update with a hack to forcibly disable Not sure if we actually want to do this, but I figure we might as well check whether it would work. |
|
Pushed a different workaround that avoids the |
The current CLI step's
Kindwas being passed deep into some selector-matching code that doesn't seem to actually need it. It seems that the kind associated with a step'sShouldRunpaths/aliases always comes from that step, so proceeding to compare it against the step's kind later can never fail and doesn't achieve anything.As far as I can tell, this is a relic of #91965 that (due to subsequent changes) doesn't do anything useful and also doesn't make a lot of conceptual sense.
This PR therefore removes the
Kindparameter fromPathSet::check, and removes theKindfield fromTaskPath.Touching
TaskPathcauses a lot of churn in snapshot tests, but there don't seem to be any changes in actual behaviour.