Skip to content

Conversation

panglesd
Copy link
Collaborator

@panglesd panglesd commented Oct 4, 2024

Quoting the docs of the Findlib library:

  • Furthermore, the environment variables OCAMLPATH, OCAMLFIND_DESTDIR,
  • OCAMLFIND_COMMANDS, OCAMLFIND_IGNORE_DUPS_IN, and CAMLLIB are interpreted.
  • By default, the function takes
  • the values found in the environment, but you can pass different values
  • using the [env_*] arguments. By setting these values to empty strings
  • they are no longer considered.

So when we do

dune exec -- odoc_driver -p odoc

findlib finds the odoc library in _build/install in some part of the codebase1, in <opam switch>/lib/odoc in some other parts of the code, which results in the docs for odoc not being built.

This changes to consistently find the <opam switch>/lib/odoc.

Footnotes

  1. because the ocamlpath of compile time was used! Missread...

Quoting the docs of the Findlib library:

> * Furthermore, the environment variables OCAMLPATH, OCAMLFIND_DESTDIR,
> * OCAMLFIND_COMMANDS, OCAMLFIND_IGNORE_DUPS_IN, and CAMLLIB are interpreted.
> * By default, the function takes
> * the values found in the environment, but you can pass different values
> * using the [env_*] arguments. By setting these values to empty strings
> * they are no longer considered.

So when we do

```
dune exec -- odoc_driver -p odoc
```

findlib finds the `odoc` library in `_build/install` in some part of the
codebase, in `<opam switch>/lib/odoc` in some other parts of the code, which
results in the docs for `odoc` not being built.

This changes to consistently find the `<opam switch>/lib/odoc`.
@panglesd panglesd added the no changelog This pull request does not need a changelog entry label Oct 4, 2024
@panglesd
Copy link
Collaborator Author

panglesd commented Oct 4, 2024

Surely there is a better way here. I originally opened the PR with the confusion that it would take the compile time value, which was then always wrong.

@panglesd panglesd marked this pull request as draft October 4, 2024 14:41
@jonludlam
Copy link
Member

Closed in favour of #1229

@jonludlam jonludlam closed this Nov 11, 2024
@jonludlam
Copy link
Member

(specifically be730cb)

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