Re: Dub use local fork

2017-09-23 Thread Nicholas Wilson via Digitalmars-d-learn
On Saturday, 23 September 2017 at 09:37:54 UTC, rikki cattermole 
wrote:

On 23/09/2017 10:34 AM, Guillaume Piolat wrote:
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


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.


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.


Re: Dub use local fork

2017-09-23 Thread rikki cattermole via Digitalmars-d-learn

On 23/09/2017 10:34 AM, Guillaume Piolat wrote:

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


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.


Re: Dub use local fork

2017-09-23 Thread Guillaume Piolat via Digitalmars-d-learn
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


Re: Dub use local fork

2017-09-22 Thread Nicholas Wilson via Digitalmars-d-learn

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:



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" }


Thanks!


Re: Dub use local fork

2017-09-22 Thread Mike Parker via Digitalmars-d-learn
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" }




Re: Dub use local fork

2017-09-22 Thread rikki cattermole via Digitalmars-d-learn

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
Nic



Alternatively you can alter the package that dub already knows about.
Does the trick more easily ;)


Dub use local fork

2017-09-22 Thread Nicholas Wilson via Digitalmars-d-learn
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