Hello,
For the setting:
a-0.1/
a.ml
a.opam
dune
b-0.1/
b.ml
b.opam
dune
b-0.2/
b.ml
b.opam
dune
(where the b-0.* depend on a)
I would like to know if there’s a way to tell Dune to ignore folder b-0.1/ for example, when building b-0.2/. At the moment I could only do building if removing the opam files and using “wrapped” field (tho I think this is not advisable since not intended for that purpose…) for the b-*'s. Since I would like to install package a and b (only one version of b of course…), then Dune complains righteously in various ways:
(with prev. setting)
$ dune build b-0.2
Info: creating file b-0.2/dune-project with this contents: (lang dune 1.5)
Too many opam files for package “b”:
- b-0.2/b.opam
- b-0.1/b.opam
(when having one b.opam file at the root and giving the libraries public_name b.b)
$ dune build b-0.1/
Public library “b.b” is defined twice:
- b-0.2/dune:1
- b-0.1/dune:1
I thought on using:
- build profiles, but seems they are just for adding flags for example when wanting a customised building
- aliases, but so far only found examples for running actions such as, running a tool to make tests on files
- the option --only package but, in my case both packages b’s are named the same
From this conversation:
seems like running test in a particular directory is supported, but maybe it would be the same issue since, I would like Dune to consider folder a-0.1 for the dependency, but to ignore b-0.1 when building b-0.2 (or consider a-0.1 and ignore b-0.2 to build b-0.1).
Hope is not that much confusing…