Skip to content

Conversation

GuillaumeGomez
Copy link
Member

@GuillaumeGomez GuillaumeGomez commented Aug 4, 2025

Fixes #144798.

Hopefully it will work with the new changes in libtest without needing to do both at once.

This PR moves the rustdoc merged doctest extra information directly into libtest to ensure they share the same rendering to prevent the bug uncovered in #144798.

cc @lolbinary (as you reviewed the first PR)

And since we're making changes to libtest:

r? @Amanieu

@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Aug 4, 2025
@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez
Copy link
Member Author

This is very frustrating that libtest cannot be used like any other dependency. Is there a reason to that @Kobzol ?

@Kobzol
Copy link
Member

Kobzol commented Aug 4, 2025

Well, that is kind one of the outputs of the stage0 redesign. cfg(bootstrap) has moved from the stdlib to the compiler (so rustc and rustdoc). If you need to use new unstable library APIs (which includes libtest) in rustc/rustdoc, you have to support both stage0 and stage1 with cfg(bootstrap) until beta is bumped.

@GuillaumeGomez
Copy link
Member Author

Like usual, I will wait for the separate PR I opened to be merged and available.

@lolbinarycat
Copy link
Contributor

We could just decide stage 1 rustdoc shouldn't exist, though that would mean that testing rustdoc would be slightly more work if you're not using download-rustc, since you could no longer just run the tests against stage1 rustdoc to prevent an extra rebuild of rustc (useful when making changes to compiler queries only used by rustdoc)

@GuillaumeGomez
Copy link
Member Author

I'd rather not. ^^'

Once upon a time, changing libtest worked fine with rustdoc stage 1. Not sure when and why it changed, makes things more convoluted.

@Kobzol
Copy link
Member

Kobzol commented Aug 5, 2025

It changed with the stage0 redesign. Before building in-tree libstd was required to build rustc, but not anymore (https://blog.rust-lang.org/inside-rust/2025/05/29/redesigning-the-initial-bootstrap-sequence/).

Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 8, 2025
…merged-doctests, r=Amanieu

Add new `test::print_merged_doctests_times` used by rustdoc to display more detailed time information

This PR is the first commit of rust-lang#144908. Sadly, it seems like we can't do all of it at once...

r? `@Amanieu`
Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 8, 2025
…merged-doctests, r=Amanieu

Add new `test::print_merged_doctests_times` used by rustdoc to display more detailed time information

This PR is the first commit of rust-lang#144908. Sadly, it seems like we can't do all of it at once...

r? ``@Amanieu``
rust-timer added a commit that referenced this pull request Aug 8, 2025
Rollup merge of #144909 - GuillaumeGomez:extend-libtest-for-merged-doctests, r=Amanieu

Add new `test::print_merged_doctests_times` used by rustdoc to display more detailed time information

This PR is the first commit of #144908. Sadly, it seems like we can't do all of it at once...

r? ``@Amanieu``
@GuillaumeGomez GuillaumeGomez force-pushed the fix-doctest-output-json branch from 2413d04 to 51087b2 Compare August 8, 2025 16:21
@rust-log-analyzer

This comment has been minimized.

github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Aug 9, 2025
…ctests, r=Amanieu

Add new `test::print_merged_doctests_times` used by rustdoc to display more detailed time information

This PR is the first commit of rust-lang/rust#144908. Sadly, it seems like we can't do all of it at once...

r? ``@Amanieu``
@bors
Copy link
Collaborator

bors commented Aug 10, 2025

☔ The latest upstream changes (presumably #145210) made this pull request unmergeable. Please resolve the merge conflicts.

github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request Aug 12, 2025
…merged-doctests, r=Amanieu

Add new `test::print_merged_doctests_times` used by rustdoc to display more detailed time information

This PR is the first commit of rust-lang#144908. Sadly, it seems like we can't do all of it at once...

r? ``@Amanieu``
@GuillaumeGomez GuillaumeGomez force-pushed the fix-doctest-output-json branch from 51087b2 to 4a22063 Compare October 3, 2025 16:14
@rustbot
Copy link
Collaborator

rustbot commented Oct 3, 2025

This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@GuillaumeGomez
Copy link
Member Author

Since new libtest version was released, CI is now happy. Still need to change how libtest is handled in bootstrap.

@GuillaumeGomez
Copy link
Member Author

r? fmease

@rustbot rustbot assigned fmease and unassigned Amanieu Oct 3, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 3, 2025

fmease is not on the review rotation at the moment.
They may take a while to respond.

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 4, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 4, 2025
…json, r=fmease

Fix doctest output json

Fixes rust-lang#144798.

Hopefully it will work with the new changes in `libtest` without needing to do both at once.

This PR moves the `rustdoc` merged doctest extra information directly into `libtest` to ensure they share the same rendering to prevent the bug uncovered in rust-lang#144798.

cc `@lolbinary` (as you reviewed the first PR)

And since we're making changes to `libtest`:

r? `@Amanieu`
bors added a commit that referenced this pull request Oct 5, 2025
Rollup of 6 pull requests

Successful merges:

 - #143900 ([rustdoc] Correctly handle `should_panic` doctest attribute and fix `--no-run` test flag on the 2024 edition)
 - #144908 (Fix doctest output json)
 - #147309 (Add documentation about unwinding to wasm targets)
 - #147328 (Implement non-poisoning `Mutex::with_mut`, `RwLock::with` and `RwLock::with_mut`)
 - #147337 (Make `fmt::Write` a diagnostic item)
 - #147349 (Improve the advice given by panic_immediate_abort)

r? `@ghost`
`@rustbot` modify labels: rollup
@Zalathar
Copy link
Contributor

Zalathar commented Oct 5, 2025

Failed in rollup (test-various): #147352 (comment)

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 5, 2025
@Zalathar
Copy link
Contributor

Zalathar commented Oct 5, 2025

@bors try jobs=test-various

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Oct 5, 2025
Fix doctest output json

try-job: test-various
@rust-log-analyzer

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented Oct 5, 2025

💔 Test for 588437d failed: CI. Failed jobs:

@fmease
Copy link
Member

fmease commented Oct 5, 2025

Likely needs ignore-cross-compile instead of needs-target-std, we seem to be executing an incompatible binary.

@GuillaumeGomez GuillaumeGomez force-pushed the fix-doctest-output-json branch from 605496b to 99c7959 Compare October 5, 2025 09:13
@GuillaumeGomez
Copy link
Member Author

Thanks for the hint! Let's check if it works now.

@bors try jobs=test-various

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Oct 5, 2025
Fix doctest output json

try-job: test-various
@rust-bors
Copy link

rust-bors bot commented Oct 5, 2025

☀️ Try build successful (CI)
Build commit: d396f05 (d396f05cb466fb8a8ef7cabe171e5a8ec2d527a9, parent: e2c96cc06bdbdbc6f59c7551194d6a742260d6ff)

@GuillaumeGomez
Copy link
Member Author

Seems like it fixed the issue, thanks @fmease!

@bors r=fmease rollup

@bors
Copy link
Collaborator

bors commented Oct 5, 2025

📌 Commit 99c7959 has been approved by fmease

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 5, 2025
bors added a commit that referenced this pull request Oct 5, 2025
Rollup of 5 pull requests

Successful merges:

 - #144908 (Fix doctest output json)
 - #147262 (Make #[link="dl"] an FCW rather than an error)
 - #147364 (update autodiff testcases)
 - #147367 (Trivial code cleanup in resolve)
 - #147369 (Fill out AVR target metadata)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit cc1a806 into rust-lang:master Oct 5, 2025
11 checks passed
@rustbot rustbot added this to the 1.92.0 milestone Oct 5, 2025
rust-timer added a commit that referenced this pull request Oct 5, 2025
Rollup merge of #144908 - GuillaumeGomez:fix-doctest-output-json, r=fmease

Fix doctest output json

Fixes #144798.

Hopefully it will work with the new changes in `libtest` without needing to do both at once.

This PR moves the `rustdoc` merged doctest extra information directly into `libtest` to ensure they share the same rendering to prevent the bug uncovered in #144798.

cc `@lolbinary` (as you reviewed the first PR)

And since we're making changes to `libtest`:

r? `@Amanieu`
@GuillaumeGomez GuillaumeGomez deleted the fix-doctest-output-json branch October 6, 2025 10:16
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 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[rustdoc] Non-json time diagnostics in stdout when using --format json
9 participants