Docs.rs search is broken?

I can not use search for syn crate in doc.rs .

After entering to https://docs.rs/syn/0.15.33/syn/ chromium and opera reports about blocking scripts from unsafe sources. And search just show “Loading search results…” and that is all.

I doubt that this is problem on my side, because of I try from several machines from different networks, plus I even try from mobile phone via 4G network all the same (browser on mobile phone does not report about blocking content, but it is the same “Loading search results…”)

Strange enough that search in previous version of syn works fine:

https://docs.rs/syn/0.15.15/syn/?search=Macro

Is docs.rs defaced? Or something wrong with documentation generator that come with last version of rustc?

1 Like

Issue reproduced on another recent docs.rs documentation. (Android Chrome.)

I pickuped the first crate from list on the doc.rs main page, and got the same issue:

https://docs.rs/minisign/0.3.0/minisign/?search=test

Mozilla Firefox 66.0.3 / Linux 64bit

This was an issue where rustdoc changed how it laid out files in documentation, and docs.rs was not updated in time to handle it.

In https://github.com/rust-lang/rust/pull/59776, rustdoc was updated to add the “resource suffix” to the search index, so that the filename would change if a crate was rebuilt.

(This was a previous issue with in-doc search, where a crate was rebuilt to fix a visual issue in an older rustdoc, but the Cloudfront CDN had cached the old search index. Since the layout of the search index had also changed a while back, this caused issues when the search code expected the newer search index layout but received the old one. By changing the filename on each rebuild, Cloudfront would be able to load the proper file for the new version of docs.)

However, docs.rs had hard-coded a handful of paths to serve the search index, the aliases file, and the source file listing, which were now outdated, since the filenames were going to change each time rustdoc was updated. I had intended https://github.com/rust-lang/docs.rs/pull/329 to land before updating, but the PR did not work as intended the first time, and i ran out of time to fix it before we started building lots of new crates with the updated rustdoc. However, i was able to come back to it this morning, fix it up, and deploy it. New crates should be able to load their new search indexes now.

4 Likes

@QuietMisdreavus are you planning on re-generating the docs for crates that have broken docs?

@jethrogb Existing docs whose search was broken should not need to be rebuilt to get search working. (Separate issues have been found with this version of rustdoc that’s currently in use, so it’s possible, but i don’t like to mass-rebuild because i have to block the new-crate queue while i rebuild crates. The issue with search should be resolved without rebuilding, though.)

I can confirm that for at least the crate I linked, the effected version’s search is working again.

You're right, great!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.