duplicate module definition when running dune utop
joprice opened this issue · 5 comments
joprice commented
I get an error when trying to start utop via dune, where both the toplevel and this library provide a module named "Trace":
Error: Files /nix/store/sqkjv5i2qdwlf2244ifs9ga50m011p05-ocaml5.1.0-beta1-trace-n-a/lib/ocaml/5.1.0~beta1/site-lib/trace/trace.cma(Trace)
and /nix/store/46vkfb33m24jjl2rj40cd3qfgg8d3inq-ocaml+flambda-5.1.0-beta1/lib/ocaml/compiler-libs/ocamltoplevel.cma(Trace)
both define a module named Trace```
c-cube commented
Yes, that's why there is `trace.core`. I met a similar issue. The compiler library defines `Trace` already so we have to be more explicit and use `Trace_core` instead.
…On July 29, 2023 2:10:09 PM EDT, Joseph Price ***@***.***> wrote:
I get an error when trying to start utop via dune, where both the toplevel and this library provide a module named "Trace":
```Error: Files /nix/store/sqkjv5i2qdwlf2244ifs9ga50m011p05-ocaml5.1.0-beta1-trace-n-a/lib/ocaml/5.1.0~beta1/site-lib/trace/trace.cma(Trace)
and /nix/store/46vkfb33m24jjl2rj40cd3qfgg8d3inq-ocaml+flambda-5.1.0-beta1/lib/ocaml/compiler-libs/ocamltoplevel.cma(Trace)
both define a module named Trace```
--
Reply to this email directly or view it on GitHub:
#2
You are receiving this because you are subscribed to this thread.
Message ID: ***@***.***>
joprice commented
I see! Thanks for the quick response. I’ll try that out
joprice commented
Should trace-tef depend on trace.core? I probably won't end up having that in a lib vs an executable in then end, but I happened to be running utop against a scratch executable that had both trace and trace-tef, and I had to remove it to get the _core
change to work.
c-cube commented
That's a good point indeed. I'd accept a PR that makes this dependency more precise!