ugexe / zef

Raku Module Management
Artistic License 2.0
210 stars 45 forks source link

"zef install A B C" fails to solve missing dependencies #382

Closed thibaultduponchelle closed 3 years ago

thibaultduponchelle commented 3 years ago

Hello :smiley:

zef says "Failed to resolve some missing dependencies" when installing multiple modules in one time but installs them well when install one after the other.

This 3 lines one after the others are working OK :

$ zef install --/test https://github.com/melezhik/Sparrow6.git
$ zef install --/test https://github.com/melezhik/sparrowdo.git
$ zef install --/test https://github.com/melezhik/sparky.git

But gathering all in one ends in error ("Failed to resolve some missing dependencies"):

$ zef install --/test https://github.com/melezhik/Sparrow6.git https://github.com/melezhik/sparrowdo.git https://github.com/melezhik/sparky.git

I think it is because sparky requires Data::Dump:ver<2.0.0+> when Sparrow6 requires Data::Dump:ver<1.0.0>.

Expected Behavior

I expect to have the modules installed as they are when typing independent commands.

Actual Behavior

"Failed to resolve some missing dependencies"

Environment

Thank you

Thibault

ugexe commented 3 years ago

Could be getting swallowed up here: https://github.com/ugexe/zef/blob/3c756183d9490cf6ffe8a854e09b526aab22cd65/lib/Zef/Repository.pm6#L23

a naive solution might be to change it to

    my @unsorted-grouped-candis = @unsorted-candis.categorize({.as}).values;

but I suspect that could have some edge cases around when .as is a name and not a uri (e.g. zef install $url or zef install $path)

thibaultduponchelle commented 3 years ago

(I only tested with url)