Skip to content

Driver and convention: includes libs from packages in odoc-config.sexp#1343

Merged
jonludlam merged 4 commits intoocaml:masterfrom
panglesd:include-libs-from-packages
Jun 18, 2025
Merged

Driver and convention: includes libs from packages in odoc-config.sexp#1343
jonludlam merged 4 commits intoocaml:masterfrom
panglesd:include-libs-from-packages

Conversation

@panglesd
Copy link
Copy Markdown
Collaborator

Currently, the packages and libraries fields of odoc-config.sexp are used to determine what can be referenced. More precisely:

(libraries lib1)
(packages pkg1)

in odoc-config.sexp means that we can reference the pages from pkg1 and the modules from lib1.

This forces the doc author to specify both if they want to references pages and modules. For instance, to be able to both reference the brr ffi manual and the Brr module, one would need the following odoc-config.sexp:

(libraries brr)
(packages brr)

This feels redundant. Moreover, the driver anyway needs to group libraries in packages. With this PR, I propose to update the convention so that the (packages ...) field allows to link both pages and the modules of a library belonging to the package. In the example, the following would suffice:

(package brr)

I updated both the docs, and the odoc reference driver.

panglesd added 4 commits May 19, 2025 16:25
This allows to reference libraries from packages that were added to
`odoc-config.sexp`'s `(packages ...)` field, without having to explicit add the
library to the `(libraries ...)` field. This makes it less cumbersome to use.
@panglesd
Copy link
Copy Markdown
Collaborator Author

🏓 @jonludlam :)!

@jonludlam
Copy link
Copy Markdown
Member

Looks good, thanks!

@jonludlam jonludlam merged commit 2a432ab into ocaml:master Jun 18, 2025
10 of 11 checks passed
panglesd added a commit to panglesd/dune that referenced this pull request Jul 1, 2025
Remove the need to specify library dependencies. This is not anymore needed
since ocaml/odoc#1343

Use `(documentation (depends ...))` for package dependencies. It's good for
extensibility of per-package doc configuration.
panglesd added a commit to panglesd/dune that referenced this pull request Jul 1, 2025
Remove the need to specify library dependencies. This is not anymore needed
since ocaml/odoc#1343

Use `(documentation (depends ...))` for package dependencies. It's good for
extensibility of per-package doc configuration.

Signed-off-by: Paul-Elliot <peada@free.fr>
panglesd added a commit to panglesd/dune that referenced this pull request Jul 2, 2025
Remove the need to specify library dependencies. This is not anymore needed
since ocaml/odoc#1343

Use `(documentation (depends ...))` for package dependencies. It's good for
extensibility of per-package doc configuration.

Signed-off-by: Paul-Elliot <peada@free.fr>
jonludlam added a commit to jonludlam/opam-repository that referenced this pull request Jul 10, 2025
CHANGES:

### Added
- Exposed sherlodoc libraries for use in other projects (@jonludlam, ocaml/odoc#1349)
- OCaml 5.4.0 support (@Octachron, ocaml/odoc#1355)
- New arguments to LaTeX generator, --shorten-beyond-depth and
  --remove-functor-arg-link (@Octachron, ocaml/odoc#1337)
- New experimental markdown generator (@davesnx, ocaml/odoc#1341)

### Changed
- Remove cmdliner compatibility layer, no longer needed (@dbuenzli, ocaml/odoc#1328)
- Drop support for OCaml < 4.08 (@jonludlam, ocaml/odoc#1300)
- Allow referencing libraries from package added in `odoc-config.sexp`
  (@panglesd, ocaml/odoc#1343)
- Use full path in heading labels in LaTeX backend (@Octachron, ocaml/odoc#1332)
- Separate page from anchor in LaTeX labels to prevent collisions (@Octachron,
  ocaml/odoc#1337)

### Fixed
- Fix bug in parsing META files when there are no dependencies (@jonludlam, ocaml/odoc#1352)
- Fix ocaml/odoc#1335 - incorrect rendering when on medium screen size with no global
  sidebar (@lukemaurer, ocaml/odoc#1361)
- Fixed generation of occurrences for docs CI (@jonludlam, ocaml/odoc#1362)
jonludlam added a commit to jonludlam/opam-repository that referenced this pull request Jul 10, 2025
CHANGES:

- Exposed sherlodoc libraries for use in other projects (@jonludlam, ocaml/odoc#1349)
- OCaml 5.4.0 support (@Octachron, ocaml/odoc#1355)
- New arguments to LaTeX generator, --shorten-beyond-depth and
  --remove-functor-arg-link (@Octachron, ocaml/odoc#1337)
- New experimental markdown generator (@davesnx, ocaml/odoc#1341)

- Remove cmdliner compatibility layer, no longer needed (@dbuenzli, ocaml/odoc#1328)
- Drop support for OCaml < 4.08 (@jonludlam, ocaml/odoc#1300)
- Allow referencing libraries from package added in `odoc-config.sexp`
  (@panglesd, ocaml/odoc#1343)
- Use full path in heading labels in LaTeX backend (@Octachron, ocaml/odoc#1332)
- Separate page from anchor in LaTeX labels to prevent collisions (@Octachron,
  ocaml/odoc#1337)

- Fix bug in parsing META files when there are no dependencies (@jonludlam, ocaml/odoc#1352)
- Fix ocaml/odoc#1335 - incorrect rendering when on medium screen size with no global
  sidebar (@lukemaurer, ocaml/odoc#1361)
- Fixed generation of occurrences for docs CI (@jonludlam, ocaml/odoc#1362)
jonludlam added a commit to jonludlam/opam-repository that referenced this pull request Jul 15, 2025
CHANGES:

### Added
- Exposed sherlodoc libraries for use in other projects (@jonludlam, ocaml/odoc#1349)
- OCaml 5.4.0 support (@Octachron, ocaml/odoc#1355)
- New arguments to LaTeX generator, --shorten-beyond-depth and
  --remove-functor-arg-link (@Octachron, ocaml/odoc#1337)
- New experimental markdown generator (@davesnx, ocaml/odoc#1341)

### Changed
- Remove cmdliner compatibility layer, no longer needed (@dbuenzli, ocaml/odoc#1328)
- Drop support for OCaml < 4.08 (@jonludlam, ocaml/odoc#1300)
- Allow referencing libraries from package added in `odoc-config.sexp`
  (@panglesd, ocaml/odoc#1343)
- Use full path in heading labels in LaTeX backend (@Octachron, ocaml/odoc#1332)
- Separate page from anchor in LaTeX labels to prevent collisions (@Octachron,
  ocaml/odoc#1337)

### Fixed
- Fix bug in parsing META files when there are no dependencies (@jonludlam, ocaml/odoc#1352)
- Fix ocaml/odoc#1335 - incorrect rendering when on medium screen size with no global
  sidebar (@lukemaurer, ocaml/odoc#1361)
- Fixed generation of occurrences for docs CI (@jonludlam, ocaml/odoc#1362)
- Partial fix for ocaml/odoc#1369 - ensure that we never create a link to a hidden page
  (@jonludlam, ocaml/odoc#1370)
jonludlam added a commit to jonludlam/opam-repository that referenced this pull request Jul 15, 2025
CHANGES:

- Exposed sherlodoc libraries for use in other projects (@jonludlam, ocaml/odoc#1349)
- OCaml 5.4.0 support (@Octachron, ocaml/odoc#1355)
- New arguments to LaTeX generator, --shorten-beyond-depth and
  --remove-functor-arg-link (@Octachron, ocaml/odoc#1337)
- New experimental markdown generator (@davesnx, ocaml/odoc#1341)

- Remove cmdliner compatibility layer, no longer needed (@dbuenzli, ocaml/odoc#1328)
- Drop support for OCaml < 4.08 (@jonludlam, ocaml/odoc#1300)
- Allow referencing libraries from package added in `odoc-config.sexp`
  (@panglesd, ocaml/odoc#1343)
- Use full path in heading labels in LaTeX backend (@Octachron, ocaml/odoc#1332)
- Separate page from anchor in LaTeX labels to prevent collisions (@Octachron,
  ocaml/odoc#1337)

- Fix bug in parsing META files when there are no dependencies (@jonludlam, ocaml/odoc#1352)
- Fix ocaml/odoc#1335 - incorrect rendering when on medium screen size with no global
  sidebar (@lukemaurer, ocaml/odoc#1361)
- Fixed generation of occurrences for docs CI (@jonludlam, ocaml/odoc#1362)
- Partial fix for ocaml/odoc#1369 - ensure that we never create a link to a hidden page
  (@jonludlam, ocaml/odoc#1370)
jonludlam pushed a commit to jonludlam/dune that referenced this pull request Dec 11, 2025
Remove the need to specify library dependencies. This is not anymore needed
since ocaml/odoc#1343

Use `(documentation (depends ...))` for package dependencies. It's good for
extensibility of per-package doc configuration.

Signed-off-by: Paul-Elliot <peada@free.fr>
jonludlam pushed a commit to jonludlam/dune that referenced this pull request Dec 18, 2025
Remove the need to specify library dependencies. This is not anymore needed
since ocaml/odoc#1343

Use `(documentation (depends ...))` for package dependencies. It's good for
extensibility of per-package doc configuration.

Signed-off-by: Paul-Elliot <peada@free.fr>
jonludlam pushed a commit to jonludlam/dune that referenced this pull request Jan 14, 2026
Remove the need to specify library dependencies. This is not anymore needed
since ocaml/odoc#1343

Use `(documentation (depends ...))` for package dependencies. It's good for
extensibility of per-package doc configuration.

Signed-off-by: Paul-Elliot <peada@free.fr>
Leonidas-from-XIV pushed a commit to Leonidas-from-XIV/dune that referenced this pull request Jan 28, 2026
Remove the need to specify library dependencies. This is not anymore needed
since ocaml/odoc#1343

Use `(documentation (depends ...))` for package dependencies. It's good for
extensibility of per-package doc configuration.

Signed-off-by: Paul-Elliot <peada@free.fr>
Leonidas-from-XIV pushed a commit to Leonidas-from-XIV/dune that referenced this pull request Jan 28, 2026
Remove the need to specify library dependencies. This is not anymore needed
since ocaml/odoc#1343

Use `(documentation (depends ...))` for package dependencies. It's good for
extensibility of per-package doc configuration.

Signed-off-by: Paul-Elliot <peada@free.fr>
Signed-off-by: Marek Kubica <marek@tarides.com>
Leonidas-from-XIV pushed a commit to Leonidas-from-XIV/dune that referenced this pull request Jan 28, 2026
Remove the need to specify library dependencies. This is not anymore needed
since ocaml/odoc#1343

Use `(documentation (depends ...))` for package dependencies. It's good for
extensibility of per-package doc configuration.

Signed-off-by: Paul-Elliot <peada@free.fr>
Signed-off-by: Marek Kubica <marek@tarides.com>
Leonidas-from-XIV pushed a commit to Leonidas-from-XIV/dune that referenced this pull request Jan 30, 2026
Remove the need to specify library dependencies. This is not anymore needed
since ocaml/odoc#1343

Use `(documentation (depends ...))` for package dependencies. It's good for
extensibility of per-package doc configuration.

Signed-off-by: Paul-Elliot <peada@free.fr>
Signed-off-by: Marek Kubica <marek@tarides.com>
Leonidas-from-XIV pushed a commit to Leonidas-from-XIV/dune that referenced this pull request Feb 2, 2026
Remove the need to specify library dependencies. This is not anymore needed
since ocaml/odoc#1343

Use `(documentation (depends ...))` for package dependencies. It's good for
extensibility of per-package doc configuration.

Signed-off-by: Paul-Elliot <peada@free.fr>
Signed-off-by: Marek Kubica <marek@tarides.com>
Leonidas-from-XIV pushed a commit to Leonidas-from-XIV/dune that referenced this pull request Feb 2, 2026
Remove the need to specify library dependencies. This is not anymore needed
since ocaml/odoc#1343

Use `(documentation (depends ...))` for package dependencies. It's good for
extensibility of per-package doc configuration.

Signed-off-by: Paul-Elliot <peada@free.fr>
Signed-off-by: Marek Kubica <marek@tarides.com>
Leonidas-from-XIV pushed a commit to Leonidas-from-XIV/dune that referenced this pull request Feb 3, 2026
Remove the need to specify library dependencies. This is not anymore needed
since ocaml/odoc#1343

Use `(documentation (depends ...))` for package dependencies. It's good for
extensibility of per-package doc configuration.

Signed-off-by: Paul-Elliot <peada@free.fr>
Signed-off-by: Marek Kubica <marek@tarides.com>
Leonidas-from-XIV pushed a commit to Leonidas-from-XIV/dune that referenced this pull request Feb 5, 2026
Remove the need to specify library dependencies. This is not anymore needed
since ocaml/odoc#1343

Use `(documentation (depends ...))` for package dependencies. It's good for
extensibility of per-package doc configuration.

Signed-off-by: Paul-Elliot <peada@free.fr>
Signed-off-by: Marek Kubica <marek@tarides.com>
Leonidas-from-XIV pushed a commit to Leonidas-from-XIV/dune that referenced this pull request Feb 6, 2026
Remove the need to specify library dependencies. This is not anymore needed
since ocaml/odoc#1343

Use `(documentation (depends ...))` for package dependencies. It's good for
extensibility of per-package doc configuration.

Signed-off-by: Paul-Elliot <peada@free.fr>
Signed-off-by: Marek Kubica <marek@tarides.com>
Leonidas-from-XIV pushed a commit to Leonidas-from-XIV/dune that referenced this pull request Feb 6, 2026
Remove the need to specify library dependencies. This is not anymore needed
since ocaml/odoc#1343

Use `(documentation (depends ...))` for package dependencies. It's good for
extensibility of per-package doc configuration.

Signed-off-by: Paul-Elliot <peada@free.fr>
Signed-off-by: Marek Kubica <marek@tarides.com>
Leonidas-from-XIV pushed a commit to Leonidas-from-XIV/dune that referenced this pull request Feb 10, 2026
Remove the need to specify library dependencies. This is not anymore needed
since ocaml/odoc#1343

Use `(documentation (depends ...))` for package dependencies. It's good for
extensibility of per-package doc configuration.

Signed-off-by: Paul-Elliot <peada@free.fr>
Signed-off-by: Marek Kubica <marek@tarides.com>
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