ocsigen / tyxml

Build valid HTML and SVG documents
https://ocsigen.org/tyxml/
Other
166 stars 59 forks source link

Load path in installed .cmt refers to paths in compiled sources #291

Closed zoggy closed 2 years ago

zoggy commented 3 years ago

Hi,

$ opam show tyxml

<><> tyxml: information on all versions <><><><><><><><><><><><><><><><><><><><>
name                   tyxml
all-installed-versions 4.5.0 [4.12.0]
$ ocamlobjinfo [...]/.opam/4.12.0/lib/tyxml-ppx/tyxml_ppx_register.cmt
[...]
Load path:  ppx/register/.tyxml_ppx_register.objs/byte [...] ppx/.tyxml_ppx.objs/byte [...]

As you can see, the load path refers to paths used for compilation, rather than [...]/.opam/4.12.0/lib/tyxml-ppx/internal/ in this case. I'm not a dune expert, so I don't know how to fix this, though.

Drup commented 3 years ago

I'm ... not actually quite sure how to solve that. @rgrinberg ?

Is it a problematic in any way ?

rgrinberg commented 3 years ago

Well, cmt files are used by merlin for some minor things so I do wonder if this breaks anything. Likely not, but let's ask @voodoos to confirm.

I'll bring this up with the dune team.

voodoos commented 3 years ago

If I am not mistaken this has no impact on Merlin because we only work with .cmt files which are in the build directory, no the installed ones.

zoggy commented 3 years ago

In fact this problem occurs when a package installs at least two libraries with one depending on the other. This is not specific to tyxml. See https://github.com/ocaml/dune/issues/4922 .

Drup commented 2 years ago

This seems solved upstream, so let's close !