From a62ed12dd626401555d00ad5e09d2f63b171298b Mon Sep 17 00:00:00 2001 From: Jon Ludlam Date: Wed, 22 Jan 2025 14:19:29 +0000 Subject: [PATCH] Fixes following review --- src/odoc/bin/main.ml | 7 ++++--- test/search/html_search.t/run.t | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/odoc/bin/main.ml b/src/odoc/bin/main.ml index dc045996b9..db5d7dc31f 100644 --- a/src/odoc/bin/main.ml +++ b/src/odoc/bin/main.ml @@ -484,8 +484,8 @@ module Indexing = struct || Fpath.has_ext "js" (Fpath.v file)) -> Error (`Msg - "When generating a json index, the output must have a .json file \ - extension") + "When generating a json index, the output must have a .json or .js \ + file extension") | Some file, `Marshall when not (Fpath.has_ext "odoc-index" (Fpath.v file)) -> Error @@ -542,7 +542,8 @@ module Indexing = struct in let wrap_json = let doc = - "whether to wrap the json file. Only has an effect in json output mode." + "Not intended for general use. Wraps the json output in a JavaScript \ + variable assignment, and assumes the use of fuse.js" in Arg.(value & flag & info ~doc [ "wrap-json" ]) in diff --git a/test/search/html_search.t/run.t b/test/search/html_search.t/run.t index 3303454da0..2b52a2c789 100644 --- a/test/search/html_search.t/run.t +++ b/test/search/html_search.t/run.t @@ -235,7 +235,7 @@ Wrong file extensions: ERROR: When generating a binary index, the output must have a .odoc-index file extension [1] $ odoc compile-index --json -o index.odoc-index - ERROR: When generating a json index, the output must have a .json file extension + ERROR: When generating a json index, the output must have a .json or .js file extension [1] Passing a file which is not a correctly marshalled one: