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

Modules listed three times for LLVM documentation #1186

Closed
Kakadu opened this issue Aug 18, 2024 · 3 comments
Closed

Modules listed three times for LLVM documentation #1186

Kakadu opened this issue Aug 18, 2024 · 3 comments

Comments

@Kakadu
Copy link

Kakadu commented Aug 18, 2024

I did odig doc llvm for LLVM bindings 16x and 17.x and toplevel modules a listed three times with the same content.
I don't know if this is an issue of LLVM package or odoc itself? Could somebody double-check?

@dbuenzli
Copy link
Contributor

It's likely more an odig issue so I'm moving the issue there.

But can you be more specific? In general when this happens it's because you have library variants or something like that. Perhaps the simplest is not to rely on odig's automatically generated file and add your own index.mld landing page.

See the docs here for the details.

@dbuenzli
Copy link
Contributor

Mmmh it seems I can't transfer stuff to another organisation.

@dbuenzli
Copy link
Contributor

So I tried to install llvm and I confirm your finding. The problem is the following. Do a:

odig pkg llvm -l

And have a look at the doc-cobjs fields which lists the file that are used for generating the documentation according to the convention. You will see that most modules appear three times. For example:

> odig pkg llvm -l | grep 'llvm.cmti\?'
   /Users/dbuenzli/.opam/4.14.2/lib/llvm/static/llvm.cmt
   /Users/dbuenzli/.opam/4.14.2/lib/llvm/shared/llvm.cmt
   /Users/dbuenzli/.opam/4.14.2/lib/llvm/llvm.cmti

Since the index.mld file is automatically generated by odig, the index gets three Llvm mentions.

I'm not sure I exactly understand the install structure here or how it can be made automatically understandable to odig. So the best is likely to write our own index.mld file and install it as per convention in $(opam var doc)/llvm/odoc-pages.

(I could uniquify the modules but I suspect the whole install structure leads to larger problems for odig, if I look at odig doc llvm && odig log -m llmv the driver seems to drive odoc in a way that confuses it, see these Ambiguous lookup)

Feel free to reopen an issue on odig if you think there's something better that can be automatically done there.

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