www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - How dub select versions?

reply Daniel Kozak <kozzi11 gmail.com> writes:
I really does not understand how does DUB works. I have small app 
which use vibe-d:core as dependency, and I use libasync as 
subConfiguration. When I try to build my app it always try to 
download libasync-0.7.9 instead of libasync-0.8.0. Why? I would 
expect to select the latest one frum dub repository
Oct 05 2016
parent reply Mike Parker <aldacron gmail.com> writes:
On Wednesday, 5 October 2016 at 08:01:33 UTC, Daniel Kozak wrote:
 I really does not understand how does DUB works. I have small 
 app which use vibe-d:core as dependency, and I use libasync as 
 subConfiguration. When I try to build my app it always try to 
 download libasync-0.7.9 instead of libasync-0.8.0. Why? I would 
 expect to select the latest one frum dub repository
If you look into the vide.d dub.sdl, you'll see the following listed in the "libasync" configuration [1]: dependency "libasync" version="~>0.7.8" The ~> constrains the dependency to the minor version number, meaning DUB will not try to use a version of the dependency that has a higher minor version. In this case, it means >=0.7.8 && <0.8.0. See [2] for details. [1] https://github.com/rejectedsoftware/vibe.d/blob/master/dub.sdl#L76 [2] https://github.com/dlang/dub/wiki/Version-management
Oct 05 2016
parent reply Mike Parker <aldacron gmail.com> writes:
On Wednesday, 5 October 2016 at 08:23:25 UTC, Mike Parker wrote:
 The ~> constrains the dependency to the minor version number, 
 meaning DUB will not try to use a version of the dependency 
 that has a higher minor version.
Oh, that came out wrong. TO be clear for anyone who doesn't read the linked wiki page in detail: The ~> constrains the dependency to the minor version number when used with the n.n.n format. It constrains to the major version when using n.n (e.g. ~>1.0 is the same as >=1.0 && <2.0).
Oct 05 2016
parent Daniel Kozak via Digitalmars-d-learn <digitalmars-d-learn puremagic.com> writes:
That makes sense :). Thanks


Dne 5.10.2016 v 10:27 Mike Parker via Digitalmars-d-learn napsal(a):
 On Wednesday, 5 October 2016 at 08:23:25 UTC, Mike Parker wrote:
 The ~> constrains the dependency to the minor version number, meaning 
 DUB will not try to use a version of the dependency that has a higher 
 minor version.
Oh, that came out wrong. TO be clear for anyone who doesn't read the linked wiki page in detail: The ~> constrains the dependency to the minor version number when used with the n.n.n format. It constrains to the major version when using n.n (e.g. ~>1.0 is the same as >=1.0 && <2.0).
Oct 05 2016