Skip to content

Rollup of 12 pull requests #145406

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

Closed
wants to merge 43 commits into from
Closed

Conversation

Kobzol
Copy link
Member

@Kobzol Kobzol commented Aug 14, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

fneddy and others added 30 commits July 30, 2025 13:53
The tests fail on s390x and presumably other big-endian systems,
due to print of raw values and padding bytes.

To fix the tests remove the raw output values in the error note
with `normalize-stderr`.
When operating on expressions, `cfg_select!` can now handle expressions
without braces. (It still requires braces for other things, such as
items.)

Expand the test coverage and documentation accordingly.
So that it is easier to see which was the last started step when a failure happens on CI.
When verbose mode is enabled, it is very hard to see the actually executed steps.
They could easily get out of sync and miss some fields. Now all steps are instrumented automatically.
Useful for optimizing the sequencing of the compiler's own build.
shepmaster and others added 13 commits August 14, 2025 12:50
…rors

Include whitespace in "remove |" suggestion and make it hidden

Tweak error rendering of patterns with an extra `|` on either end.

Built on rust-lang#137409. Only last commit is relevant.

? `@compiler-errors`
…_bad, r=compiler-errors

Fix test intrinsic-raw_eq-const-bad for big-endian

The test fails on s390x and presumably other big-endian systems, due to print of raw values. To fix the tests remove the raw output values in the error note with normalize-stderr.
…ieyouxu

Rehome 37 `tests/ui/issues/` tests to other subdirectories under `tests/ui/`

Part of rust-lang#133895

Methodology:

1. Refer to the previously written `tests/ui/SUMMARY.md`
2. Find an appropriate category for the test, using the original issue thread and the test contents.
3. Add the issue URL at the bottom (not at the top, as that would mess up stderr line numbers)
4. Rename the tests to make their purpose clearer

Inspired by the methodology that ``@Kivooeo`` was using.

r? ``@jieyouxu``
…eyouxu

cfg_select: Support unbraced expressions

Tracking issue for `cfg_select`: rust-lang#115585

When operating on expressions, `cfg_select!` can now handle expressions
without braces. (It still requires braces for other things, such as
items.)

Expand the test coverage and documentation accordingly.

---

I'm not sure whether deciding to extend `cfg_select!` in this way is T-lang or T-libs-api. I've labeled for both, with the request that both teams don't block on each other. :)
Improve tracing in bootstrap

I was annoyed that bootstrap had like 5 separate ways of debugging/tracing/profiling, and it was hard for me to understand how are individual steps executed. This PR tries to unify severla things behind `BOOTSTRAP_TRACING`, and improve tracing/profiling in general:
- All generated tracing outputs are now stored in a single directory to make it easier to examine them, plus bootstrap prepares a `latest` symlink to the latest generated tracing output directory for convenience.
- All executed spans are now logged automatically (without requiring usage of `#[tracing::instrument]`).
- A custom span/event formatter was implemented, to provide domain-specific output (like location of executed commands or spans) and hopefully also to reduce visual clutter.
  - `tracing_forest` was removed. While it did some useful postprocessing, it didn't expose enough information for making the dynamic step spans work.
- You can now explicitly log steps (`STEP=info`) and/or commands (`COMMAND=info`), to have more granular control over what gets logged.
- `print-step-timings` also show when a step starts its execution (not just when it ends it), so that when some step fails in CI, we can actually see what step it was (before we would only see the end of the previous step).
- The rustc-dev-guide page on debugging/profiling bootstrap was updated.

There are still some things that work outside of tracing (`print-step-timings` and `dump-bootstrap-shims`), but I think that for now this improvement is good enough.

I removed the `> step`, `< step` verbose output, because I found it unusable, as verbose bootstrap output also enables verbose Cargo output, and then you simply drown in too much data, and because I think that the new tracing system makes it obsolete (although it does require recompilation with the `tracing` feature). If you want to keep it, happy to revert 690c781. And the information about cached steps is now also shown in the Graphviz step dependency graph.

We can modify the tracing output however we want, as we now implement it ourselves. Notably, we could also show exit logs for step spans, currently I only show enter spans. Maybe creating indents for each executed nested command is also not needed. Happy to hear feedback!

Some further improvements could be to print step durations, if we decide to also log step exit events. We could also try to enable tracing in CI logs, but it might be too verbose.

Best reviewed commit-by-commit.

r? `@jieyouxu`

CC `@Shourya742`
…ouxu

Rename and document `ONLY_HOSTS` in bootstrap

Everytime I examined the `ONLY_HOSTS` flag of bootstrap steps, I was utterly confused. Why is it called ONLY_HOSTS? How does the fact that it is skipped if `--target` is passed, but `--host` is not (which was not accurate) help me?

The reality of the flag is that if it is true, the targets for which the given Step will be built is determined based on the `--host` flag, while if it is false, it is determined based on the `--target` flag, that's pretty much it. The previous comment was just a (not very helpful and not even accurate) corollary of that.

I clarified the comment, and also renamed the flag to `IS_HOST` (happy to brainstorm better names, but the doc. comment change is IMO the main improvement).

r? `@jieyouxu`
bootstrap: Fix jemalloc 64K page support for aarch64 tools

Resolves rust-lang#133748

The prior page size fix only targeted the compile build step, not the tools step: rust-lang#135081

Also note that since `miri` always uses jemalloc, I didn't copy the `builder.config.jemalloc(target)` check to the tools section.

Tested by running `strings` on the compiled `miri` binary to see the LG_PAGE value.

Before:

```
> strings miri | grep '^LG_PAGE'
LG_PAGE 14
```

After:

```
> strings miri | grep '^LG_PAGE'
LG_PAGE 16
```

May also need a separate fix for the standalone miri repository: rust-lang/miri#4514 (likely a change needed in miri-script?)
…jieyouxu

bootstrap: Support passing `--timings` to cargo

Useful for optimizing the sequencing of the compiler's own build.
…yUwU

Rust documentation, use `rustc-dev-guide` :3

reviving rust-lang#145385 but on my own fork this time

r? `@BoxyUwU`
…er, r=petrochenkov

Use `default_field_values` in `Resolver`

Change `Resolver` to use `feature(default_field_values)`. This change is non-exhaustive, as fields may have been added since I made this commit, and `Fx(Index/Hash)(Map/Set)` types would need to have a `const` constructable to change the majority of the fields left over.

Using default field values should make it easier to review when we add or remove fields to `Resolver` in the future, and highlight which fields are run-time dependent in `Resolver::new`.

r? `@petrochenkov`
…mpiler-errors

cleanup: Remove useless `[T].iter().last()`
Adjust error message grammar to be less awkward

r? `@estebank`
@rustbot rustbot added A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic 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) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Aug 14, 2025
@Kobzol
Copy link
Member Author

Kobzol commented Aug 14, 2025

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Aug 14, 2025

📌 Commit 44aa95d 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 Aug 14, 2025
@JonathanBrouwer
Copy link
Contributor

JonathanBrouwer commented Aug 14, 2025

@Kobzol This PR is gonna conflict with #145085 (which is currently ahead of this rollup) because #144983 modifies tests/ui/issues/issue-78957.rs

@Kobzol
Copy link
Member Author

Kobzol commented Aug 14, 2025

Thanks for letting me know!

@Kobzol Kobzol closed this Aug 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic rollup A PR which is a rollup 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) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.