www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Dub selects wrong version

reply Bauss <jj_1337 live.dk> writes:
It seems like dub selects the wrong version of my package.

I have tried the following:
- Reinstall dub
- Delete all packages
- Clear dubs cache
- Release new versions in the github repository
- Update the dub package on code.dlang.org multiple times and it 
says it has the lates

The issue is that despite the above it always attempts to get the 
wrong version.

Now here is where it gets funny I can fetch the latest version 
manually, but it still retrieves the older version/versions when 
I compile with dub

Although in my dub.json I specify the latest version.

Is there anything I am missing?

The package I attempt to get the latest version of when compiling 
is this:
https://code.dlang.org/packages/diamond

As you can see it has version 0.2.1

In my dub.json for the project I want to use it I specify the 
follwing:

"diamond": "~>0.2.1"

When I then compile with dub build I get this error:

Selected package diamond 0.1.0 does not match the dependency 
specification >=0.2.1 <0.3.0 in package diamondtest. Need to "dub 
upgrade"?

When I then look in the packages folder I see a folder for the 
old version of it "diamond-0.1.0"

Is there anything I do wrong or is it a known issue with dub?
May 20 2016
parent reply ag0aep6g <anonymous example.com> writes:
On 05/21/2016 06:54 AM, Bauss wrote:
 When I then compile with dub build I get this error:

 Selected package diamond 0.1.0 does not match the dependency
 specification >=0.2.1 <0.3.0 in package diamondtest. Need to "dub upgrade"?
Have you tried "dub upgrade"?
May 20 2016
parent reply Bauss <jj_1337 live.dk> writes:
On Saturday, 21 May 2016 at 05:03:14 UTC, ag0aep6g wrote:
 On 05/21/2016 06:54 AM, Bauss wrote:
 When I then compile with dub build I get this error:

 Selected package diamond 0.1.0 does not match the dependency
 specification >=0.2.1 <0.3.0 in package diamondtest. Need to 
 "dub upgrade"?
Have you tried "dub upgrade"?
That worked thank you. Didn't know that existed
May 20 2016
parent ag0aep6g <anonymous example.com> writes:
On 05/21/2016 07:15 AM, Bauss wrote:
 On Saturday, 21 May 2016 at 05:03:14 UTC, ag0aep6g wrote:
 On 05/21/2016 06:54 AM, Bauss wrote:
 When I then compile with dub build I get this error:

 Selected package diamond 0.1.0 does not match the dependency
 specification >=0.2.1 <0.3.0 in package diamondtest. Need to "dub
 upgrade"?
Have you tried "dub upgrade"?
That worked thank you. Didn't know that existed
It's in the error message.
May 20 2016