Thread overview
Dub command line knowledge sought
Jun 23, 2017
Russel Winder
Jun 23, 2017
Nicholas Wilson
Jun 23, 2017
Russel Winder
Jun 23, 2017
Laeeth Isharc
Jun 23, 2017
Russel Winder
June 23, 2017
I am likely just staring at and missing the data needed:

How does one invoke dub to fetch and build, and put into a place other that ~/.dub/… a package from Dub?

-- 
Russel. ============================================================================= Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder@ekiga.net 41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel@winder.org.uk London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder

June 23, 2017
On Friday, 23 June 2017 at 07:51:51 UTC, Russel Winder wrote:
> I am likely just staring at and missing the data needed:
>
> How does one invoke dub to fetch and build, and put into a place other that ~/.dub/… a package from Dub?

dub fetch foo --version=1.0.0
mv ~/.dub/packages/foo-1.0.0 /desired/path
dub add-path /desired/path

dunno about how to do that in one step.
June 23, 2017
On Fri, 2017-06-23 at 08:11 +0000, Nicholas Wilson via Digitalmars-d- learn wrote:
> On Friday, 23 June 2017 at 07:51:51 UTC, Russel Winder wrote:
> > I am likely just staring at and missing the data needed:
> > 
> > How does one invoke dub to fetch and build, and put into a place other that ~/.dub/… a package from Dub?
> 
> dub fetch foo --version=1.0.0
> mv ~/.dub/packages/foo-1.0.0 /desired/path
> dub add-path /desired/path
> 
> dunno about how to do that in one step.

This is what I feared.

The real awkwardness here is that Dub stores all the compilation
products nicely separated by platform, compiler, and configuration, and
puts the last build in a nice named place on the assumption there will
only ever be one. So generally the
~/.dub/packages/foo-1.0.0 has to be moved as above.

Using unit-threaded as an example:

~/.dub/packages/unit-threaded-0.7.24/unit-threaded/.dub/build/library-debug-linux.posix-x86_64-ldc_2073-1AF38A4B25224ABFB5BB5ED68A0E4633

Is the location of the last debug build on linux using ldc2, but what is that hash code, how to make that deducible so that it isn't necessary to move, just build.

-- 
Russel. ============================================================================= Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder@ekiga.net 41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel@winder.org.uk London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder

June 23, 2017
On Friday, 23 June 2017 at 08:26:21 UTC, Russel Winder wrote:
> On Fri, 2017-06-23 at 08:11 +0000, Nicholas Wilson via Digitalmars-d- learn wrote:
>> On Friday, 23 June 2017 at 07:51:51 UTC, Russel Winder wrote:
>> > I am likely just staring at and missing the data needed:
>> > 
>> > How does one invoke dub to fetch and build, and put into a place other that ~/.dub/… a package from Dub?
>> 
>> dub fetch foo --version=1.0.0
>> mv ~/.dub/packages/foo-1.0.0 /desired/path
>> dub add-path /desired/path
>> 
>> dunno about how to do that in one step.
>
> This is what I feared.
>
> The real awkwardness here is that Dub stores all the compilation
> products nicely separated by platform, compiler, and configuration, and
> puts the last build in a nice named place on the assumption there will
> only ever be one. So generally the
> ~/.dub/packages/foo-1.0.0 has to be moved as above.
>
> Using unit-threaded as an example:
>
> ~/.dub/packages/unit-threaded-0.7.24/unit-threaded/.dub/build/library-debug-linux.posix-x86_64-ldc_2073-1AF38A4B25224ABFB5BB5ED68A0E4633
>
> Is the location of the last debug build on linux using ldc2, but what is that hash code, how to make that deducible so that it isn't necessary to move, just build.

Check out the Kaleidic fork maintained by John Colvin - currently in his personal repository on github.  We submitted back our changes but ended up being quite a lot so not all have been accepted yet.  Allows you to change location of dub repos - useful to avoid work and personal interacting without having to use containers or VMs, but it may be easy enough to change path on an adhoc basis as you wish to do.  Don't recall right now, but take a look.

June 23, 2017
On Fri, 2017-06-23 at 09:24 +0000, Laeeth Isharc via Digitalmars-d- learn wrote:
> […]
> 
> Check out the Kaleidic fork maintained by John Colvin - currently in his personal repository on github.  We submitted back our changes but ended up being quite a lot so not all have been accepted yet.  Allows you to change location of dub repos - useful to avoid work and personal interacting without having to use containers or VMs, but it may be easy enough to change path on an adhoc basis as you wish to do.  Don't recall right now, but take a look.

Thanks for the tip. Hopefully the fork will go away quickly because everything is merged in to the mainline.

Using a fork is fine for me personally, but I cannot rely on it for SCons: a SCons tool either has to carry the entirety (not really feasible I suspect, but I will check) or assume the platform supplied one. I guess a subsidiary issue is that Dub is not available where SCons is, so special measures are already needed.

-- 
Russel. ============================================================================= Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder@ekiga.net 41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel@winder.org.uk London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder