From b9ca108fcae2b738ca3f0c88c84ae5dc5a6f843f Mon Sep 17 00:00:00 2001 From: Tim Ryan Date: Mon, 14 May 2018 06:22:21 -0400 Subject: [PATCH] Support reproducible builds by forcing window.search to use stable key ordering. (#692) See --- src/vendor/mdbook/src/renderer/html_handlebars/search.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/vendor/mdbook/src/renderer/html_handlebars/search.rs b/src/vendor/mdbook/src/renderer/html_handlebars/search.rs index d49772f8b..1ee66a511 100644 --- a/src/vendor/mdbook/src/renderer/html_handlebars/search.rs +++ b/src/vendor/mdbook/src/renderer/html_handlebars/search.rs @@ -205,6 +205,10 @@ fn write_to_js(index: Index, search_config: &Search) -> Result { searchoptions, index, }; + + // By converting to serde_json::Value as an intermediary, we use a + // BTreeMap internally and can force a stable ordering of map keys. + let json_contents = serde_json::to_value(&json_contents)?; let json_contents = serde_json::to_string(&json_contents)?; Ok(format!("window.search = {};", json_contents)) ve' href='/guix/log/gnu/packages/perl-web.scm'>logtreecommitdiff
AgeCommit message (Expand)Author
2019-04-14gnu: Add perl-uri-db....* gnu/packages/perl-web.scm (perl-uri-db): New variable. Christopher Baines
2019-04-14gnu: Add perl-uri-nested....* gnu/packages/perl-web.scm (perl-uri-nested): New variable. Christopher Baines
2019-03-25gnu: perl-uri-escape: Update source tarball URL....* gnu/packages/perl-web.scm (perl-uri-escape)[source]: Update URL. Oleg Pykhalov
2019-03-23gnu: perl-uri-escape: Update to 1.76....* gnu/packages/perl-web.scm (perl-uri-escape): Update to 1.76. Tobias Geerinckx-Rice
2018-06-24gnu: perl-uri-escape: Update to 1.74....* gnu/packages/perl-web.scm (perl-uri-escape): Update to 1.74. Oleg Pykhalov
2018-03-26gnu: Add perl-uri-escape....* gnu/packages/perl-web.scm (perl-uri-escape): New public variable. Oleg Pykhalov
2017-12-23gnu: perl-mojolicious: Update to 7.59....* gnu/packages/perl-web.scm (perl-mojolicious): Update to 7.59. Tobias Geerinckx-Rice