Re: dub: Use Alternate Dependency

2017-11-21 Thread jmh530 via Digitalmars-d-learn

On Tuesday, 21 November 2017 at 07:36:25 UTC, drug wrote:


Probably author needs the following:
dependency "package" version="*" 
path="../relative/path/to/other/custom/package"

instead of
dependency "package" version="~>1.2.3"

this allows using custom package not registered on dub and 
after debugging register them and use them as usual.


That looks like it will be useful. For bauss's recommendation, I 
would effectively have to register the working directory with dub 
add-local and give it a version in order for it to work. I think 
it would work, but this looks to be fewer steps. I don't have to 
remember to remove it when I'm done, just to not use "git add .".


Re: dub: Use Alternate Dependency

2017-11-20 Thread drug via Digitalmars-d-learn

21.11.2017 07:42, bauss пишет:

On Tuesday, 21 November 2017 at 02:51:13 UTC, jmh530 wrote:
I'm working on two related dub projects on code.dlang.org. One has a 
dependency on the other. However, I've made changes to both and to run 
the tests properly requires me to use both versions in my working 
directory, rather than the versions (specifically for the dependency) 
that is registered on dub.


How do I ensure that dub picks up the right version?


Well dub will always use the versions you have specified in your 
dub.json/dub.sdl file, so if you have a specific version in you 
dub.json/dub.sdl then dub will use that version only and won't fetch a 
new version, so don't use something like "~>version", but just "version".


Example
---

Instead of (something like this.):
dependency "package" version="~>1.2.3"

Do:
dependency "package" version="1.2.3"



Probably author needs the following:
dependency "package" version="*" 
path="../relative/path/to/other/custom/package"

instead of
dependency "package" version="~>1.2.3"

this allows using custom package not registered on dub and after 
debugging register them and use them as usual.


Re: dub: Use Alternate Dependency

2017-11-20 Thread bauss via Digitalmars-d-learn

On Tuesday, 21 November 2017 at 02:51:13 UTC, jmh530 wrote:
I'm working on two related dub projects on code.dlang.org. One 
has a dependency on the other. However, I've made changes to 
both and to run the tests properly requires me to use both 
versions in my working directory, rather than the versions 
(specifically for the dependency) that is registered on dub.


How do I ensure that dub picks up the right version?


Well dub will always use the versions you have specified in your 
dub.json/dub.sdl file, so if you have a specific version in you 
dub.json/dub.sdl then dub will use that version only and won't 
fetch a new version, so don't use something like "~>version", but 
just "version".


Example
---

Instead of (something like this.):
dependency "package" version="~>1.2.3"

Do:
dependency "package" version="1.2.3"




dub: Use Alternate Dependency

2017-11-20 Thread jmh530 via Digitalmars-d-learn
I'm working on two related dub projects on code.dlang.org. One 
has a dependency on the other. However, I've made changes to both 
and to run the tests properly requires me to use both versions in 
my working directory, rather than the versions (specifically for 
the dependency) that is registered on dub.


How do I ensure that dub picks up the right version?