about summary refs log tree commit diff
path: root/src/tools/rustdoc-js/tester.js
AgeCommit message (Collapse)AuthorLines
2025-08-19Strenghten rustdoc js tester file macthing regexGuillaume Gomez-1/+1
2025-08-19Fix bug where `rustdoc-js` tester would not pick the right `search.js` file ↵Guillaume Gomez-2/+20
if there is more than one
2025-08-15rustdoc-search: search backend with partitioned suffix treeMichael Howell-90/+97
2025-07-16Update rustdoc search tester to new alias outputGuillaume Gomez-25/+46
2025-03-27tester.js: ignore displayTypeSignature if it is nullbinarycat-1/+1
2025-01-16fix error for when results in a rustdoc-js test are in the wrong orderbinarycat-1/+1
see COMPILETEST_FORCE_STAGE0=1
2024-10-30rustdoc-search: show types signatures in resultsMichael Howell-11/+43
2024-10-30rustdoc-search: pass original names through ASTMichael Howell-1/+0
2024-08-29Separate core search logic with search uiFolyd-4/+3
2024-03-21rustdoc-search: compressed bitmap to sort, then load descMichael Howell-5/+0
This adds a bit more data than "pure sharding" by including information about which items have no description at all. This way, it can sort the results, then truncate, then finally download the description. With the "e" bitmap: 2380KiB Without the "e" bitmap: 2364KiB
2024-03-17Fix style errorsMichael Howell-1/+1
2024-03-16rustdoc-search: shard the search result descriptionsMichael Howell-26/+78
The descriptions are, on almost all crates[^1], the majority of the size of the search index, even though they aren't really used for searching. This makes it relatively easy to separate them into their own files. This commit also bumps us to ES8. Out of the browsers we support, all of them support async functions according to caniuse. https://caniuse.com/async-functions [^1]: <https://microsoft.github.io/windows-docs-rs/>, a crate with 44MiB of pure names and no descriptions for them, is an outlier and should not be counted.
2023-12-15rustdoc-search: remove parallel searchWords arrayMichael Howell-3/+3
This might have made sense if the algorithm could use `searchWords` to skip having to look at `searchIndex`, but since it always does a substring check on both the stock word and the normalizedName, it doesn't seem to help performance anyway.
2023-11-19rustdoc-search: add support for associated typesMichael Howell-1/+28
2023-09-03rustdoc: fix test case for generics that look like namesMichael Howell-1/+3
2023-06-09Change format of rustdoc-js tests by putting `query` and `correction` ↵Guillaume Gomez-41/+49
directly alongside the expected values
2023-04-17rustdoc: restructure type search engine to pick-and-use IDsMichael Howell-8/+46
This change makes it so, instead of mixing string distance with type unification, function signature search works by mapping names to IDs at the start, reporting to the user any cases where it had to make corrections, and then matches with IDs when going through the items. This only changes function searches. Name searches are left alone, and corrections are only done when there's a single item in the search query.
2023-03-20rustdoc: add support for type filters in arguments and genericsMichael Howell-2/+9
This makes sense, since the search index has the information in it, and it's more useful for function signature searches since a function signature search's item type is, by definition, some type of function (there's more than one, but not very many).
2023-03-11Improve rustdoc-js tester code clarity a bitGuillaume Gomez-7/+9
2023-03-11Add eslint checks for rustdoc-js testerGuillaume Gomez-38/+38
2023-03-04Clean up rustdoc-js tester.js fileGuillaume Gomez-58/+55
2023-03-02Update rustdoc-js test toolGuillaume Gomez-1/+13
2022-10-29rustdoc: add hash to filename of toolchain filesJacob Hoffman-Andrews-2/+5
All static files used by rustdoc are now stored in static.files/ and include a hash of their contents. They no longer include the contents of the --resource-suffix flag. This clarifies caching semantics. Anything in static.files can use Cache-Control: immutable because any updates will show up as a new URL. Invocation-specific files like crates-NN.js, search-index-NN.js, and sidebar-items-NN.js still get the resource suffix. The --disable-minification flag is removed because it would vary the output of static files based on invocation flags. Instead, for rustdoc development purposes it's preferable to symlink static files to a non-minified copy for quick iteration.
2022-05-17rustdoc: make search.js a moduleJacob Hoffman-Andrews-261/+44
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.
2022-04-24Update rustdoc-js tester tool to work with new kind of variablesGuillaume Gomez-4/+16
2022-04-18Add an extra check over filter typeGuillaume Gomez-1/+2
2022-04-18Parse idents the same way in both quote string elements and "normal" elementsGuillaume Gomez-1/+1
2022-04-18Handle separators in their own functions and fix missing handling of tabsGuillaume Gomez-1/+1
2022-04-18Add isIdentCharacter function to ensure that unexpected characters are ↵Guillaume Gomez-1/+2
handled correctly
2022-04-18Simplify parser syntaxGuillaume Gomez-1/+1
2022-04-18Make query parser more strict and improve display of errorsGuillaume Gomez-4/+3
2022-04-18* Greatly improve the rustdoc search parser source codeGuillaume Gomez-6/+10
* Move all functions outside parseQuery
2022-04-18Improve naming of "val" fieldGuillaume Gomez-1/+1
2022-04-18Add possibility to check parsed queryGuillaume Gomez-21/+144
2022-02-03Update tester to have FILTER_CRATE set to null if undefined.Guillaume Gomez-0/+2
2021-11-09Allow to run a specific rustdoc-js* testGuillaume Gomez-6/+12
2021-11-03Simplify js tester a bitGuillaume Gomez-7/+3
2021-08-11Fix rustdoc-js tool string "parsing"Guillaume Gomez-14/+19
Improve tool: add support for multiline comments
2021-05-15Update rustdoc-js toolsGuillaume Gomez-1/+2
2021-04-13Updated tester.js for separate search.jsJacob Hoffman-Andrews-6/+6
2021-04-01rustdoc: Separate filter-empty-string out into its own functionMichael Howell-1/+2
2021-02-01Improve diff display in case the whole key in missingGuillaume Gomez-0/+4
2021-01-18Remove inline script tagsGuillaume Gomez-2/+1
2020-11-26Improve rustdoc JS tests error outputGuillaume Gomez-0/+31
2020-06-23rustdoc: Fix doc aliases with crate filteringOliver Middleton-2/+11
Fix a crash when searching for an alias contained in the currently selected filter crate. Also remove alias search results for crates that should be filtered out. The test suite needed to be fixed to actually take into account the crate filtering and check that there are no results when none are expected.
2020-05-26Import missing functions from storage.jsGuillaume Gomez-1/+1
2020-05-14Make current crate aliases go firstGuillaume Gomez-2/+4
2020-05-07Merge aliases and search-indexGuillaume Gomez-6/+3
2020-05-07Extend rustdoc-js tester to allow to test multiple queries in one fileGuillaume Gomez-33/+65
2020-04-14Improve rustdoc js testers codeGuillaume Gomez-42/+31