Repository navigation
Rollup of 9 pull requests - #166674
Rollup of 9 pull requests#166674
Conversation
## Stabilization report
### What is stabilized
With trim-paths `object` scope and debuginfo on,
Cargo writes `<artifact>.trim-paths.json` beside each final artifact.
The "unremap" file maps the remapped paths back to local ones.
This stabilizes debugger script changes:
`rust-gdb` and `rust-lldb` by default load `{gdb,lldb}_trim_paths.py`,
which read the unremap files and apply them
through GDB `substitute-path` or LLDB `target.source-map`
to set up source file path substitutions.
### What changes
* After stabilization, set `RUST_{GDB,LLDB}_TRIM_PATHS=0` to opt out.
Before, this needed `RUST_{GDB,LLDB}_TRIM_PATHS=unstable`.
* After stabilization, both scripts are shipped on all channels.
Before, they were shipped only on nightly.
### Why we don't want to stabilize
* This makes debugger scripts relying on Cargo-specific file format,
inversing the dependency relation.
* There is no integration test for them.
(and debugger scripts actually don't have many tests)
### Docs
See Cargo's the "Unremap files" section:
<https://github.com/rust-lang/cargo/blob/ac74ae3c603b9efce95b07383b46d3103e834d9a/doc/book/src/reference/profiles.md?plain=1#L337-L386>
I guess things got renamed and there were some editing mishaps.
…ustdoc, r=GuillaumeGomez Stabilize `--remap-path-scope` in rustdoc and the `documentation` scope # Stabilization report of `--remap-path-scope` in rustdoc and the `documentation` scope ## Summary `rustc` supports remapping source paths prefixes as a best effort in all compiler generated output, including compiler diagnostics, debugging information, macro expansions, documentation, doctests, etc. This is useful for normalizing build products, for example, by removing the current directory out of the paths emitted into object files. This stabilization stabilize the same flag used by `rustc` to control which generted output has remapped paths in `rustdoc`. Cargo is starting to use the `rustc` flag with rust-lang/cargo#17488. Tracking issue: rust-lang#155451. It's the last major part of the trim-paths feature. ### What is stabilized The rustdoc `--remap-path-scope` flag is being stabilized by this PR. It's equivalent to [the rustc flag](https://doc.rust-lang.org/rustc/remap-source-paths.html#--remap-path-scope). It permits defines which scopes should be remapped by `-–remap-path-prefix`: `macro,diagnostics,documentation,debuginfo,coverage,object,all`. #### Example ```sh rustdoc src/lib.rs --remap-path-prefix="$PWD=/foo" --remap-path-prefix=documentation ``` #### The `documentation` In addition to the [other scopes](https://doc.rust-lang.org/rustc/remap-source-paths.html#--remap-path-scope) (`diagnostics`, `debuginfo`, ...). `rustdoc` uses the `documentation` scope, it's a new scope to be shared with `rustc` (T-compiler [FCP here](rust-lang#163896)). ## Implementation ### Major parts - rust-lang#155357 - rust-lang#151589 - rust-lang#163956 - rust-lang#164278 - rust-lang#164279 ### Coverage - [`tests/rustdoc-ui/remap-path-prefix.rs`](https://github.com/rust-lang/rust/blob/b57eb9a5fd94f30697f51fc88fbe898e67c7aae6/tests/rustdoc-ui/remap-path-prefix.rs) - [`tests/rustdoc-ui/remap-path-prefix-doctest.rs`](https://github.com/rust-lang/rust/blob/b57eb9a5fd94f30697f51fc88fbe898e67c7aae6/tests/rustdoc-ui/remap-path-prefix-doctest.rs) - [`tests/ui/errors/remap-path-prefix-macro.rs`](https://github.com/rust-lang/rust/blob/b57eb9a5fd94f30697f51fc88fbe898e67c7aae6/tests/ui/errors/remap-path-prefix-macro.rs) - [`tests/ui/errors/remap-path-prefix-diagnostics.rs`](https://github.com/rust-lang/rust/blob/b57eb9a5fd94f30697f51fc88fbe898e67c7aae6/tests/ui/errors/remap-path-prefix-diagnostics.rs) ### Outstanding bugs There are no outstanding bugs regarding `--remap-path-scope` in `rustdoc`. There are [caveats and limitation](https://doc.rust-lang.org/nightly/rustc/remap-source-paths.html#caveats-and-limitations) in `rustc`, but they mostly concern generated object files, which we don't really have. ### Outstanding FIXMEs There are no FIXME regarding `--remap-path-scope` (in rustc or rustdoc). Fixes rust-lang#163896 Fixes rust-lang#155451
…, r=Urgau debugger: stabilize trim-paths unremap file loading ## Stabilization report ### What is stabilized With trim-paths `object` scope and debuginfo on, Cargo writes `<artifact>.trim-paths.json`[^1] beside each final artifact. This "unremap" file, maps the remapped paths back to local ones. The file format and remapping rules are stabilized as part of FCP on Cargo side: rust-lang/cargo#17488 This stabilizes debugger script changes: `rust-gdb` and `rust-lldb` by default load `{gdb,lldb}_trim_paths.py`, which read the unremap files and apply them through GDB `substitute-path` or LLDB `target.source-map` to set up source file path substitutions. Note that we already apply an unremap for `/rustc/$RUSTC_COMMIT_HASH` paths, so it wouldn't be a new capability per se, just an extension of it. ### What changes * After stabilization, set `RUST_{GDB,LLDB}_TRIM_PATHS=0` to opt out. Before, it required `RUST_{GDB,LLDB}_TRIM_PATHS=unstable` to enable. * After stabilization, both scripts are shipped on all channels. Before, they were shipped only on nightly. ### Why we don't want to stabilize * This makes debugger scripts relying on Cargo-specific file format, inversing the dependency relation. * There is no integration test for them. (and debugger scripts actually don't have many tests) ### Docs See Cargo's the "Unremap files" section: <https://doc.rust-lang.org/nightly/cargo/reference/profiles.html#unremap-files>. > The unremap file is in JSON format: > > * `v` carries the format version. > * `rust_version` and `workspace_root` are file-level metadata, namely the toolchain version and the workspace root. > * `remaps` is an array of records. Each record maps a sanitized path prefix in the artifact (`from`) back to the local path it replaced (`to`), ordered by the `from` prefix. Note that this follows the debugger substitution direction, which is the inverse of `--remap-path-prefix`. > > An example of the unremap file: > > ```json > { > "v": 1, > "rust_version": "1.96.0-nightly", > "workspace_root": "/home/me/app", > "remaps": [ > { "from": ".", "to": "/home/me/app" }, > { "from": "/cargo/build-dir", "to": "/home/me/app/target" }, > { "from": "/cargo/registry/6f17d22d3f0a95d1", "to": "/home/me/.cargo/registry/src/index.crates.io-6f17d22d3f0a95d1" }, > { "from": "/rustc/abc123", "to": "/home/me/.rustup/toolchains/nightly/lib/rustlib/src/rust" } > ] > } > ``` > > Since it is meant to be a debugging aid, it includes absolute paths of your system, so there is no artifact privacy guarantee. You might want to exclude `*.trim-paths.json` files when distributing artifacts. --- Should be shipped after <rust-lang#163881> (or along with that)
…3898-clean, r=petrochenkov fix: ignore format literal source availability in stable hashes fixes [rust-lang#153898](rust-lang#153898). installing rust-src could change a crate's strict version hash (SVH) due to source-dependent format-string desugaring. this change excludes the diagnostic-only FormatLiteral.source field from stable hashing while preserving diagnostic behavior. adds a regression test covering unimplemented!, todo!, unreachable!, and generic functions. verifies metadata with and without rust-src using identical compiler flags. r? compiler
…eetrees add c-variadic support for `x87_f80` tracking issue: rust-lang#163982 The default paths already have the right behavior. Validated with abi-cafe.
…r=nnethercote Remove `fn terminator()` and `terminator_mut()` Follow-up to @panstromek's work to remove the `Option` here.
…t, r=folkertdev
Don't round the number of bits passed to `{Size,Align}::from_bits`
The current behaviour is more likely to mask typos than be the intended behaviour, and can give the misleading impression that `Size` can store sizes that are a non-whole-number of bytes. This is particularly nonsensical for `Align::from_bits` where `Align::from_bits(24)` has always been an error whereas `Align::from_bits(25)` was rounded up to a 32-bit alignment before this PR. The only places where the current rounding behaviour is relied upon are a few places where `Size::from_bits(1)` is used as a constant to represent the size of a `bool` (1 byte) - this PR replaces those with the more explicit `Size::from_bytes(1)`/`Size::from_bits(8)`. If the rounding behaviour is needed in the future, a dedicated `Size::ceil_from_bits` method can be added.
r? @folkertdev
… r=clarfonthey Remove `T: Send + Sync` bound from `Arc::downcast` [Discussion](https://rust-lang.zulipchat.com/#narrow/channel/219381-t-libs/topic/Why.20the.20.60T.3A.20Send.20.2B.20Sync.60.20bound.20in.20.60Arc.3A.3Adowncast.60.3F/with/617793925) on zulip Implements the change described in rust-lang/libs-team#859. T-libs can pick if they want to skip the ACP or not. @rustbot label needs-fcp T-libs
…-dir-override, r=Kobzol fix: bootstrap build directory handling with --set fixes rust-lang#166607 handle `--set build.build-dir` in python bootstrap using the existing toml parser, so both bootstrap implementations use the same directory. added unit tests and verified the original repro. cc @Kobzol
Submodule update of rustc-perf Mostly to land rust-lang/rustc-perf#2650 r? Kobzol
|
@bors r+ p=5 force |
This comment has been minimized.
This comment has been minimized.
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing b61bfe5 (parent) -> c82ce15 (this PR) Test differencesShow 38 test diffsStage 1
Stage 2
Additionally, 30 doctest diffs were found. These are ignored, as they are noisy. Job group index
Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard c82ce15637153c025d29abbaff6035a177361788 --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
📌 Perf builds for each rolled up PR:
parent commit: b61bfe5f22 In the case of a perf regression, run the following command with the SHAs of each PR you suspect might be the cause: |
|
Finished benchmarking commit (c82ce15): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary -2.5%, secondary -3.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -3.1%, secondary -2.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 462.15s -> 462.854s (0.15%) |
|
@rust-timer triage 097c129 88ca14e 46d6fbe b0122f6 |
Running triage with 27 benchmarksTriage only executes the benchmarks on rollup members, that were changed significantly on the rollup.
#166655 097c129 Submodule update of rustc-perfQueued 097c129 with parent b61bfe5, future comparison URL. #163910 88ca14e debugger: stabilize trim-paths unremap file loadingThis perf run didn't have relevant results for the `instruction count` metric.Instruction countThis perf run didn't have relevant results for this metric. Max RSS (memory usage)Results (primary 3.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary -2.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. #163895 46d6fbe Stabilize
|
| mean | range | count | |
|---|---|---|---|
| Regressions ❌ (primary) |
2.0% | [2.0%, 2.0%] | 1 |
| Regressions ❌ (secondary) |
- | - | 0 |
| Improvements ✅ (primary) |
- | - | 0 |
| Improvements ✅ (secondary) |
- | - | 0 |
| All ❌✅ (primary) | 2.0% | [2.0%, 2.0%] | 1 |
Cycles
This perf run didn't have relevant results for this metric.
Binary size
This perf run didn't have relevant results for this metric.
#166377 b0122f6 fix: ignore format literal source availability in stable hashes
Queued b0122f6 with parent b61bfe5, future comparison URL.
There are currently 2 preceding artifacts in the queue.
It will probably take at least ~1.1 hours until the benchmark run finishes.
Successful merges:
--remap-path-scopein rustdoc and thedocumentationscope #163895 (Stabilize--remap-path-scopein rustdoc and thedocumentationscope)x87_f80#166510 (add c-variadic support forx87_f80)fn terminator()andterminator_mut()#166631 (Removefn terminator()andterminator_mut()){Size,Align}::from_bits#166650 (Don't round the number of bits passed to{Size,Align}::from_bits)T: Send + Syncbound fromArc::downcast#161531 (RemoveT: Send + Syncbound fromArc::downcast)r? @ghost
Create a similar rollup