Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Driver: package and library arguments #1229

Merged
merged 6 commits into from
Nov 13, 2024

Conversation

jonludlam
Copy link
Member

There are now two ways to specify what to document. Either by opam package (-p) or by findlib library (-l). In each case the dependencies are documented also.

Some general tidying too.

@jonludlam jonludlam added the no changelog This pull request does not need a changelog entry label Oct 31, 2024
src/driver/odoc_driver.ml Outdated Show resolved Hide resolved
Some general tidying too.
Because we are separating libraries which might be co-located in your
opam switch, it sometimes happens that a package is using types from
a library without expressing it in their META files. For example,
`Odoc_classify` is using the `Cmx_format` module interface, which we put
in the `compiler-libs.optcomp` package. It only links against
`compiler-libs.common` though, and there is no explicit dependency on
`compiler-libs.optcomp` which works because the two libraries are in the
same directory.

This commit fixes this problem by post-processing the `Packages.t` datatype,
finding hashes that aren't in any declared library dependency and adding
them to the deps of that library.
This means we can run `odoc_driver` in a dune environment and have it use the
libs/docs from the local `_build` tree rather than the installed files.
src/driver/opam.ml Outdated Show resolved Hide resolved
Copy link
Collaborator

@gpetiot gpetiot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if you have more changes to pass but this looks good to me now!

@jonludlam
Copy link
Member Author

Thanks!

@jonludlam jonludlam merged commit 4beb07a into ocaml:master Nov 13, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no changelog This pull request does not need a changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants