Closed WhoAteDaCake closed 6 years ago
What are the steps to reproduce this? The package.json for esy that is.
cc @andreypopp
I was not using esy install at the time, The dune file can be found https://github.com/WhoAteDaCake/reason-server/blob/e0063731017b93723883eb76deca2d760611efbd/src/dune
I will try to create a reproducible repo
ocaml: The OCaml toplevel, version 4.06.1
opam: 2.0.0
After removing esy, i just ran dune and it threw:
Error: The files src/.rserver.eobjs/redis.cmi
and src/.rserver.eobjs/redis.cmi make inconsistent assumptions
over interface Redis
Anyway, the error is obvious from dune's point of view. It's not going to work if it sees two conflicting definitions for a package. The question is how you got into this situation.
Is it possible because both redis-lwt/redis-sync.opam
offer redis/redis-sync.opam
different interfaces?
P.S. I am relatively new to ocaml
I'm not sure how you got the second error, but i've seen others getting it. Are you using windows btw?
No, I am using Ubuntu 18.04
I will try to recreate that inside a docker container, just to see whether it's my system that is at fault
@WhoAteDaCake you need to instruct dune to ignore node_modules
:
echo '(ignored_subdirs (node_modules))' >> dune
It is managed by esy and dune shouldn't be doing anything inside.
@rgrinberg I managed to replicate it inside a docker container, the setup can be found https://github.com/WhoAteDaCake/reason-server/tree/b49554890e81ee7aad5d26e971338ef41c75ad56
I feel so stupid, the reason why it said those errors because I had a file named redis.re
which essentially exported module Redis
. This caused a collision and the errors you've seen
The error form the compiler is still quite bizarre. Why isn't it reporting the cmi for the redis module from the library? It's saying that it's the same file.
When running a dune build, it throws
Package can be found https://github.com/0xffea/ocaml-redis