On Sunday, 16 February 2020 at 14:01:13 UTC, Robert M. Münch wrote:
I want to use a specific branch version if a package. I specified the branch version in a dub.selections.json file.

But it seems that dub requires a ZIP file that can be downloaded from code.dlang.org, which of course fails because the branch is only available on github.

Fetching rtree ~fix-#3 (getting selected version)...
Downloading https://code.dlang.org/packages/rtree/~fix-#3.zip failed with 404 (Not Found).

How am I supposed to switch to a branch version of a package to try a bug-fix version for example?

We fail to get the most basic support for git since a full year now:

https://github.com/dlang/dub/pull/1802
https://github.com/dlang/dub/pull/1798
https://github.com/dlang/dub/pull/1403

So for now you have two options:

1/ in your project recipe, you can add the dependency as a path to the git submodule representing the DUB package and do the branch checkout manually or using a DUB pregenerate command.

2/ ask to the dependency maintainer to add a git tag in the branch you'd like to use. the DUB registry will automatically create a new version of the package, using the right branch. This is done for example for stx allocator and so far this work.

Reply via email to