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

Fix warnings in dune build @doc #64

Closed
triangle-man opened this issue Jan 13, 2023 · 1 comment
Closed

Fix warnings in dune build @doc #64

triangle-man opened this issue Jan 13, 2023 · 1 comment

Comments

@triangle-man
Copy link
Member

triangle-man commented Jan 13, 2023

For example:

> dune build @doc

File "../../lib/.Whatwhat.objs/byte/whatwhat.odoc":
Warning: Failed to lookup type unresolvedroot(Stdlib__Map).Make(unresolvedroot(Stdlib).Int).t Parent_module: Unresolved apply
@triangle-man triangle-man changed the title Fix warnings is dune build @doc Fix warnings in dune build @doc Jan 13, 2023
@yongrenjie
Copy link
Contributor

yongrenjie commented Feb 13, 2023

This is an upstream issue which has to do with dune not being able to access other packages installed in the current switch, meaning that it can't access or cross-reference the docs of any dependencies (not even stdlib): ocaml/odoc#794

The workaround I found (discussed here) was to not use dune build @doc but rather odig. On the first time, do:

opam install odig

# install the package into the current opam switch
cd whatwhat
dune build
dune build @install
dune install

# generate and view documentation
odig doc whatwhat

To subsequently update the docs:

dune build
dune install
odig doc -u whatwhat   # (update)

That runs without errors (if you use odig doc -v whatwhat it spews a load of warnings from the dependencies, but none from whatwhat itself).

I'll add this to the readme or wiki. Added to readme (in d7a777e) and wiki

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

No branches or pull requests

2 participants