On Fri, 02 May 2014 13:53:51 GMT, Luís Marques wrote:

On Fri, 02 May 2014 12:11:23 GMT, Sönke Ludwig wrote:

Commit: 2be4cce

I'm confused with dub's version selection mechanism. In the previous days, I successfully did an add-local for ddb, so that I could use my fork. But not I'm having trouble trying to select that commit (or just ~master) for vibe.d. I have:
(...)

I think you may have an older preview version of DUB 0.9.22. There have been a number of fixes since the last beta (will get out another one shortly).

How it should work now is that you can GIT checkout a repository and "add-local" (without an explicit version) or "add-path" register it to DUB. The version of that local working copy will then be determined using the latest version tag instead of simply using the branch name, if possible.

In vibe.d's example, this would be something like vibe-d 0.7.20-alpha.1+commit.72.g2be4cce. Running dub upgrade --prerelease will then automatically update dub.selections.json properly if the dependency has been specified as a proper range, such as "~>0.7.19" (equivalent to ">=0.7.19 <0.8.0"). Manually editing dub.selections.json works now properly, too (it only overwrites entries now if they don't match any existing version).