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

Use more consistent progress messages in bootstrap #106303

Merged
merged 2 commits into from
Dec 31, 2022

Conversation

jyn514
Copy link
Member

@jyn514 jyn514 commented Dec 30, 2022

Based on #106271 for convenience, but I can make it independent if you like.
This makes test look the same as clean.

Before:

Cleaning stage0 rustc artifacts (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu): {rustc_query_impl} 
Testing ["rustc_interface"] stage0 (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu)

After:

Cleaning {rustc_query_impl} stage0 rustc artifacts (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu)
Testing {rustc_interface} stage0 (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu)

Note there is a slight consistency between build and test: The
former doesn't print "compiler artifacts". It would be annoying to fix
and doesn't hurt anything, so I left it be.

; x t rustc_interface --stage 0 --dry-run
Testing {rustc_interface} stage0 (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu)
; x b rustc_interface --stage 0 --dry-run
Building {rustc_interface} stage0 compiler artifacts (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu)

r? @Mark-Simulacrum

Previously, clean only supported `--stage 0` for specific crates.

The new `crate_description` function generates a string that looks
like
```
: {rustc_query_impl}
```
@rustbot rustbot added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 30, 2022
Copy link
Member

@Mark-Simulacrum Mark-Simulacrum left a comment

Choose a reason for hiding this comment

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

r=me

src/bootstrap/compile.rs Show resolved Hide resolved
descr.push_str(", ");
descr.push_str(krate.as_ref());
}
descr.push('}');
Copy link
Member

Choose a reason for hiding this comment

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

FWIW, this seems like it could be near-identically replicated with https://doc.rust-lang.org/nightly/std/fmt/struct.DebugSet.html, at the cost of {"rustc_interface"} rather than {rustc_interface}.

But 🤷 either way -- the implementation is pretty simple.

Copy link
Member Author

Choose a reason for hiding this comment

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

all the fmt::Debug* types only work inside a fmt::Debug impl unfortunately, since we need access to a fmt::Formatter 😞 and at that point it doesn't make the code much shorter.

@jyn514 jyn514 added S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 30, 2022
Before:
```
Testing ["rustc_interface"] stage0 (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu)
```

After:
```
Testing {rustc_interface} stage0 (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu)
```

Note there is a slight consistency between `build` and `test`: The
former doesn't print "compiler artifacts". It would be annoying to fix
and doesn't hurt anything, so I left it be.

```
; x t rustc_interface --stage 0 --dry-run
Testing {rustc_interface} stage0 (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu)
; x b rustc_interface --stage 0 --dry-run
Building {rustc_interface} stage0 compiler artifacts (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu)
```
@jyn514
Copy link
Member Author

jyn514 commented Dec 30, 2022

@bors r=Mark-Simulacrum rollup

I wish bors had a way to add descriptions to the rollup queue :/ but - in case anyone making rollups sees it, this PR also includes #106271.

@bors
Copy link
Contributor

bors commented Dec 30, 2022

📌 Commit c8c849e has been approved by Mark-Simulacrum

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-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. labels Dec 30, 2022
@jyn514
Copy link
Member Author

jyn514 commented Dec 30, 2022

@bors r-

going to be merged in #106305

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Dec 30, 2022
jyn514 added a commit to jyn514/rust that referenced this pull request Dec 30, 2022
 bootstrap: Get rid of tail_args in stream_cargo

Based on rust-lang#106303 for convenience.

r? `@Mark-Simulacrum`
jyn514 added a commit to jyn514/rust that referenced this pull request Dec 31, 2022
 bootstrap: Get rid of tail_args in stream_cargo

Based on rust-lang#106303 for convenience.

r? ``@Mark-Simulacrum``
jyn514 added a commit to jyn514/rust that referenced this pull request Dec 31, 2022
 bootstrap: Get rid of tail_args in stream_cargo

Based on rust-lang#106303 for convenience.

r? ```@Mark-Simulacrum```
compiler-errors added a commit to compiler-errors/rust that referenced this pull request Dec 31, 2022
 bootstrap: Get rid of tail_args in stream_cargo

Based on rust-lang#106303 for convenience.

r? ````@Mark-Simulacrum````
@bors bors merged commit c8c849e into rust-lang:master Dec 31, 2022
@rustbot rustbot added this to the 1.68.0 milestone Dec 31, 2022
@jyn514 jyn514 deleted the consistent-progress branch February 25, 2023 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

4 participants