Conversation
|
Some changes occurred in HTML/CSS/JS. |
This comment has been minimized.
This comment has been minimized.
|
ESLint is failing because we need to update it to accept es6, which I do in #92490. |
This comment has been minimized.
This comment has been minimized.
|
☔ The latest upstream changes (presumably #92690) made this pull request unmergeable. Please resolve the merge conflicts. |
|
triage: @jsha could you please fix the merge conflicts? |
|
@rustbot author |
|
That's correct. |
c01f48d to
3c1034d
Compare
|
I've fixed the merge conflicts and this passes tests locally. Still need to do two things:
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
c8a73ce to
3faa18a
Compare
|
This is now ready for review. |
src/tools/rustdoc-js/tester.js
Outdated
There was a problem hiding this comment.
Little nit: please add an empty line before this function.
|
This is really great! All the hacks have been removed thanks to this, it's really awesome! Just one nit then it's good for me. |
Previously, search.js relied on the DOM and the `window` object. It can now be loaded in the absence of the DOM, for instance by Node. The same is true of search-index.js. This allows removing a lot of code from src/tools/rustdoc-js/tester.js that tried to parse search.js and extract specific functions that were needed for testing.
3faa18a to
4539794
Compare
|
@bors r+ |
|
📌 Commit 4539794 has been approved by |
|
☀️ Test successful - checks-actions |
|
Finished benchmarking commit (4c5f6e6): comparison url. Summary: This benchmark run did not return any relevant results. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
Previously, rustdoc search attempted to parse search.js and extract out only certain methods and variables.
This change makes search.js and search-index.js loadable as CommonJS modules, so they can be loaded directly.
As part of that change, I had to separate execSearch from interacting with the DOM. This wound up being a nice cleanup that made more explicit what inputs it was taking.
I removed search.js' dependency on storage.js by moving hasOwnPropertyRustdoc directly into search.js, and replacing onEach with forEach in a path that is called by the tester.
r? @GuillaumeGomez
Demo: https://rustdoc.crud.net/jsha/rustdoc-search-refactor/std/?search=foo