ocsigen / tyxml

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

"inconsistent assumptions" compilation error #248

Closed thedufer closed 5 years ago

thedufer commented 5 years ago

I get a compilation error when trying to install odoc via opam that seems to originate in tyxml:

#=== ERROR while compiling odoc.1.4.2 =========================================#
# context     2.0.5 | linux/x86_64 | base-bigarray.base base-threads.base base-unix.base ocaml-base-compiler.4.07.0 | https://opam.ocaml.org/#7f655b2f
# path        ~/.opam/4.07.0/.opam-switch/build/odoc.1.4.2
# command     ~/.opam/opam-init/hooks/sandbox.sh build dune build -p odoc -j 4
# exit-code   1
# env-file    ~/.opam/log/odoc-10046-d2c37b.env
# output-file ~/.opam/log/odoc-10046-d2c37b.out
### output ###
#       ocamlc src/html/.odoc_html.objs/byte/odoc_html__Tree.{cmi,cmti} (exit 2)
# (cd _build/default && /home/thedufer/.opam/4.07.0/bin/ocamlc.opt -w -40 -w -18 -g -bin-annot -I src/html/.odoc_html.objs/byte -I /home/thedufer/.opam/4.07.0/lib/bytes -I /home/thedufer/.opam/4.07.0/lib/ocaml/compiler-libs -I /home/thedufer/.opam/4.07.0/lib/re -I /home/thedufer/.opam/4.07.0/lib/result -I /home/thedufer/.opam/4.07.0/lib/seq -I /home/thedufer/.opam/4.07.0/lib/tyxml -I /home/thed[...]
# File "src/html/tree.mli", line 1:
# Error: The files /home/thedufer/.opam/4.07.0/lib/tyxml/tyxml_html.cmi
#        and /home/thedufer/.opam/4.07.0/lib/tyxml/html_types.cmi
#        make inconsistent assumptions over interface Html_types

I originally opened an issue at odoc, but it was suggested I come here.

Drup commented 5 years ago

I have no idea what could cause this. I can't reproduce, the CI can't either, and in my experience, this is due to local issues specific to user's installations.

Can you reproduce in a new switch ?

thedufer commented 5 years ago

Huh, a reinstall of tyxml didn't fix it but it works in a new switch. No idea how I got into that state, but I'll just blow away the bad switch and start over. Thanks for the pointer.