Dub command line knowledge sought

Laeeth Isharc via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Jun 23 02:24:34 PDT 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.



More information about the Digitalmars-d-learn mailing list