Using Janestreet `core` with `riot` with dune

I have a number of libraries which make use of Janestreet’s core. Separately, I have an executable which makes use of these libraries and minttea. minttea is itself build on top of riot which has a submodule called core.

When I try to build the executable with dune I get the following error:

File "_none_", line 1:
Error: Files /[...]/_opam/lib/core/core.cmxa
       and /[...]/_opam/lib/riot/core/core.cmxa
       both define a module named Core__Ref

What is the best way to avoid this?

This is fixed in the development branch of riot, but not yet released into opam. So, one solution would be to pin a sufficiently new revision of riot.

1 Like