Skip to content

Split mldoc library, CLI, JS and benchmark opam packages - #153

Merged
RCmerci merged 1 commit into
masterfrom
codex/mldoc-opam-package-split
Oct 14, 2026
Merged

RCmerci merged 1 commit into
masterfrom
codex/mldoc-opam-package-split

Conversation

@RCmerci

@RCmerci RCmerci commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Installing mldoc currently pulls benchmark, JavaScript and native CLI dependencies even for OCaml library consumers. Keep the existing library/API in mldoc and give each tool its own package and installation target. Parser, exporter, CLI and benchmark implementation source is unchanged.

All four packages directly require OCaml >= 4.14.0 and Dune >= 3.5.

Package Purpose / other direct dependencies
mldoc Existing library: angstrom = dev, xmlm = dev, bigstringaf, ppx_deriving_yojson, uri, yojson. alcotest, qcheck, qcheck-alcotest are with-test; odoc is with-doc.
mldoc-cli Installs the existing native mldoc command: same-version mldoc, cmdliner >= 1.1.0, lwt.
mldoc-js Installs the existing JS export as share/mldoc-js/index.js: same-version mldoc, js_of_ocaml >= 5.2.0, build-only js_of_ocaml-ppx.
mldoc-bench Installs benchmark/timing tools and example inputs: same-version mldoc, core, core_bench, core_unix; unavailable on win32.

Make defaults to the core library, with separate cli/js/bench targets and an explicit all target. npm publication builds only JS. CI checks installed packages separately for OCaml 4.14.x and 5.3.x. Existing library/export modules remain together.

Pin Angstrom to 3be9b966dc2bc9ccf9948d17a7b0df1cb526de15: the parser uses its exposed lookahead API and continuation behavior. Retain Xmlm eb469d536e98c98f2754c0ff8813c92b3a17fe9f to preserve OPML XML attribute newlines.

Validation on macOS, OCaml 5.5.0 / Dune 3.23.1:

  • Four independent package builds, actual opam installation of generated manifests, and installed-artifact smoke checks passed (external OCaml consumer, CLI file/stdin/errors, JS Node/browser context, synthetic benchmark fixtures).
  • All 6 existing regression suites passed: 271 tests, including both OPML newline cases.
  • All four opam files pass lint; shell/JS syntax, CI YAML and diff checks pass.
  • A private opam root reused compiled compiler/dependency artifacts under their original dependency constraints. opam install --assume-built consumed already-verified package builds to avoid repeating them. In that version snapshot the core's default dependency closure falls from 114 to 19, excluding compiler packages and mldoc itself.

Remote validation for head 4d623ba6128d199e1dd115d47903f3d16b463c18: CI completed successfully for all eight Linux jobs (OCaml 4.14.x / 5.3.x × four packages), including installed-artifact smoke checks and core regressions/docs. Format also passed. These versions were not run locally; Windows remains untested.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-14T14:58:37.238011Z 4d623ba PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@RCmerci
RCmerci merged commit b3e06c0 into master Oct 14, 2026
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants