digitalmars.D.learn - Using Dub
- Russel Winder via Digitalmars-d-learn (13/13) Jan 15 2017 Is there any way of setting dub to default to ldc2 rather than dmd as
- Daniel N (5/8) Jan 15 2017 I have never used dub, but I know it's now also bundled with ldc2.
- Russel Winder via Digitalmars-d-learn (20/29) Jan 16 2017 On the one hand Cargo works wonderfully with Rust so I had hoped Dub
- Dejan Lekic (5/8) Jan 16 2017 Cargo does not have multiple Rust compilers as an option. Dub
- cym13 (5/8) Jan 15 2017 Create a file ~/.dub/settings.json with the following content:
- Russel Winder via Digitalmars-d-learn (13/23) Jan 16 2017 Will an SDL file also work?
- cym13 (3/17) Jan 16 2017 I don't think so, but as that's about the only option you can put
- Russel Winder via Digitalmars-d-learn (14/33) Jan 16 2017 I tried it, it failed. :-(
- cym13 (7/32) Jan 16 2017 What do you mean it failed? I did that on another computer to
- cym13 (5/28) Jan 16 2017 Oh, maybe you're on windows, in which case the settings.json file
- Russel Winder via Digitalmars-d-learn (13/18) Jan 16 2017 Windows is anathema.
- Russel Winder via Digitalmars-d-learn (12/18) Jan 16 2017 trying a settings.sdl file failed setting.json works.
Is there any way of setting dub to default to ldc2 rather than dmd as the compiler of use? (I do not want to have to put --compiler ldc2 on every dub command.) --=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
Jan 15 2017
On Sunday, 15 January 2017 at 13:23:25 UTC, Russel Winder wrote:Is there any way of setting dub to default to ldc2 rather than dmd as the compiler of use? (I do not want to have to put --compiler ldc2 on every dub command.)I have never used dub, but I know it's now also bundled with ldc2. I would assume that if your PATH to ldc2 comes before that of dmd, it would find the ldc2 bundled version of dub and it would do the smart thing(if not, that's a bug).
Jan 15 2017
On Sun, 2017-01-15 at 17:25 +0000, Daniel N via Digitalmars-d-learn wrote:On Sunday, 15 January 2017 at 13:23:25 UTC, Russel Winder wrote:On the one hand Cargo works wonderfully with Rust so I had hoped Dub would work wonderfully with D. Sadly I am finding it doesn't. Possibly my fault, but still annoying. There is a Dub package in Debian. It seems to default to GDC rather than LDC, which is annoying. Meson defaults to LDC, but getting it to handle the Dub repository is going to be impossible I suspect.Is there any way of setting dub to default to ldc2 rather than=C2=A0 dmd as the compiler of use? (I do not want to have to put=C2=A0 --compiler ldc2 on every dub command.)=20 I have never used dub, but I know it's now also bundled with ldc2.I would assume that if your PATH to ldc2 comes before that of=C2=A0 dmd, it would find the ldc2 bundled version of dub and it would=C2=A0 do the smart thing(if not, that's a bug).No DMD installed. Seemingly Dub chooses /usr/bin/gdc over /usr/bin/ldc2. :-( --=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
Jan 16 2017
On Monday, 16 January 2017 at 09:40:55 UTC, Russel Winder wrote:On the one hand Cargo works wonderfully with Rust so I had hoped Dub would work wonderfully with D. Sadly I am finding it doesn't. Possibly my fault, but still annoying.Cargo does not have multiple Rust compilers as an option. Dub could look to find for compiler if it is not set, but that may disappoint users who have multiple compilers installed (myself included)...
Jan 16 2017
On Sunday, 15 January 2017 at 13:23:25 UTC, Russel Winder wrote:Is there any way of setting dub to default to ldc2 rather than dmd as the compiler of use? (I do not want to have to put --compiler ldc2 on every dub command.)Create a file ~/.dub/settings.json with the following content: { "defaultCompiler": "ldc2" }
Jan 15 2017
On Sun, 2017-01-15 at 17:44 +0000, cym13 via Digitalmars-d-learn wrote:On Sunday, 15 January 2017 at 13:23:25 UTC, Russel Winder wrote:=C2=A0"ldc2"Is there any way of setting dub to default to ldc2 rather than=C2=A0 dmd as the compiler of use? (I do not want to have to put=C2=A0 --compiler ldc2 on every dub command.)=20 Create a file ~/.dub/settings.json with the following content: =20 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0{ =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0"defaultCompiler":==C2=A0=C2=A0=C2=A0=C2=A0=C2=A0}Will an SDL file also work? --=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
Jan 16 2017
On Monday, 16 January 2017 at 09:42:03 UTC, Russel Winder wrote:On Sun, 2017-01-15 at 17:44 +0000, cym13 via Digitalmars-d-learn wrote:I don't think so, but as that's about the only option you can put in that file it's ok to use JSON.On Sunday, 15 January 2017 at 13:23:25 UTC, Russel Winder wrote:Will an SDL file also work?Is there any way of setting dub to default to ldc2 rather than dmd as the compiler of use? (I do not want to have to put --compiler ldc2 on every dub command.)Create a file ~/.dub/settings.json with the following content: { "defaultCompiler": "ldc2" }
Jan 16 2017
On Mon, 2017-01-16 at 10:47 +0000, cym13 via Digitalmars-d-learn wrote:On Monday, 16 January 2017 at 09:42:03 UTC, Russel Winder wrote:r":=C2=A0"ldc2"On Sun, 2017-01-15 at 17:44 +0000, cym13 via=C2=A0 Digitalmars-d-learn wrote:On Sunday, 15 January 2017 at 13:23:25 UTC, Russel Winder=C2=A0 wrote:Is there any way of setting dub to default to ldc2 rather=C2=A0 than dmd as the compiler of use? (I do not want to have to=C2=A0 put --compiler ldc2 on every dub command.)=20 Create a file ~/.dub/settings.json with the following content: =20 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0{ =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0"defaultCompile=I tried it, it failed. :-( Humans should never have to manually write XML or JSON. --=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=20 I don't think so, but as that's about the only option you can put=C2=A0 in that file it's ok to use JSON.=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0}=20 Will an SDL file also work?
Jan 16 2017
On Monday, 16 January 2017 at 10:59:33 UTC, Russel Winder wrote:On Mon, 2017-01-16 at 10:47 +0000, cym13 via Digitalmars-d-learn wrote:What do you mean it failed? I did that on another computer to test and it works flawlessly for me. This configuration file can contain only two options: default compiler and urls to reach when looking for packets. It's litterally 3 lines, while I support the fact that one should never have to write XML that's about as concise as it can get.On Monday, 16 January 2017 at 09:42:03 UTC, Russel Winder wrote:I tried it, it failed. :-( Humans should never have to manually write XML or JSON.On Sun, 2017-01-15 at 17:44 +0000, cym13 via Digitalmars-d-learn wrote:I don't think so, but as that's about the only option you can put in that file it's ok to use JSON.On Sunday, 15 January 2017 at 13:23:25 UTC, Russel Winder wrote:Will an SDL file also work?Is there any way of setting dub to default to ldc2 rather than dmd as the compiler of use? (I do not want to have to put --compiler ldc2 on every dub command.)Create a file ~/.dub/settings.json with the following content: { "defaultCompiler": "ldc2" }
Jan 16 2017
On Monday, 16 January 2017 at 16:47:29 UTC, cym13 wrote:On Monday, 16 January 2017 at 10:59:33 UTC, Russel Winder wrote:Oh, maybe you're on windows, in which case the settings.json file must be placed in either $ProgramData\dub or in $APPDATA\dub. Relevant lines of dub.d: https://github.com/dlang/dub/blob/master/source/dub/dub.d#L165On Mon, 2017-01-16 at 10:47 +0000, cym13 via Digitalmars-d-learn wrote:What do you mean it failed? I did that on another computer to test and it works flawlessly for me. This configuration file can contain only two options: default compiler and urls to reach when looking for packets. It's litterally 3 lines, while I support the fact that one should never have to write XML that's about as concise as it can get.On Monday, 16 January 2017 at 09:42:03 UTC, Russel Winder wrote:I tried it, it failed. :-( Humans should never have to manually write XML or JSON.On Sun, 2017-01-15 at 17:44 +0000, cym13 via Digitalmars-d-learn wrote:I don't think so, but as that's about the only option you can put in that file it's ok to use JSON.[...]Will an SDL file also work?
Jan 16 2017
On Mon, 2017-01-16 at 16:51 +0000, cym13 via Digitalmars-d-learn wrote:=20[=E2=80=A6]Oh, maybe you're on windows, in which case the settings.json file=C2=A0 must be placed in either $ProgramData\dub or in $APPDATA\dub.=C2=A0 Relevant lines of dub.d:=C2=A0 https://github.com/dlang/dub/blob/master/source/dub/dub.d#L165Windows is anathema. --=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
Jan 16 2017
On Mon, 2017-01-16 at 16:47 +0000, cym13 via Digitalmars-d-learn wrote:[=E2=80=A6] =20 What do you mean it failed? I did that on another computer to=C2=A0 test and it works flawlessly for me. =20 [=E2=80=A6]trying a settings.sdl file failed setting.json works. --=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
Jan 16 2017