Thread overview
Dub dependency conflict resolution
Oct 06, 2018
Venkat
Oct 07, 2018
Bauss
Oct 07, 2018
Venkat
October 06, 2018
I couldn't find any documentation on how dub resolves dependency conflicts. Here is my situation.

Package A has a dependency on package B-1.0.0 which has a dependency on package C-1.0.0.

Package A declares a dependency on package C-1.0.1


How does dub behave in this situation. From what I see, it always resolves C-1.0.0 and completely ignores the dependency on C-1.0.1. Is there a way to force the usage of C-1.0.1, like maven's exclude tags ?


NOTE: That description is not meant as an insult. Most people here understand what a dependency conflict is. I am merely trying to put my thought in writing.
October 07, 2018
On Saturday, 6 October 2018 at 17:50:57 UTC, Venkat wrote:
>
> I couldn't find any documentation on how dub resolves dependency conflicts. Here is my situation.
>
> Package A has a dependency on package B-1.0.0 which has a dependency on package C-1.0.0.
>
> Package A declares a dependency on package C-1.0.1
>
>
> How does dub behave in this situation. From what I see, it always resolves C-1.0.0 and completely ignores the dependency on C-1.0.1. Is there a way to force the usage of C-1.0.1, like maven's exclude tags ?
>
>
> NOTE: That description is not meant as an insult. Most people here understand what a dependency conflict is. I am merely trying to put my thought in writing.

You should get a dub selection file or something like that when you build, which will be located in the root of your project. You can control versions explicit in that.
October 07, 2018
On Sunday, 7 October 2018 at 05:24:37 UTC, Bauss wrote:
> On Saturday, 6 October 2018 at 17:50:57 UTC, Venkat wrote:
>>
>> I couldn't find any documentation on how dub resolves dependency conflicts. Here is my situation.
>>
>> Package A has a dependency on package B-1.0.0 which has a dependency on package C-1.0.0.
>>
>> Package A declares a dependency on package C-1.0.1
>>
>>
>> How does dub behave in this situation. From what I see, it always resolves C-1.0.0 and completely ignores the dependency on C-1.0.1. Is there a way to force the usage of C-1.0.1, like maven's exclude tags ?
>>
>>
>> NOTE: That description is not meant as an insult. Most people here understand what a dependency conflict is. I am merely trying to put my thought in writing.
>
> You should get a dub selection file or something like that when you build, which will be located in the root of your project. You can control versions explicit in that.

That was it. Once I deleted dub.selections.json, it picked up explicitly declared version. Still it would be nice to learn how dub deals with dependency conflicts.

Thankyou.