-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Clean up rustdoc js testers #70224
Clean up rustdoc js testers #70224
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we combine these three files into a single tester.js
file that works for both test suites?
return null; | ||
} | ||
// We make a reverse sort to have the "highest" file. Very useful in case you didn't clean up | ||
// you std doc folder... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a lot of code for such an edge case.
Instead, how about passing the resource suffix as an argument to tester.js
and using that to build the filenames? That way we won't need the findFile
or readFileMatching
functions at all and there won't be any issues with outdated files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That'd make things simpler indeed!
@ollie27 I'm a bit shared on this: it'd mean adding more options, which I'm not a big fan of. |
I don't think merging the files would, but either way it can done in a follow up PR. |
@bors r+ rollup |
📌 Commit c88be65 has been approved by |
Ok, opening an issue to not lose track of it then. Thanks a lot @ollie27 ! |
#70224 (comment) still hasn't been resolved. I guess I should have been clearer but that was the reason I hadn't r+'d this. |
Rollup of 5 pull requests Successful merges: - rust-lang#68334 (AArch64 bare-metal targets: Build rust-std) - rust-lang#70224 (Clean up rustdoc js testers) - rust-lang#70532 (Miri engine: stronger type-based sanity check for assignments) - rust-lang#70698 (bootstrap: add `--json-output` for rust-analyzer) - rust-lang#70715 (Fix typo in operands section) Failed merges: r? @ghost
I realized after the improvement made by @ollie27 on the rustdoc-js-tester that a lot of code was actually duplicated. This PR intends to remove this duplication, making it simpler to update in case of future main.js updates.
r? @ollie27
cc @kinnison