www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Dub command line knowledge sought

reply Russel Winder via Digitalmars-d-learn <digitalmars-d-learn puremagic.com> writes:
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/=E2=80=A6 a package from Dub?

--=20
Russel.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder ekiga.n=
et
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
Jun 23
parent reply Nicholas Wilson <iamthewilsonator hotmail.com> writes:
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.
Jun 23
parent reply Russel Winder via Digitalmars-d-learn <digitalmars-d-learn puremagic.com> writes:
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:
=20
 How does one invoke dub to fetch and build, and put into a=20
 place other that ~/.dub/=E2=80=A6 a package from Dub?
=20 dub fetch foo --version=3D1.0.0 mv ~/.dub/packages/foo-1.0.0 /desired/path dub add-path /desired/path =20 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 =20 ~/.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. --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.n= et 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
Jun 23
parent reply Laeeth Isharc <laaeeth nospam.kaleidic.io> writes:
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.
Jun 23
parent Russel Winder via Digitalmars-d-learn <digitalmars-d-learn puremagic.com> writes:
On Fri, 2017-06-23 at 09:24 +0000, Laeeth Isharc via Digitalmars-d-
learn wrote:
 [=E2=80=A6]
=20
 Check out the Kaleidic fork maintained by John Colvin - currently=20
 in his personal repository on github.  We submitted back our=20
 changes but ended up being quite a lot so not all have been=20
 accepted yet.  Allows you to change location of dub repos -=20
 useful to avoid work and personal interacting without having to=20
 use containers or VMs, but it may be easy enough to change path=20
 on an adhoc basis as you wish to do.  Don't recall right now, but=20
 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. --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.n= et 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
Jun 23