Skip to content

test-float-parse: apply cfg(not(bootstrap)) #141904

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

Merged
merged 1 commit into from
Jun 2, 2025

Conversation

jieyouxu
Copy link
Member

@jieyouxu jieyouxu commented Jun 2, 2025

Prior to stage 0 redesign, test-float-parse ran against in-tree std but now it runs against beta std. f16::FromStr is only present in in-tree std and not yet beta std, so apply cfg(not(bootstrap)) gating to unbrick ./x check --stage=0.

Fixes #141900.

./x check --stage=0 in CI is intended for follow-up.

r? @Mark-Simulacrum (or bootstrap/libs)
cc @tgross35

Prior to stage 0 redesign, `test-float-parse` ran against in-tree std
but now it runs against beta std. `f16::FromStr` were only present in
in-tree std and not yet beta std, so apply `cfg(not(bootstrap))` gating
to unbrick `./x check --stage=0`.
@jieyouxu jieyouxu changed the title [WIP] test-float-parse: apply cfg(not(bootstrap)) test-float-parse: apply cfg(not(bootstrap)) Jun 2, 2025
@jieyouxu jieyouxu marked this pull request as ready for review June 2, 2025 12:59
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 2, 2025
@jieyouxu
Copy link
Member Author

jieyouxu commented Jun 2, 2025

This makes ./x check --stage=0 pass for me locally on x86_64-unknown-linux-gnu.

@jieyouxu jieyouxu added A-testsuite Area: The testsuite used to check the correctness of rustc T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jun 2, 2025
@Mark-Simulacrum
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jun 2, 2025

📌 Commit 8788b6a has been approved by Mark-Simulacrum

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 Jun 2, 2025
@tgross35
Copy link
Contributor

tgross35 commented Jun 2, 2025

No objection to the change here to unblock things, but it seems a bit unusual that this tool tests the beta std at all. Is there any way to change it to run on in-tree std with the beta and in-tree compilers?

@jieyouxu
Copy link
Member Author

jieyouxu commented Jun 2, 2025

No objection to the change here to unblock things, but it seems a bit unusual that this tool tests the beta std at all. Is there any way to change it to run on in-tree std with the beta and in-tree compilers?

Tracked in #141920

bors added a commit that referenced this pull request Jun 2, 2025
Rollup of 5 pull requests

Successful merges:

 - #141767 (ci: use free runner for aarch64-gnu-llvm-19-1 PR job)
 - #141858 (Fix typo in `StructuralPartialEq` docs)
 - #141865 (Optionally don't steal the THIR)
 - #141874 (add f16_epsilon and f128_epsilon diagnostic items)
 - #141904 (test-float-parse: apply `cfg(not(bootstrap))`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 44ba243 into rust-lang:master Jun 2, 2025
10 checks passed
rust-timer added a commit that referenced this pull request Jun 2, 2025
Rollup merge of #141904 - jieyouxu:test-float-parse, r=Mark-Simulacrum

test-float-parse: apply `cfg(not(bootstrap))`

Prior to stage 0 redesign, `test-float-parse` ran against in-tree std but now it runs against beta std. `f16::FromStr` is only present in in-tree std and not yet beta std, so apply `cfg(not(bootstrap))` gating to unbrick `./x check --stage=0`.

Fixes #141900.

`./x check --stage=0` in CI is intended for follow-up.

r? `@Mark-Simulacrum` (or bootstrap/libs)
cc `@tgross35`
@rustbot rustbot added this to the 1.89.0 milestone Jun 2, 2025
@jieyouxu jieyouxu deleted the test-float-parse branch June 3, 2025 00:04
jieyouxu pushed a commit to jieyouxu/rustc-dev-guide that referenced this pull request Jun 3, 2025
Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#141767 (ci: use free runner for aarch64-gnu-llvm-19-1 PR job)
 - rust-lang/rust#141858 (Fix typo in `StructuralPartialEq` docs)
 - rust-lang/rust#141865 (Optionally don't steal the THIR)
 - rust-lang/rust#141874 (add f16_epsilon and f128_epsilon diagnostic items)
 - rust-lang/rust#141904 (test-float-parse: apply `cfg(not(bootstrap))`)

r? `@ghost`
`@rustbot` modify labels: rollup
@jyn514
Copy link
Member

jyn514 commented Jun 5, 2025

No objection to the change here to unblock things, but it seems a bit unusual that this tool tests the beta std at all. Is there any way to change it to run on in-tree std with the beta and in-tree compilers?

@tgross35 just to clarify: nearly all bootstrap components support being checked at any stage. for example, x check compiler --stage 0 and x check compiler --stage 1 are both valid and do different things. this pr fixed x check --stage 0 test-float-parse, but x check --stage 1 test-float-parse already worked.

(this particular component is weird because it's only to support the standard library. so probably it shouldn't support being built at stage 0, because there's no reason for it to do so, we don't build it against beta. i don't know enough about this tool to say that for sure though.)

@tgross35
Copy link
Contributor

tgross35 commented Jun 6, 2025

@tgross35 just to clarify: nearly all bootstrap components support being checked at any stage. for example, x check compiler --stage 0 and x check compiler --stage 1 are both valid and do different things. this pr fixed x check --stage 0 test-float-parse, but x check --stage 1 test-float-parse already worked.

That's great to know!

(this particular component is weird because it's only to support the standard library. so probably it shouldn't support being built at stage 0, because there's no reason for it to do so, we don't build it against beta. i don't know enough about this tool to say that for sure though.)

That sounds accurate to me - I think this tool's default stage should be 1 (like std would be I think?) and then maybe give a warning when manually run with stage 0, if that's possible possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc 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-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.

cfg(bootstrap) needed in test-float-parse
6 participants