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

Rollup of 7 pull requests #136085

Merged
merged 23 commits into from
Jan 26, 2025
Merged

Rollup of 7 pull requests #136085

merged 23 commits into from
Jan 26, 2025

Conversation

jhpratt
Copy link
Member

@jhpratt jhpratt commented Jan 26, 2025

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

folkertdev and others added 23 commits January 20, 2025 21:02
This is the next step in getting rid of the broken C abi for
wasm32-unknown-unknown.
Co-Authored-By: Alex Crichton <alex@alexcrichton.com>
This does need EMCC_CFLAGS="-s MAXIMUM_MEMORY=2GB" avoid several OOMs.
They are either outdated as emscripten now supports i128 or they are
subsumed by #[cfg_attr(not(panic = "unwind"), ignore]
rust-lang/testing-devex-team#9 proposed changing the behavior of `--logfile`.
The given reasons were:

(1) Bazel can't programmatically process stdout.  This seems like a
limitation in Bazel and we recommend focusing on that.  If we look at
the wider Rust ecosystem, Rustc and Cargo don't support any such
mechanism and the Cargo team rejected having one.  Expecting this in
libtest when its not supported elsewhere seems too specialized.

(2) Tests that leak out non-programmatic output that intermixes with
programmatic output.  We acknowledge this is a problem to be evaluated
but we need to make sure we are stepping back and gathering
requirements, rather than assuming `--logfile` will fit the needs.

Independent of the motive, regarding using or changing  `--logfile`

(1) Most ways to do it would be a breaking change, like if we respect
any stable `--format`.  As suggested above, we could specialize this to
new `--format` values but that would be confusing for some values to
apply but not others.

(2) Other ways of solving this add new features to lib`test` when we are
instead wanting to limit the feature set it has to minimize the
compatibility surface that has to be maintained and the burden it would
put on third party harnesses which are a focus area.  Examples include
`--format compact` or a `--log-format` flag

(3) The existence of `--logfile` dates back quite a ways
(rust-lang@5cc050b,
rust-lang#2127) and the history gives the
impression this more of slipped through rather than being an intended
feature (see also
rust-lang#82350 (comment)).
Deprecation would better match to how it has been treated.
By deprecating this, we do not expect custom test harnesses
(rust-lang/testing-devex-team#2) to implement this.

T-testing-devex held an FCP for deprecating in rust-lang/testing-devex-team#9
though according to
[RFC rust-lang#3455](https://rust-lang.github.io/rfcs/3455-t-test.html),
this is still subject to final approval from T-libs-api.
```
error: value assigned to `object` is never read
  --> $DIR/mut-arg-of-borrowed-type-meant-to-be-arg-of-mut-borrow.rs:21:5
   |
LL |     object = &mut object2;
   |     ^^^^^^
   |
help: you might have meant to mutate the pointed at value being passed in, instead of changing the reference in the local binding
   |
LL ~ fn change_object3(object: &mut Object) {
LL |
LL |     let object2 = Object;
LL ~     *object = object2;
   |
```
instead of
```
error: value assigned to `object` is never read
  --> $DIR/mut-arg-of-borrowed-type-meant-to-be-arg-of-mut-borrow.rs:21:5
   |
LL |     object = &mut object2;
   |     ^^^^^^
   |
help: you might have meant to mutate the pointed at value being passed in, instead of changing the reference in the local binding
   |
LL ~ fn change_object3(object: &mut mut Object) {
LL |
LL |     let object2 = Object;
LL ~     *object = object2;
   |
```

Fix rust-lang#136028.
for cases where we want to dump the MIR to a given writer instead of a
new file as the default does.

this will be used when dumping the MIR to a buffer to process
differently, e.g. post-process to escape for an HTML dump.
escape the regular raw MIR into its own section
… r=workingjubilee

Make the wasm_c_abi future compat warning a hard error

This is the next step in getting rid of the broken C abi for wasm32-unknown-unknown.

The lint was made deny-by-default in rust-lang#129534 3 months ago. This still keeps the `-Zwasm-c-abi` flag set to `legacy` by default. It will be flipped in a future PR.

cc rust-lang#122532
fix(libtest): Deprecate '--logfile'

rust-lang/testing-devex-team#9 proposed changing the behavior of `--logfile`. The given reasons were:

(1) Bazel can't programmatically process stdout.  This seems like a limitation in Bazel and we recommend focusing on that.  If we look at the wider Rust ecosystem, Rustc and Cargo don't support any such mechanism and the Cargo team rejected having one.  Expecting this in libtest when its not supported elsewhere seems too specialized.

(2) Tests that leak out non-programmatic output that intermixes with programmatic output.  We acknowledge this is a problem to be evaluated but we need to make sure we are stepping back and gathering requirements, rather than assuming `--logfile` will fit the needs.

Independent of the motive, regarding using or changing  `--logfile`

(1) Most ways to do it would be a breaking change, like if we respect any stable `--format`.  As suggested above, we could specialize this to new `--format` values but that would be confusing for some values to apply but not others.

(2) Other ways of solving this add new features to lib`test` when we are instead wanting to limit the feature set it has to minimize the compatibility surface that has to be maintained and the burden it would put on third party harnesses which are a focus area.  Examples include `--format compact` or a `--log-format` flag

(3) The existence of `--logfile` dates back quite a ways (rust-lang@5cc050b, rust-lang#2127) and the history gives the
impression this more of slipped through rather than being an intended feature (see also
rust-lang#82350 (comment)). Deprecation would better match to how it has been treated. By deprecating this, we do not expect custom test harnesses (rust-lang/testing-devex-team#2) to implement this.

T-testing-devex held an FCP for deprecating in rust-lang/testing-devex-team#9 though according to
[RFC rust-lang#3455](https://rust-lang.github.io/rfcs/3455-t-test.html), this is still subject to final approval from T-libs-api.

Closes rust-lang/testing-devex-team#9
…irect, r=bjorn3

use `PassMode::Direct` for vector types on `s390x`

closes rust-lang#135744
tracking issue: rust-lang#130869

Previously, all vector types were type erased to `Ni8`, now we pass non-wrapped vector types directly. That skips emitting a bunch of casting logic in rustc, that LLVM then has to clean up. The initial LLVM IR is also a bit more readable.

This calling convention is tested extensively in `tests/assembly/s390x-vector-abi.rs`, showing that this change has no impact on the ABI in practice.

r? ````@taiki-e````
…, r=Mark-Simulacrum

Update emscripten std tests

This disables a bunch of emscripten tests that test things emscripten doesn't support and re-enables a whole bunch of tests which now work just fine on emscripten.

Tested with `EMCC_CFLAGS="-s MAXIMUM_MEMORY=2GB" ./x.py test library/ --target wasm32-unknown-emscripten`.
…rrowLii

Use `fmt::from_fn` in more places in the compiler

Use the unstable functions from rust-lang#117729 in more places in the compiler, follow up to rust-lang#135494
…=compiler-errors

Expand polonius MIR dump

This PR starts expanding the polonius MIR:
- switches to an HTML file, to show graphs in the same document as the MIR dump, share them more easily since it's a single file that can be hosted as a gist, and also to allow for interactivity in the near future.
- adds the regular NLL MIR + polonius constraints
- embeds a mermaid version of the CFG, similar to the graphviz one, but that needs a smaller js than `dot`'s emscripten js from graphvizonline

[Here's an example](https://gistpreview.github.io/?0c18f2a59b5e24ac0f96447aa34ffe00) of how it looks.

---
In future PRs: mermaid graphs of the NLL region graph, of the NLL SCCs, of the polonius localized outlives constraints, and the interactive polonius MIR dump.

r? ```@matthewjasper```
Account for mutable borrow in argument suggestion

```
error: value assigned to `object` is never read
  --> $DIR/mut-arg-of-borrowed-type-meant-to-be-arg-of-mut-borrow.rs:21:5
   |
LL |     object = &mut object2;
   |     ^^^^^^
   |
help: you might have meant to mutate the pointed at value being passed in, instead of changing the reference in the local binding
   |
LL ~ fn change_object3(object: &mut Object) {
LL |
LL |     let object2 = Object;
LL ~     *object = object2;
   |
```
instead of
```
error: value assigned to `object` is never read
  --> $DIR/mut-arg-of-borrowed-type-meant-to-be-arg-of-mut-borrow.rs:21:5
   |
LL |     object = &mut object2;
   |     ^^^^^^
   |
help: you might have meant to mutate the pointed at value being passed in, instead of changing the reference in the local binding
   |
LL ~ fn change_object3(object: &mut mut Object) {
LL |
LL |     let object2 = Object;
LL ~     *object = object2;
   |
```

Fix rust-lang#136028.
@rustbot rustbot added O-wasi Operating system: Wasi, Webassembly System Interface O-wasm Target: WASM (WebAssembly), http://webassembly.org/ S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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 Jan 26, 2025
@jhpratt
Copy link
Member Author

jhpratt commented Jan 26, 2025

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Jan 26, 2025

📌 Commit 64550d1 has been approved by jhpratt

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 Jan 26, 2025
@bors
Copy link
Contributor

bors commented Jan 26, 2025

⌛ Testing commit 64550d1 with merge c2270be...

@bors
Copy link
Contributor

bors commented Jan 26, 2025

☀️ Test successful - checks-actions
Approved by: jhpratt
Pushing c2270be to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 26, 2025
@bors bors merged commit c2270be into rust-lang:master Jan 26, 2025
7 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Jan 26, 2025
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#133951 Make the wasm_c_abi future compat warning a hard error 8993050494e4a5e5f5affb4fc4db7d707bbc9aef (link)
#134283 fix(libtest): Deprecate '--logfile' a932e2fe48108bd3057789feb4d06ba498e97c00 (link)
#135785 use PassMode::Direct for vector types on s390x 5965fc01add79b7c1cbfef5c61b597ae6cbdf097 (link)
#135948 Update emscripten std tests 6c4d9d8e0fd356a55db54300d1868fa3fd594ad2 (link)
#135951 Use fmt::from_fn in more places in the compiler f2806b593d92d3c05e7b396c8ef76ec330013e81 (link)
#136031 Expand polonius MIR dump 234447c7cdbefd62bcdddc18d89332888a45cf59 (link)
#136032 Account for mutable borrow in argument suggestion ad1fd25701b5e0493ee99bc2bc574614d0561728 (link)

previous master: 2f0ad2a71e

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (c2270be): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.8% [0.8%, 0.8%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary 0.3%, secondary -3.0%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
3.0% [3.0%, 3.0%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.4% [-2.4%, -2.4%] 1
Improvements ✅
(secondary)
-3.0% [-3.0%, -3.0%] 1
All ❌✅ (primary) 0.3% [-2.4%, 3.0%] 2

Cycles

Results (secondary -5.4%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
4.2% [3.7%, 4.7%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-10.2% [-11.7%, -9.2%] 6
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 773.228s -> 771.892s (-0.17%)
Artifact size: 325.80 MiB -> 325.83 MiB (0.01%)

@jhpratt jhpratt deleted the rollup-dxmb2h2 branch February 5, 2025 05:18
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. O-wasi Operating system: Wasi, Webassembly System Interface O-wasm Target: WASM (WebAssembly), http://webassembly.org/ 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-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.

10 participants