Skip to content
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

searchindex.js: ensure that document titles are sorted before serializing index #11888

Conversation

jayaddison
Copy link
Contributor

Feature or Bugfix

  • Bugfix

Purpose

  • The intent here is to emit a determinisic searchindex.js search index; some software packages include Sphinx-constructed documentation in their build artifacts. To verify whether those software packages build reproducibly, reducing sources of non-deterministic build results is important.

Detail

  • Sort the IndexBuilder._all_titles attribute before writing a search index to the filesystem.

Relates

…documents out-of-order, it produces a different search index
…x builder; it is a dictionary and its key order may vary during parallelised builds
@AA-Turner AA-Turner merged commit 95fb0e5 into sphinx-doc:master Jan 17, 2024
20 of 22 checks passed
@jayaddison jayaddison deleted the issue-11887/searchindex-ensure-document-title-ordering branch January 17, 2024 01:09
@jayaddison
Copy link
Contributor Author

Thank you @AA-Turner!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 17, 2024
@AA-Turner AA-Turner added this to the 7.3.0 milestone Jul 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

searchindex.js: parallel HTML builds may produce non-deterministic index
2 participants