Skip to content
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

maintain the given order on step execution #127602

Merged
merged 1 commit into from
Jul 17, 2024

Conversation

onur-ozkan
Copy link
Member

Previously step execution disregarded the CLI order and this change executes the given steps in the order specified on CLI.

For example, running x $kind a b c will execute $kind step for a, then b, then c crates in the specified order.

Fixes #126165
cc @matthiaskrgr

@rustbot
Copy link
Collaborator

rustbot commented Jul 11, 2024

r? @Kobzol

rustbot has assigned @Kobzol.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Jul 11, 2024
@rust-log-analyzer

This comment has been minimized.

@onur-ozkan
Copy link
Member Author

I will re-work on this later again.

@rustbot author

@rustbot rustbot 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 Jul 11, 2024
@onur-ozkan onur-ozkan force-pushed the calling-order branch 3 times, most recently from 104e3f6 to 774af29 Compare July 16, 2024 16:59
@onur-ozkan
Copy link
Member Author

Simplified the solution without refactoring the entire internals about path resolution (which was the case initially).

@rustbot ready

@rustbot rustbot 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 16, 2024
@Kobzol
Copy link
Contributor

Kobzol commented Jul 17, 2024

I'm a bit confused by the original issue. It used x test A B as an example, but most tests should be handled by this, and thus they should already be handled in the original order. Is there an example of a different command where order is important, but which is not handled by the suite logic?

@onur-ozkan
Copy link
Member Author

It used x test A B as an example, but most tests should be handled by this, and thus they should already be handled in the original order.

That's not quite right. The logic below handles the step executions most of the time. The one you linked is supposed to handle specific test paths (like tests/something/test.rs).

To debug the ordering, you can run this command:

x test clippy miri bootstrap rustdoc sysroot --dry-run | grep Testing

and compare the CLI order to the executed steps.

@Kobzol
Copy link
Contributor

Kobzol commented Jul 17, 2024

Ah, I see, thanks. I guess that I usually run specific test paths, so I didn't think of this. I'll test it locally.

Copy link
Contributor

@Kobzol Kobzol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the first time I actually saw dry run being useful :) However it was in the mode where it was enabled manually (--dry-run), I'd still get rid of the double execution of all steps 😆

src/bootstrap/src/core/builder.rs Show resolved Hide resolved
Previously step execution disregarded the CLI order and this change executes the given
steps in the order specified on CLI.

For example, running `x $kind a b c` will execute `$kind` step for `a`, then `b`, then `c` crates
in the specified order.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
@onur-ozkan
Copy link
Member Author

@bors r=Kobzol

@bors
Copy link
Contributor

bors commented Jul 17, 2024

📌 Commit 4ad753a has been approved by Kobzol

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 17, 2024
@bors
Copy link
Contributor

bors commented Jul 17, 2024

⌛ Testing commit 4ad753a with merge 3de0a7c...

@bors
Copy link
Contributor

bors commented Jul 17, 2024

☀️ Test successful - checks-actions
Approved by: Kobzol
Pushing 3de0a7c to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 17, 2024
@bors bors merged commit 3de0a7c into rust-lang:master Jul 17, 2024
7 checks passed
@rustbot rustbot added this to the 1.81.0 milestone Jul 17, 2024
@onur-ozkan onur-ozkan deleted the calling-order branch July 17, 2024 14:27
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (3de0a7c): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

This benchmark run did not return any relevant results for this metric.

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 768.259s -> 768.642s (0.05%)
Artifact size: 328.63 MiB -> 328.71 MiB (0.02%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bootstrap: x.py test specified test order not honored
7 participants