RejectedSoftware Forums

Sign up

dub add-path applies ~master

On my work computer there is a firewall, so I cannot use dub fetch/upgrade. I put all the dub packages in one folder and then use add-path.

I was updating some of the mir repositories, e.g. mir-algorithm, etc. and had some issues with dub. In particular, add-path is adding the projects as ~master instead of the actual version, which tends to create a lot of issues (I get a lot of root cannot be specified, which takes a while to actually display because I'm behind a network and dub tries to download the package and it fails).

I was looking at the add-path documentation and it says that it looks at git describe if it's a working copy, then it checks if there's a version field, then it applies ~master.

The page here knows the versions. I presume it gets them from github. But for some reason, this doesn't work for me behind a firewall? git describe doesn't work on the releases. I'm not sure how to get the tag myself from them.

So I can just change the dependency to ~master and it works fine. However, I get messages that this is a deprecated approach and to use the numbered versions, but those do not seem to be working given that the dub package is in there as ~master. I'm not keen to rely on this.

What other solutions are there?

Re: dub add-path applies ~master

On Tue, 13 Jun 2017 18:07:52 GMT, jmh530 wrote:

What other solutions are there?

I couldn't figure out a solution with add-path, so I ended up doing a bunch of:
dub add-local package-ver ver

May I suggest that if packages end with -x.x.x, then add-path recognizes that as a semver and adds with that version instead of ~master