-
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
Rustdoc migrate to table so the gui can handle >2k constants #88816
Conversation
r? @ollie27 (rust-highfive has picked a reviewer for you, use r? to override) |
Might be worth it to add a check on test and/or rustdoc hash version to check if we need to rebuild docs or not, even more with this change... Or maybe we could just create this file once and for all. Not sure what's the best solution here. An opinion @Mark-Simulacrum ? |
I marked this PR as blocked until #88776 is merged. |
Do you mean that we only run the tests that have failed or are new? Or about (re-)generating the HTML and such?
We can store the generated file too, sure |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I implemented both layouts with a table like structure but using |
4f36a35
to
bca503f
Compare
Oh wow, that's awesome! So just remains to generate a 2000 line file with the constants I guess for the GUI test? :) Once done, let's merge it, great work, thanks! |
Please don't check in a 2000-line generated file, we can generate it at test runtime quickly enough that it shouldn't be necessary to pregenerate and bloat everyone's repository unnecessarily.
I'd be interested in hearing more about our motivation for adding this test, though. Based on what's been said so far, it sounds like the test is intended to avoid us regressing back to using grids specifically for this feature -- but that seems like the wrong thing to target. In practice, if grids are problematic with large tables -- whether the clamp is at 1000 or 10,000 doesn't seem like it matters that much in practice - then it seems like the better approach is to add a tidy lint preventing their usage in our css files. Obviously, if we know ahead of time that the lint doesn't apply to some statically known small-size user, then we can avoid it in that case. But this would both save on the generation of a 2k line file and the related annoyances (e.g., test run time, etc.) and target the problem more holistically, right? |
@Mark-Simulacrum Then we need to improve how we run GUI tests because currently we regenerate test docs every time whether or not something was changed. I can do that in a follow-up PR. Also, @dns2utf8 removed the grid and replaced it with something else, completely fixing the issue. |
This seems to have nothing to do with my request? I expect each test to either run from scratch or not at all. We can add some caching atop that similar to compiletest, though.
Yes, I gathered that. What I'm saying is that testing that we can support 2,000 constants doesn't seem necessary, we can test directly for grid usage and lint against that. |
Then I don't understand what you mean. |
Currently, there is no use of grid layouts in rustdoc and adding a lint that prevents their use could work too for now. If we decide to use a grid in the future for something else (like switching the layout between super large desktops and 1080p-like desktops) then the check might get removed again. Adding a comment to the lint could reduce that risk again. Wild idea (maybe a bad one): what if we move some of the tests into a separate folder that is only run at release? |
No, we don't want a special category of tests, those just cause pain all around. Yes, the lint would prevent usage of grids by accident; the reviewer/author could of course justify the usage in specific cases and silence the lint on that particular usage. Tidy lints don't just get dropped, so this would be a reliable way of ensuring we don't make this mistake in the future at very low overhead. |
I'm very curious on how you want to write such a lint considering all the debate around #86178 (which is still open)... |
Oh right, I had in mind potential adds through inline CSS (very unlikely) and through JS. Wel, if we don't consider those two, it should be easy enough. |
A CSS lint seems reasonable. If we want to keep the long check: what if we reexport some huge module (like one with the arm platform constants) in the test docs and use that for checking? |
Triage:
this has been merged |
📌 Commit bca503f0687ea9f5aa0c8e6839963ea8947068f6 has been approved by |
… that overlay row entries after a UA specific amount of rows
bca503f
to
e599e2d
Compare
@bors r=GuillaumeGomez Squashed the commits down a little. |
📌 Commit e599e2d has been approved by |
Thank you @Mark-Simulacrum for rebasing it! 😊 |
…nts, r=GuillaumeGomez Rustdoc migrate to table so the gui can handle >2k constants Closes rust-lang#88545. This PR adds a test for overlapping entries in the `item-table` rust-lang#88545 It currently includes the commit with the workaround from rust-lang#88776
…arth Rollup of 12 pull requests Successful merges: - rust-lang#87631 (os current_exe using same approach as linux to get always the full ab…) - rust-lang#88234 (rustdoc-json: Don't ignore impls for primitive types) - rust-lang#88651 (Use the 64b inner:monotonize() implementation not the 128b one for aarch64) - rust-lang#88816 (Rustdoc migrate to table so the gui can handle >2k constants) - rust-lang#89244 (refactor: VecDeques PairSlices fields to private) - rust-lang#89364 (rustdoc-json: Encode json files with UTF-8) - rust-lang#89423 (Fix ICE caused by non_exaustive_omitted_patterns struct lint) - rust-lang#89426 (bootstrap: add config option for nix patching) - rust-lang#89462 (haiku thread affinity build fix) - rust-lang#89482 (Follow the diagnostic output style guide) - rust-lang#89504 (Don't suggest replacing region with 'static in NLL) - rust-lang#89535 (fix busted JavaScript in error index generator) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
…st, r=Mark-Simulacrum Don't rebuild GUI test crates every time you run test src/test/rustdoc-gui This method has multiple advantages: * It'll completely remove the rustdoc-GUI test doc folder if rustdoc was updated * It'll rebuild GUI test crates only they have been updated All in all, it's quite convenient! (even more with rust-lang#88816) r? `@Mark-Simulacrum`
…st, r=Mark-Simulacrum Don't rebuild GUI test crates every time you run test src/test/rustdoc-gui This method has multiple advantages: * It'll completely remove the rustdoc-GUI test doc folder if rustdoc was updated * It'll rebuild GUI test crates only they have been updated All in all, it's quite convenient! (even more with rust-lang#88816) r? ``@Mark-Simulacrum``
…st, r=Mark-Simulacrum Don't rebuild GUI test crates every time you run test src/test/rustdoc-gui This method has multiple advantages: * It'll completely remove the rustdoc-GUI test doc folder if rustdoc was updated * It'll rebuild GUI test crates only they have been updated All in all, it's quite convenient! (even more with rust-lang#88816) r? ```@Mark-Simulacrum```
Closes #88545.
This PR adds a test for overlapping entries in the
item-table
#88545It currently includes the commit with the workaround from #88776