Describe the bug
I want Alire to be able to pin a crate implementing a "virtual crate".
Use case: I have a crate (mybin) that depends on a "virtual crate" (coollib) and another crate (mylib) that provides that coollib in its alire.toml. I want to run alr pin mylib --use=<path>, but it fails.
To Reproduce
alr init --lib mylib
sed -i.bak -e '$aprovides=["coollib=1.0.0"]' mylib/alire.toml
alr init --bin mybin
sed -i.bak -e '$a[[depends-on]]\ncoollib = "^1.0"' mybin/alire.toml
alr -C mybin pin mylib --use=../mylib
ⓘ Synchronizing workspace...
Dependencies automatically updated as follows:
New solution is incomplete.
Missing:
+❗ coollib ^1.0 (new,missing:unknown)
error: crate mismatch: expected coollib but found mylib at /tmp/bug/mylib
$ alr -C mybin with mylib --use=../mylib
error: crate mismatch: expected coollib but found mylib at /tmp/bug/mylib
Expected Behavior
I want Alire to accept mylib as an implementation of coollib dependency.
I see. My initial recollection is that the solver is not using such information from pinned crates. Incidentally, I'm reworking the solver to clean up a lot of mess there, so now would be a good time to fix this.
Describe the bug I want Alire to be able to pin a crate implementing a "virtual crate".
Use case: I have a crate (
mybin
) that depends on a "virtual crate" (coollib
) and another crate (mylib
) thatprovides
thatcoollib
in itsalire.toml
. I want to runalr pin mylib --use=<path>
, but it fails.To Reproduce
Expected Behavior I want Alire to accept
mylib
as an implementation ofcoollib
dependency.alr
version alr 2.0.1