Open diegomrsantos opened 10 months ago
That's a fairly complicated problem right there. What should the behaviour be? I believe it's fine as it is right now, it's how most languages' package managers handle it.
I believe installing onlyC
0.1.0
would satisfy both project A
and B
constraints on C
version.
It seems Nimble is satisfying the dependencies' version constraints (and their transitive dependencies) greedily and locally, instead of globally, considering the whole set of constraints.
I'm fairly sure that's a bug. Nimble will choose any version it can find if none is explicitly provided.
Consider the following nimble files
Project
A
:Project
B
:Also consider Project
C
has versions0.1.0
and0.2.1
available.If
nimble install A
is run, it fails withError: Cannot satisfy the dependency on C 0.1.0 and C 0.2.1
. The version0.2.1
is installed first for B and later0.1.0
forA
.Is it expected? When no version is specified, does it mean any version? If so, why hasn't only
C
0.1.0
been installed, what would satisfy bothA
andB
requirements?