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:

dub.json:
"dependencies": {
    "vibe-d": ">=0.1.19",
    "ddb": ">=0.1.0"
},

dub.selections.json:
"versions": {
    "vibe-d": "0.7.19",
    "libevent": "~master",
    "openssl": "~master",
    "libev": "~master",
    "ddb": "0.1.0"
}

If I change vibe-d to "~master" in dub.selections.json, dub build overrides it with 0.7.19 again. If I do an add-local of my local ~master of the vibe-d repo, then dub build keeps using 0.7.19. If I then change dub.json to...

"dependencies": {
    "vibe-d": "~master",
    "ddb": ">=0.1.0"
},

...it complains that it "Could not find a valid dependency tree configuration", even though ddb has a dub.json of...

"dependencies": {
    "vibe-d": {"version": ">=0.7.19", "optional": true}
}

...and I would think that >=0.7.19 is compatible with ~master, even more so with an "optional" dependency.

It's hard to understand all of these concepts and how they interact because there doesn't seem to be documentation for them, and for the CLI commands.

Also, how about adding support so that I can specify directly in dub.json/dub.selections.json/wherever that I want to use "rev:2be4cce", instead of having to do an add-local checked-out to that particular commit? (assuming that's how I should do it)