www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Dub dependency conflict resolution

reply Venkat <venkatram.akkineni gmail.com> writes:
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.
Oct 06 2018
parent reply Bauss <jj_1337 live.dk> writes:
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.
Oct 06 2018
parent Venkat <venkatram.akkineni gmail.com> writes:
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.
Oct 06 2018