Skip to content

Commit

Permalink
Impl generation: review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
panglesd committed Aug 22, 2024
1 parent 82c5e10 commit 3e332c9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 20 deletions.
3 changes: 1 addition & 2 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
`count-occurrences` flag and command to count occurrences of every identifiers
(@panglesd, #976)
- Separate compilation of interface and implementation files, using a new
`compile-src` command (@panglesd, #1067).
`compile-src` command (@panglesd, #1067, #1188).
- Add clock emoji before `@since` tag (@yawaramin, #1089)
- Navigation for the search bar : use '/' to enter search, up and down arrows to
select a result, and enter to follow the selected link. (@EmileTrotignon, #1088)
Expand All @@ -26,7 +26,6 @@
(@panglesd, #1076).
- Added a `compile-asset` command (@EmileTrotignon, @panglesd, #1170)
- Allow referencing assets (@panglesd, #1171)
- Clean up CLI API for implementations (@panglesd, #1188)

### Changed

Expand Down
6 changes: 3 additions & 3 deletions src/odoc/bin/main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@ end = struct
let generate ~docs = Generate.(cmd, info ~docs)

module Generate_source = struct
let generate extra _hidden output_dir syntax extra_suffix input_file
let generate extra output_dir syntax extra_suffix input_file
warnings_options source_file =
Rendering.generate_source_odoc ~renderer:R.renderer ~warnings_options
~syntax ~output:output_dir ~extra_suffix ~source_file extra input_file
Expand All @@ -873,7 +873,7 @@ end = struct
Arg.(
required
& opt (some convert_fpath) None
& info [ "impl" ] ~doc ~docv:"impl-file.odocl")
& info [ "impl" ] ~doc ~docv:"impl-FILE.odocl")

let source_file =
let doc = "Source code for the implementation unit." in
Expand All @@ -893,7 +893,7 @@ end = struct
in
Term.(
const handle_error
$ (const generate $ R.extra_args $ hidden $ dst ~create:true () $ syntax
$ (const generate $ R.extra_args $ dst ~create:true () $ syntax
$ extra_suffix $ input_odocl $ warnings_options $ source_file))

let info ~docs =
Expand Down
15 changes: 0 additions & 15 deletions src/odoc/rendering.ml
Original file line number Diff line number Diff line change
Expand Up @@ -165,18 +165,3 @@ let targets_source_odoc ~syntax ~warnings_options ~renderer ~output:root_dir
Ok ()
| Page_content _ | Unit_content _ | Asset_content _ ->
Error (`Msg "Expected an implementation unit")
(* let docs = *)
(* if Fpath.get_ext odoctree = ".odoc" then *)
(* documents_of_input ~renderer ~extra ~resolver ~warnings_options ~syntax *)
(* odoctree *)
(* else documents_of_odocl ~warnings_options ~renderer ~extra ~syntax odoctree *)
(* in *)
(* docs >>= fun docs -> *)
(* List.iter *)
(* (fun doc -> *)
(* let pages = renderer.Renderer.render extra None doc in *)
(* Renderer.traverse pages ~f:(fun filename _content -> *)
(* let filename = Fpath.normalize @@ Fs.File.append root_dir filename in *)
(* Format.printf "%a\n" Fpath.pp filename)) *)
(* docs; *)
(* Ok () *)

0 comments on commit 3e332c9

Please sign in to comment.