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 #128017

Closed
wants to merge 23 commits into from

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

bjorn3 and others added 23 commits June 30, 2024 18:40
- aarch64-apple-ios-macabi
- x86_64-apple-ios-macabi
Now there are separate functions for running a command without capturing, running while capturing stdout
and running while capturing everything. This should help avoid situations where stdout/stderr is accessed
when it was not captured.
…ut/stderr

If e.g. only stdout is captured, but the caller tries to read stderr, previously
they would get back an empty string. Now the code will explicitly panic when
accessing an uncaptured output stream.
This commit updates the `wasi-sdk` download used by the `wasm32-wasi*`
targets. The motivation for this commit is generally just "keep things
up to date" and is not intended to cause any issues or differences from
before, just a routine update.
The updated wasi-sdk has debuginfo by default so be sure to strip the
debuginfo by default when testing the size of new executables.
The existing implementation uses Python to launch a set of Rust-written
binaries. Unfortunately, this is currently broken; it seems that some
updates meant it no longer compiles.

There is also a problem that support for more float types (`f16`,
`f128`) would be difficult to add since this is very specialized to
`f32` and `f64`.

Because of these sortcomings, migrate to a version written in Rust. This
version should be significantly faster; test generators can execute in
parallel, and test cases are chunked and parallelized. This should also
resolve the preexisting "... the worker processes are leaked and stick
around forever" comment.

This change also introduces genericism over float types and properties,
meaning it will be much easier to extend support to newly added types.

`num::BigRational` is used in place of Python's fractions for
infinite-precision calculations.
Since `test-float-parse` is now implemented in Rust, we can move it into
the global workspace and check dependency licenses.
With updates to `test-float-parse`, it is now possible to run as another
Rust tool. Enable check, clippy, and test.

Test runs the unit tests, as well as shorter parsing tests (takes
approximately 1 minute).
With the previous improvements, it is now possible to run float parsing
tests as part of CI. Enable it here.

This only runs a subset of tests, which takes about one minute.
…rk-Simulacrum

Promote Mac Catalyst targets to Tier 2, and ship with rustup

Promote the Mac Catalyst targets `x86_64-apple-ios-macabi` and `aarch64-apple-ios-macabi` to Tier 2.

Draft until [the MCP](rust-lang/compiler-team#761) finishes (see that for motivation).

`@rustbot` author
r? `@ghost`
…-Simulacrum

Distribute rustc_codegen_cranelift for arm64 macOS

Support for arm64 macOS has been added to rustc_codegen_cranelift recently.

Fixes rust-lang/rustc_codegen_cranelift#1502
…r=Mark-Simulacrum

Rewrite `test-float-parse` in Rust

Migrate from the currently broken Rust + Python `test-float-parse` to a Rust implementation. This newer version should be significantly faster (tests execute in parallel with threads, rather than series across multiple processes, which also eliminates the "...the worker processes are leaked and stick around forever" message), and should be significantly easier to extend to the new float types.

Since this is faster and hopefully more stable, we should be able to launch it with `x` and run the faster tests in CI.
…=onur-ozkan

Bootstrap command refactoring: make command output API more bulletproof (step 7)

Continuation of rust-lang#127680.

This PR modifies the API of running commands to make it more explicit when a command is expected to produce programmatically handled output. Now if you call just `run`, you cannot access the stdout/stderr by accident, because it will not be returned to the caller.

This API change might be seen as overkill, let me know what do you think. In any case, I'd like to land the second commit, to make it harder to accidentally read stdout/stderr of commands that did not capture output (now you'd get an empty string as a result, but you should probably get a panic instead, if you try to read uncaptured stdout/stderr).

Tracking issue: rust-lang#126819

r? ```@onur-ozkan```
…eyouxu

Rewrite and rename `issue-14698`. `issue-33329` and `issue-107094` `run-make` tests to rmake or ui

Part of rust-lang#121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html).

try-job: armhf-gnu
try-job: test-various
try-job: aarch64-apple
try-job: x86_64-msvc
…rk-Simulacrum

Update wasi-sdk in CI to latest release

This commit updates the `wasi-sdk` download used by the `wasm32-wasi*` targets. The motivation for this commit is generally just "keep things up to date" and is not intended to cause any issues or differences from before, just a routine update.
Migrate `test-benches`, `c-unwind-abi-catch-panic` and `compiler-lookup-paths-2` `run-make` tests to rmake

Part of rust-lang#121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html).
@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc 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-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Jul 20, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=7

@bors
Copy link
Contributor

bors commented Jul 20, 2024

📌 Commit 7c6d836 has been approved by matthiaskrgr

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 20, 2024
@rust-log-analyzer
Copy link
Collaborator

The job mingw-check failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
#12 [ 5/12] RUN npm install es-check@6.1.1 eslint@8.6.0 -g
#12 6.334 npm WARN deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
#12 6.393 npm WARN deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
#12 6.413 npm WARN deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
#12 6.457 npm WARN deprecated @humanwhocodes/config-array@0.9.5: Use @eslint/config-array instead
#12 6.485 npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
#12 6.500 npm WARN deprecated @humanwhocodes/object-schema@1.2.1: Use @eslint/object-schema instead
#12 7.503 
#12 7.503 added 205 packages in 7s
#12 7.503 
#12 7.503 20 packages are looking for funding
---
#16 3.885 Building wheels for collected packages: reuse
#16 3.887   Building wheel for reuse (pyproject.toml): started
#16 4.237   Building wheel for reuse (pyproject.toml): finished with status 'done'
#16 4.238   Created wheel for reuse: filename=reuse-1.1.0-cp310-cp310-manylinux_2_35_x86_64.whl size=181117 sha256=f5f58750481f69515c2c0d1d503daf565e2565c370d07fc6aeb95fe3498b4269
#16 4.238   Stored in directory: /tmp/pip-ephem-wheel-cache-bjb1crfw/wheels/c2/3c/b9/1120c2ab4bd82694f7e6f0537dc5b9a085c13e2c69a8d0c76d
#16 4.241 Installing collected packages: boolean-py, binaryornot, setuptools, reuse, python-debian, markupsafe, license-expression, jinja2, chardet
#16 4.265   Attempting uninstall: setuptools
#16 4.265     Found existing installation: setuptools 59.6.0
#16 4.267     Not uninstalling setuptools at /usr/lib/python3/dist-packages, outside environment /usr
---
   Compiling home v0.5.9
error[E0599]: no method named `is_success` found for type `bool` in the current scope
##[error]   --> src/core/build_steps/tool.rs:593:18
    |
585 |               let has_changes = !git(Some(&builder.config.src))
586 | |                 .allow_failure()
587 | |                 .run_always()
587 | |                 .run_always()
588 | |                 .args(["diff-index", "--quiet", &commit])
...   |
592 | |                 .run(builder)
593 | |                 .is_success();
    | |_________________|
    |

error[E0599]: no method named `capture_stdout` found for struct `BootstrapCommand` in the current scope
error[E0599]: no method named `capture_stdout` found for struct `BootstrapCommand` in the current scope
##[error]   --> src/utils/helpers.rs:537:35
    |
537 |     let mut git = git(source_dir).capture_stdout();
    |
   ::: src/utils/exec.rs:59:1
    |
59  | pub struct BootstrapCommand {
---
   Compiling bootstrap v0.0.0 (/checkout/src/bootstrap)
error[E0599]: no method named `is_success` found for type `bool` in the current scope
##[error]   --> src/core/build_steps/tool.rs:593:18
    |
585 |               let has_changes = !git(Some(&builder.config.src))
586 | |                 .allow_failure()
587 | |                 .run_always()
587 | |                 .run_always()
588 | |                 .args(["diff-index", "--quiet", &commit])
...   |
592 | |                 .run(builder)
593 | |                 .is_success();
    | |_________________|
    |

error[E0599]: no method named `capture_stdout` found for struct `BootstrapCommand` in the current scope
error[E0599]: no method named `capture_stdout` found for struct `BootstrapCommand` in the current scope
##[error]   --> src/utils/helpers.rs:537:35
    |
537 |     let mut git = git(source_dir).capture_stdout();
    |
   ::: src/utils/exec.rs:59:1
    |
59  | pub struct BootstrapCommand {
---
   Compiling bootstrap v0.0.0 (/checkout/src/bootstrap)
error[E0599]: no method named `is_success` found for type `bool` in the current scope
##[error]   --> src/core/build_steps/tool.rs:593:18
    |
585 |               let has_changes = !git(Some(&builder.config.src))
586 | |                 .allow_failure()
587 | |                 .run_always()
587 | |                 .run_always()
588 | |                 .args(["diff-index", "--quiet", &commit])
...   |
592 | |                 .run(builder)
593 | |                 .is_success();
    | |_________________|
    |

error[E0599]: no method named `capture_stdout` found for struct `BootstrapCommand` in the current scope
error[E0599]: no method named `capture_stdout` found for struct `BootstrapCommand` in the current scope
##[error]   --> src/utils/helpers.rs:537:35
    |
537 |     let mut git = git(source_dir).capture_stdout();
    |
   ::: src/utils/exec.rs:59:1
    |
59  | pub struct BootstrapCommand {
---
   Compiling bootstrap v0.0.0 (/checkout/src/bootstrap)
error[E0599]: no method named `is_success` found for type `bool` in the current scope
##[error]   --> src/core/build_steps/tool.rs:593:18
    |
585 |               let has_changes = !git(Some(&builder.config.src))
586 | |                 .allow_failure()
587 | |                 .run_always()
587 | |                 .run_always()
588 | |                 .args(["diff-index", "--quiet", &commit])
...   |
592 | |                 .run(builder)
593 | |                 .is_success();
    | |_________________|
    |

error[E0599]: no method named `capture_stdout` found for struct `BootstrapCommand` in the current scope
error[E0599]: no method named `capture_stdout` found for struct `BootstrapCommand` in the current scope
##[error]   --> src/utils/helpers.rs:537:35
    |
537 |     let mut git = git(source_dir).capture_stdout();
    |
   ::: src/utils/exec.rs:59:1
    |
59  | pub struct BootstrapCommand {
---
   Compiling bootstrap v0.0.0 (/checkout/src/bootstrap)
error[E0599]: no method named `is_success` found for type `bool` in the current scope
##[error]   --> src/core/build_steps/tool.rs:593:18
    |
585 |               let has_changes = !git(Some(&builder.config.src))
586 | |                 .allow_failure()
587 | |                 .run_always()
587 | |                 .run_always()
588 | |                 .args(["diff-index", "--quiet", &commit])
...   |
592 | |                 .run(builder)
593 | |                 .is_success();
    | |_________________|
    |

error[E0599]: no method named `capture_stdout` found for struct `BootstrapCommand` in the current scope
error[E0599]: no method named `capture_stdout` found for struct `BootstrapCommand` in the current scope
##[error]   --> src/utils/helpers.rs:537:35
    |
537 |     let mut git = git(source_dir).capture_stdout();
    |
   ::: src/utils/exec.rs:59:1
    |
59  | pub struct BootstrapCommand {

@matthiaskrgr matthiaskrgr deleted the rollup-06uct54 branch September 1, 2024 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc 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-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

10 participants