digitalmars.D.learn - Dub use local fork
- Nicholas Wilson (31/31) Sep 22 2017 I want to use a fork of one of my dub dependencies so I can make
- rikki cattermole (3/42) Sep 22 2017 Alternatively you can alter the package that dub already knows about.
- Guillaume Piolat (4/7) Sep 23 2017 +1
- rikki cattermole (5/12) Sep 23 2017 You can also do the same for Phobos+druntime when it comes to templated
- Nicholas Wilson (10/24) Sep 23 2017 Heh, I'm used to swapping out Phobos/Druntime from fiddling with
- Mike Parker (5/18) Sep 22 2017 http://code.dlang.org/package-format?lang=json#version-specs
- Nicholas Wilson (2/24) Sep 22 2017 Thanks!
I want to use a fork of one of my dub dependencies so I can make sure that it works before I merge the fork into upstream. http://code.dlang.org/advanced_usage says Path-based dependencies Package descriptions in the dub.json/dub.sdl can specify a path instead of a version; this can be used with Git submodules or subtrees, or with a known directory layout, to use arbitrarily defined versions of a dependency. Note that this should only be used for non-public packages. Path-based selections You can specify arbitrary versions, branches, and paths in the dub.selections.json file, even if they contradict the dependency specification of the packages involved (note that DUB will output a warning in that case). but doesn't give any examples. my dub.selections.json is currently: { "fileVersion": 1, "versions": { "derelict-cl": "2.0.0", "derelict-cuda": "2.0.1", "derelict-util": "2.1.0", "taggedalgebraic": "0.10.7" } } I want derelict-cl to use C:\Users\me\Documents\GitHub\DerelictCL How do I do that? Thanks Nic
Sep 22 2017
On 23/09/2017 4:13 AM, Nicholas Wilson wrote:I want to use a fork of one of my dub dependencies so I can make sure that it works before I merge the fork into upstream. http://code.dlang.org/advanced_usage says Path-based dependencies Package descriptions in the dub.json/dub.sdl can specify a path instead of a version; this can be used with Git submodules or subtrees, or with a known directory layout, to use arbitrarily defined versions of a dependency. Note that this should only be used for non-public packages. Path-based selections You can specify arbitrary versions, branches, and paths in the dub.selections.json file, even if they contradict the dependency specification of the packages involved (note that DUB will output a warning in that case). but doesn't give any examples. my dub.selections.json is currently: { "fileVersion": 1, "versions": { "derelict-cl": "2.0.0", "derelict-cuda": "2.0.1", "derelict-util": "2.1.0", "taggedalgebraic": "0.10.7" } } I want derelict-cl to use C:\Users\me\Documents\GitHub\DerelictCL How do I do that? Thanks NicAlternatively you can alter the package that dub already knows about. Does the trick more easily ;)
Sep 22 2017
On Saturday, 23 September 2017 at 03:16:30 UTC, rikki cattermole wrote:Alternatively you can alter the package that dub already knows about. Does the trick more easily ;)+1 That's the dirty trick I'm using too
Sep 23 2017
On 23/09/2017 10:34 AM, Guillaume Piolat wrote:On Saturday, 23 September 2017 at 03:16:30 UTC, rikki cattermole wrote:You can also do the same for Phobos+druntime when it comes to templated symbols. Of course it won't redownload if you delete the file, so gotta be a bit more careful. But a wonderful way to confirm that your fix actually fixes it before a PR.Alternatively you can alter the package that dub already knows about. Does the trick more easily ;)+1 That's the dirty trick I'm using too
Sep 23 2017
On Saturday, 23 September 2017 at 09:37:54 UTC, rikki cattermole wrote:On 23/09/2017 10:34 AM, Guillaume Piolat wrote:Heh, I'm used to swapping out Phobos/Druntime from fiddling with the compiler. But in this case I'm adding functionality so I want to make sure that it a) compiles (I forgot a semicolon and one symbol) and b) works the way I think it does. That's a little trickier when things are spread over more than one repo and dub is involved. Hopefully I should have dcompute kernels running on OpenCL 2.x very soon.On Saturday, 23 September 2017 at 03:16:30 UTC, rikki cattermole wrote:You can also do the same for Phobos+druntime when it comes to templated symbols. Of course it won't redownload if you delete the file, so gotta be a bit more careful. But a wonderful way to confirm that your fix actually fixes it before a PR.Alternatively you can alter the package that dub already knows about. Does the trick more easily ;)+1 That's the dirty trick I'm using too
Sep 23 2017
On Saturday, 23 September 2017 at 03:13:15 UTC, Nicholas Wilson wrote:my dub.selections.json is currently: { "fileVersion": 1, "versions": { "derelict-cl": "2.0.0", "derelict-cuda": "2.0.1", "derelict-util": "2.1.0", "taggedalgebraic": "0.10.7" } } I want derelict-cl to use C:\Users\me\Documents\GitHub\DerelictCL How do I do that?http://code.dlang.org/package-format?lang=json#version-specs "derelict-cl": { "path": "C:/Users/me/Documents/GitHub/DerelictCL" }
Sep 22 2017
On Saturday, 23 September 2017 at 04:45:47 UTC, Mike Parker wrote:On Saturday, 23 September 2017 at 03:13:15 UTC, Nicholas Wilson wrote:Thanks!my dub.selections.json is currently: { "fileVersion": 1, "versions": { "derelict-cl": "2.0.0", "derelict-cuda": "2.0.1", "derelict-util": "2.1.0", "taggedalgebraic": "0.10.7" } } I want derelict-cl to use C:\Users\me\Documents\GitHub\DerelictCL How do I do that?http://code.dlang.org/package-format?lang=json#version-specs "derelict-cl": { "path": "C:/Users/me/Documents/GitHub/DerelictCL" }
Sep 22 2017