Resolve: subdir layout for multi-package hosted projects (cross-project links)#4
Merged
Merged
Conversation
Cross-project link rewriting (Resolve.deps / the hosted table) assumed a hosted project deploys its modules either under <dir>.<side>/ (multilib) or at the version root. Multi-package projects such as js_of_ocaml and tyxml deploy each opam package under its own <pkg>/ subtree, keeping odoc's nested module layout, so their ocaml.org xrefs were left unrewritten. Replace the boolean multilib flag with a layout (multilib | root | subdir); a subdir entry rewrites a link into <dir>/latest/<pkg>/<path> verbatim and matches a whole opam family (js_of_ocaml also covers js_of_ocaml-lwt, ...). Legacy true/false tokens still parse as multilib/root.
This was referenced Jun 18, 2026
Merged
balat
added a commit
to ocsigen/eliom
that referenced
this pull request
Jun 18, 2026
Keep the (hosted ...) table in sync with master: add the js_of_ocaml/tyxml (subdir layout) and reactiveData (root) entries so cross-project links point to ocsigen.org. Avoids reverting them when this doc branch merges. Requires wodoc with the `subdir` layout (ocsigen/wodoc#4).
balat
added a commit
to ocsigen/ocsigen-toolkit
that referenced
this pull request
Jun 18, 2026
Keep the (hosted ...) table in sync with master: add the js_of_ocaml/tyxml (subdir layout) and reactiveData (root) entries so cross-project links point to ocsigen.org. Avoids reverting them when this doc branch merges. Requires wodoc with the `subdir` layout (ocsigen/wodoc#4).
balat
added a commit
to ocsigen/ocsigen-start
that referenced
this pull request
Jun 18, 2026
Keep the (hosted ...) table in sync with master: add the js_of_ocaml/tyxml (subdir layout) and reactiveData (root) entries so cross-project links point to ocsigen.org. Avoids reverting them when this doc branch merges. Requires wodoc with the `subdir` layout (ocsigen/wodoc#4).
balat
added a commit
to ocsigen/js_of_ocaml
that referenced
this pull request
Jun 18, 2026
The API is built with odoc_driver --remap, so cross-project references resolve to absolute ocaml.org links. Add a (hosted ...) table so links to TyXML and ReactiveData — Ocsigen projects with docs on ocsigen.org — are rewritten to relative links into our own deploy instead of pointing at ocaml.org. react (not an Ocsigen project) stays on ocaml.org; lwt will be added once its docs are rebuilt with wodoc (ocsigen/lwt#1109). Requires wodoc with the `subdir` layout (ocsigen/wodoc#4).
balat
added a commit
to ocsigen/eliom
that referenced
this pull request
Jun 22, 2026
Keep the (hosted ...) table in sync with master: add the js_of_ocaml/tyxml (subdir layout) and reactiveData (root) entries so cross-project links point to ocsigen.org. Avoids reverting them when this doc branch merges. Requires wodoc with the `subdir` layout (ocsigen/wodoc#4).
balat
added a commit
to ocsigen/ocsigen-start
that referenced
this pull request
Jun 22, 2026
Keep the (hosted ...) table in sync with master: add the js_of_ocaml/tyxml (subdir layout) and reactiveData (root) entries so cross-project links point to ocsigen.org. Avoids reverting them when this doc branch merges. Requires wodoc with the `subdir` layout (ocsigen/wodoc#4).
balat
added a commit
to ocsigen/ocsigen-toolkit
that referenced
this pull request
Jun 22, 2026
Keep the (hosted ...) table in sync with master: add the js_of_ocaml/tyxml (subdir layout) and reactiveData (root) entries so cross-project links point to ocsigen.org. Avoids reverting them when this doc branch merges. Requires wodoc with the `subdir` layout (ocsigen/wodoc#4).
balat
added a commit
to ocsigen/eliom
that referenced
this pull request
Jun 25, 2026
Keep the (hosted ...) table in sync with master: add the js_of_ocaml/tyxml (subdir layout) and reactiveData (root) entries so cross-project links point to ocsigen.org. Avoids reverting them when this doc branch merges. Requires wodoc with the `subdir` layout (ocsigen/wodoc#4).
balat
added a commit
to ocsigen/ocsigen-start
that referenced
this pull request
Jun 25, 2026
Keep the (hosted ...) table in sync with master: add the js_of_ocaml/tyxml (subdir layout) and reactiveData (root) entries so cross-project links point to ocsigen.org. Avoids reverting them when this doc branch merges. Requires wodoc with the `subdir` layout (ocsigen/wodoc#4).
balat
added a commit
to ocsigen/ocsigen-toolkit
that referenced
this pull request
Jun 25, 2026
Keep the (hosted ...) table in sync with master: add the js_of_ocaml/tyxml (subdir layout) and reactiveData (root) entries so cross-project links point to ocsigen.org. Avoids reverting them when this doc branch merges. Requires wodoc with the `subdir` layout (ocsigen/wodoc#4).
balat
added a commit
to ocsigen/ocsigen-toolkit
that referenced
this pull request
Jun 25, 2026
Keep the (hosted ...) table in sync with master: add the js_of_ocaml/tyxml (subdir layout) and reactiveData (root) entries so cross-project links point to ocsigen.org. Avoids reverting them when this doc branch merges. Requires wodoc with the `subdir` layout (ocsigen/wodoc#4).
balat
added a commit
to ocsigen/eliom
that referenced
this pull request
Jun 25, 2026
Keep the (hosted ...) table in sync with master: add the js_of_ocaml/tyxml (subdir layout) and reactiveData (root) entries so cross-project links point to ocsigen.org. Avoids reverting them when this doc branch merges. Requires wodoc with the `subdir` layout (ocsigen/wodoc#4).
balat
added a commit
to ocsigen/ocsigen-start
that referenced
this pull request
Jun 25, 2026
Keep the (hosted ...) table in sync with master: add the js_of_ocaml/tyxml (subdir layout) and reactiveData (root) entries so cross-project links point to ocsigen.org. Avoids reverting them when this doc branch merges. Requires wodoc with the `subdir` layout (ocsigen/wodoc#4).
Julow
pushed a commit
to Julow/ocsigen-toolkit
that referenced
this pull request
Jun 26, 2026
References to these Ocsigen projects were rewritten only for a few core packages; js_of_ocaml/tyxml/reactiveData xrefs stayed on ocaml.org. Add them to the (hosted ...) table so cross-project links point to our own deploy. js_of_ocaml and tyxml use the new `subdir` layout (one entry per opam family); reactiveData deploys its modules at the version root. Requires wodoc with the `subdir` layout (ocsigen/wodoc#4).
vouillon
pushed a commit
to ocsigen/js_of_ocaml
that referenced
this pull request
Jul 2, 2026
The API is built with odoc_driver --remap, so cross-project references resolve to absolute ocaml.org links. Add a (hosted ...) table so links to TyXML and ReactiveData — Ocsigen projects with docs on ocsigen.org — are rewritten to relative links into our own deploy instead of pointing at ocaml.org. react (not an Ocsigen project) stays on ocaml.org; lwt will be added once its docs are rebuilt with wodoc (ocsigen/lwt#1109). Requires wodoc with the `subdir` layout (ocsigen/wodoc#4).
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.
Why
When a project's docs reference another Ocsigen project,
odoc_driver --remapemits an absolutehttps://ocaml.org/p/<pkg>/…link.Resolve.deps(the(hosted …)table) rewrites those into relative links into our own ocsigen.org deploy — but only knew two deploy layouts:<dir>.<side>/(eliom, toolkit, start)Multi-package projects (js_of_ocaml, tyxml, and lwt once migrated) deploy each opam package under its own
<pkg>/subtree, keeping odoc's nested module layout. Their xrefs were therefore left pointing at ocaml.org.What
multilibflag in the hosted tuple with alayoutvariant:Multilib | Root | Subdir.Subdirrewrites a link to<dir>/latest/<pkg>/<path>verbatim (no flattening) and a single entry matches a whole opam family —js_of_ocamlalso coversjs_of_ocaml-lwt,js_of_ocaml-tyxml,wasm_of_ocaml-*, … (key +-/_separator).(pkg dir subdir)/root/multilib; legacytrue/falsestill parse asmultilib/root(no consumer change required).test/deps.tcovering all three layouts, family matching, and a non-Ocsigen dep (react) left on ocaml.org.Note
Consumer
doc/wodocconfigs (eliom, toolkit, start, tuto) gainsubdirentries for js_of_ocaml/tyxml/reactiveData in separate PRs. Those configs require this change first (their CI pins wodoc from master, so they pick it up automatically once merged).