Skip to content

Comments

DRAFT: rustdoc: math-core LaTeX MathML test#151918

Draft
notriddle wants to merge 2 commits intorust-lang:mainfrom
notriddle:rustdoc/math-core
Draft

DRAFT: rustdoc: math-core LaTeX MathML test#151918
notriddle wants to merge 2 commits intorust-lang:mainfrom
notriddle:rustdoc/math-core

Conversation

@notriddle
Copy link
Contributor

DO NOT MERGE AS IS

This is intended for crater to see how many crates error if we just enable math-core. This isn't an exhaustive test, because some crates will render worse without actually producing an error, but it should gives us some bug reports to open against the math-core repo.

cc @Urgau

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler 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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Jan 31, 2026
@rust-log-analyzer

This comment has been minimized.

This is intended for crater to see how many crates error if we just
enable math-core. This isn't an exhaustive test, because some crates
will render worse without actually producing an error, but it should
gives us some bug reports to open against the math-core repo.
@rustbot rustbot added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Jan 31, 2026
let mathml = self
.converter
.convert_with_local_counter(&latex, MathDisplay::Inline)
.expect("a production-ready version of this should handle the error somehow");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Obviously, we don't want to ICE on invalid $\LaTeX$. This should be fine for just figuring out how many crates are using unknown commands, or otherwise causing math-core to error.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiousity, what would we do if it errors? Just printing the latex as-is is the most obvious solution that comes to mind

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And emit a warning, too.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. We could also put the mathml behind an optional feature, that would emit hard errors on invalid code

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's just turning a warning into a hard error, we get that by implementing a warn-by-default lint.

I'm more worried about cases where we don't get an error, but the user didn't actually want LaTeX rendering. The flanking rules in pulldown-cmark's math span parser are supposed to avoid that, but I don't know how to measure their effectiveness.

@rust-log-analyzer

This comment has been minimized.

@rustbot rustbot added the T-clippy Relevant to the Clippy team. label Jan 31, 2026
@notriddle
Copy link
Contributor Author

@bors try

@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Jan 31, 2026
DRAFT: rustdoc: math-core LaTeX MathML test
@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 31, 2026

☀️ Try build successful (CI)
Build commit: a394c9c (a394c9cd9ec93787f09a7ac445b14cc674a94549, parent: 8afe9ff1caa97654c31fb8c259dac9fdf67d6302)

@notriddle
Copy link
Contributor Author

@craterbot run mode=rustdoc

@craterbot
Copy link
Collaborator

👌 Experiment pr-151918 created and queued.
🤖 Automatically detected try build a394c9c
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-crater Status: Waiting on a crater run to be completed. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 1, 2026
@craterbot
Copy link
Collaborator

🚧 Experiment pr-151918 is now running

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot
Copy link
Collaborator

🎉 Experiment pr-151918 is completed!
📊 422 regressed and 7 fixed (800961 total)
📊 2098 spurious results on the retry-regressed-list.txt, consider a retry1 if this is a significant amount.
📰 Open the summary report.

⚠️ If you notice any spurious failure please add them to the denylist!
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

Footnotes

  1. re-run the experiment with crates=https://crater-reports.s3.amazonaws.com/pr-151918/retry-regressed-list.txt

@craterbot craterbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-crater Status: Waiting on a crater run to be completed. labels Feb 8, 2026
@Urgau
Copy link
Member

Urgau commented Feb 8, 2026

Let's retry the regressed crates, crater has some issues lately.

@craterbot run mode=rustdoc name=pr-151918-2 crates=https://crater-reports.s3.amazonaws.com/pr-151918/retry-regressed-list.txt p=1

@craterbot
Copy link
Collaborator

👌 Experiment pr-151918-2 created and queued.
🤖 Automatically detected try build a394c9c
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-crater Status: Waiting on a crater run to be completed. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 8, 2026
@craterbot
Copy link
Collaborator

🚧 Experiment pr-151918-2 is now running

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot
Copy link
Collaborator

🎉 Experiment pr-151918-2 is completed!
📊 407 regressed and 0 fixed (2414 total)
📊 193 spurious results on the retry-regressed-list.txt, consider a retry1 if this is a significant amount.
📰 Open the summary report.

⚠️ If you notice any spurious failure please add them to the denylist!
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

Footnotes

  1. re-run the experiment with crates=https://crater-reports.s3.amazonaws.com/pr-151918-2/retry-regressed-list.txt

@craterbot craterbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-crater Status: Waiting on a crater run to be completed. labels Feb 9, 2026
@notriddle
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler 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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants