Closed
Conversation
* 'main' of github.com:/ocaml/dune: (946 commits) refactor(boot): some helpers for command line flags (ocaml#12375) refactor(boot): move file exists check to one place (ocaml#12395) Check for parameterised libraries from the compiler config (ocaml#12393) Update test/blackbox-tests/test-cases/ocaml-config-ox.t Update test/blackbox-tests/test-cases/oxcaml/ocaml-config-ox-true.t Add changes Turn the %{ocaml-config:ox} test into one file, and add a +ve test case Clarify variable vars in ocaml_config.ml Expose the ocamlc -config parameter "ox" doc: changing heading levels for sub-sections (ocaml#12389) chore(deps): bump actions/checkout from 4 to 5 (ocaml#12380) refactor(boot): remove pointless [assert false] (ocaml#12378) refactor(boot): mangling simplification (ocaml#12377) refactor(boot): move ocaml-config bindings (ocaml#12376) refactor(boot): simplify blake3 flag handling (ocaml#12379) refactor(boot): use [Module_name.t] in ocamldep parsing (ocaml#12373) refactor(boot): replace concat + filter_map with concat_map (ocaml#12374) chore: move tests to dune-init move test to virtual-libraries chore: move test to directory-targets ...
Collaborator
|
I think a version check is a good idea. We have such things for |
* 'main' of github.com:/ocaml/dune: (147 commits) cram test: test only parameter flags in merlin generation fix(oxcaml): import eta-expansion changes from opam-repo (ocaml#12563) address review comments Mask the path to the stdlib fix(oxcaml): generate merlin config for library parameters fix(melange + include_qualified): track correct `.cmj` dependencies in emit (ocaml#12531) refactor: remove some unused code in [Path] (ocaml#12558) dep_rules: don't run (transitive) `ocamldep` on single module buildables (ocaml#12555) fix(pkg): ignore project settings for building packages test(pkg): reproduce ocaml#12131 melange: add a test for module cycle checks (ocaml#12554) chore: lint check for new changes entries (ocaml#12553) feature(cram): allow for conflict detection (ocaml#12538) ci: update for ocaml 5.4 release (ocaml#12552) chore(script): generate changelog from structure (ocaml#12516) Reuse dependencies between project and tools (ocaml#12526) Introduce Io.overwrite_file test: fix dune install requiring a mandir Enable package management for more tests Add a `dune tools env` command to add dev tools to PATH (ocaml#12521) ...
5e20f90 to
4c83d4e
Compare
f30b4c8 to
53a22e8
Compare
85dcde2 to
08114d5
Compare
08114d5 to
62fccc4
Compare
62fccc4 to
47fb0b5
Compare
davesnx
commented
Oct 15, 2025
Comment on lines
+1105
to
+1130
| let setup_lib_markdown_rules sctx lib = | ||
| let* markdown_supported = supports_doc_markdown sctx in | ||
| if not markdown_supported | ||
| then Memo.return () | ||
| else ( | ||
| let target = Lib lib in | ||
| let* odocs = odoc_artefacts sctx target in | ||
| let* () = | ||
| (* because libraries with a package are handled in the package-level rule with the system shell script for all directory target, we skip packages *) | ||
| match Lib_info.package (Lib.Local.info lib) with | ||
| | Some _ -> Memo.return () | ||
| | None -> | ||
| (* when there's no package, we still need have rules for each odoc file *) | ||
| Memo.parallel_iter odocs ~f:(fun odoc -> setup_generate_markdown sctx odoc) | ||
| in | ||
| Memo.With_implicit_output.exec setup_lib_markdown_rules_def (sctx, lib)) | ||
| ;; | ||
|
|
||
| let markdown_shell_command odoc_path all_odocs ~markdown_root = | ||
| List.map all_odocs ~f:(fun odoc -> | ||
| let odocl_rel = | ||
| Path.reach (Path.build odoc.odocl_file) ~from:(Path.build markdown_root) | ||
| in | ||
| Printf.sprintf "%s markdown-generate -o . %s" odoc_path odocl_rel) | ||
| |> String.concat ~sep:" && " | ||
| ;; |
Contributor
Author
There was a problem hiding this comment.
This is technically working, but I don't think is a proper solution.
I pushed a new PR #12581 assuming that odoc supports multiple inputs as implemented here ocaml/odoc#1388
It's a bit unforunate since we will need to wait for this PR to merge (and increase the version check)
Member
|
Has been subsumed by #12581 |
rgrinberg
pushed a commit
that referenced
this pull request
Feb 6, 2026
This PR extends odoc to support markdown-generate implemented here ocaml/odoc#1341 and supported since odoc.3.1.0 but it currently depends on another PR ocaml/odoc#1388 that isn't released (that's why I do the changes in nix [`7e386e6` (#12581)](7e386e6) and If I could get another pair of eyes if it's correct) The implementation itself tried to be very similar to the html generation, except the directory targets on a flat package. The PR adds: ```bash dune build @doc-markdown ``` Based on #12477 --------- Signed-off-by: David Sancho Moreno <dsnxmoreno@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR extends odoc to support markdown-generate implemented here ocaml/odoc#1341 and supported since odoc.3.1.0
Added the odoc version check, similar to other tools.
The implementation itself tried to be very similar to the html generation, except the directory targets on a flat package (it needed to be a system action that groups all markdown-genetaration)