-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Rewrite test-float-parse
in Rust
#127510
Rewrite test-float-parse
in Rust
#127510
Conversation
rustbot has assigned @Mark-Simulacrum. Use |
I still have some tweaking to do to the actual tests (like, the README should be useful), but bootstrap could probably take a look at the changes there to make sure I'm at least on the right track.
|
Failed to set assignee to
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@rustbot label +rla-silenced |
These commits modify the If this was unintentional then you should revert the changes before this PR is merged. The list of allowed third-party dependencies may have been modified! You must ensure that any new dependencies have compatible licenses before merging. |
d758e96
to
6f762f5
Compare
cc @Alexhuszagh by the way, since you are the original author |
Verified that everything passes locally including the exhaustive Test log
|
r=me with ToolStd (presuming that works) so we're actually testing the in-tree std. |
80c9b38
to
b37bf5f
Compare
Setting to I also needed to move the optimization config to workspace |
Fixes it for me... not sure exactly why that's not automatic but I think this should fix it. |
156886a
to
b8ac96a
Compare
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).
b8ac96a
to
7f7ec2d
Compare
I just came to the same conclusion, thanks, great that it works now. I fixed this then rebased since I know there have been some bootstrap updates recently. I'll r=you after CI passes unless you have other concerns. |
Thanks for reviewing all of this! @bors r=Mark-Simulacrum |
…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.
…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.
…mpiler-errors Rollup of 7 pull requests Successful merges: - rust-lang#126450 (Promote Mac Catalyst targets to Tier 2, and ship with rustup) - rust-lang#127177 (Distribute rustc_codegen_cranelift for arm64 macOS) - rust-lang#127510 (Rewrite `test-float-parse` in Rust) - rust-lang#127720 ([`macro_metavar_expr_concat`] Allow `concat` in repetitions) - rust-lang#127734 (Windows: move BSD socket shims to netc) - rust-lang#127839 (Fix git safe-directory path for docker images) - rust-lang#128005 (Remove _tls_used hack) r? `@ghost` `@rustbot` modify labels: rollup
…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.
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#126450 (Promote Mac Catalyst targets to Tier 2, and ship with rustup) - rust-lang#127177 (Distribute rustc_codegen_cranelift for arm64 macOS) - rust-lang#127510 (Rewrite `test-float-parse` in Rust) - rust-lang#127977 (Update wasi-sdk in CI to latest release) - rust-lang#127985 (Migrate `test-benches`, `c-unwind-abi-catch-panic` and `compiler-lookup-paths-2` `run-make` tests to rmake) - rust-lang#128023 (rustdoc: short descriptions cause word-breaks in tables) r? `@ghost` `@rustbot` modify labels: rollup
@bors r- |
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.
7f7ec2d
to
d123878
Compare
I made a typo in the path to test, @bors r=Mark-Simulacrum |
…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.
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#127510 (Rewrite `test-float-parse` in Rust) - rust-lang#127583 (Deal with invalid UTF-8 from `gai_strerror`) - rust-lang#127977 (Update wasi-sdk in CI to latest release) - rust-lang#128014 (Fix stab display in doc blocks) - rust-lang#128020 (Just totally fully deny late-bound consts) - rust-lang#128023 (rustdoc: short descriptions cause word-breaks in tables) - rust-lang#128033 (Explain why we require `_` for empty patterns) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#127510 (Rewrite `test-float-parse` in Rust) - rust-lang#127583 (Deal with invalid UTF-8 from `gai_strerror`) - rust-lang#127977 (Update wasi-sdk in CI to latest release) - rust-lang#128014 (Fix stab display in doc blocks) - rust-lang#128020 (Just totally fully deny late-bound consts) - rust-lang#128023 (rustdoc: short descriptions cause word-breaks in tables) - rust-lang#128033 (Explain why we require `_` for empty patterns) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 8 pull requests Successful merges: - rust-lang#127177 (Distribute rustc_codegen_cranelift for arm64 macOS) - rust-lang#127415 (Add missing try_new_uninit_slice_in and try_new_zeroed_slice_in) - rust-lang#127510 (Rewrite `test-float-parse` in Rust) - rust-lang#127977 (Update wasi-sdk in CI to latest release) - rust-lang#127985 (Migrate `test-benches`, `c-unwind-abi-catch-panic` and `compiler-lookup-paths-2` `run-make` tests to rmake) - rust-lang#127996 (Clean up warnings + `unsafe_op_in_unsafe_fn` when building std for armv6k-nintendo-3ds) - rust-lang#128035 (Add test for rust-lang#125837) - rust-lang#128054 (mw triagebot vacation) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#127510 - tgross35:test-float-parse-update, 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.
This also does not require a Python install for the testing process and is much faster. Related to rust-lang/rust#127510 Closes #176
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.(please don't merge before I can squash this)