Thread overview | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
January 15, 2017 Using Dub | ||||
---|---|---|---|---|
| ||||
Attachments:
| 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.)
--
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
|
January 15, 2017 Re: Using Dub | ||||
---|---|---|---|---|
| ||||
Posted in reply to Russel Winder | 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).
|
January 15, 2017 Re: Using Dub | ||||
---|---|---|---|---|
| ||||
Posted in reply to Russel Winder | 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"
}
|
January 16, 2017 Re: Using Dub | ||||
---|---|---|---|---|
| ||||
Posted in reply to Daniel N Attachments:
| 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: > > 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. 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. > 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). No DMD installed. Seemingly Dub chooses /usr/bin/gdc over /usr/bin/ldc2. :-( -- 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 |
January 16, 2017 Re: Using Dub | ||||
---|---|---|---|---|
| ||||
Posted in reply to cym13 Attachments:
| 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: > > 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" > } Will an SDL file also work? -- 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 |
January 16, 2017 Re: Using Dub | ||||
---|---|---|---|---|
| ||||
Posted in reply to Russel Winder | 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:
>> 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"
>> }
>
> Will an SDL file also work?
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.
|
January 16, 2017 Re: Using Dub | ||||
---|---|---|---|---|
| ||||
Posted in reply to cym13 Attachments:
| 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: > > 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: > > > > 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" > > > } > > > > Will an SDL file also work? > > 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. I tried it, it failed. :-( Humans should never have to manually write XML or JSON. -- 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 |
January 16, 2017 Re: Using Dub | ||||
---|---|---|---|---|
| ||||
Posted in reply to Russel Winder | 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)...
|
January 16, 2017 Re: Using Dub | ||||
---|---|---|---|---|
| ||||
Posted in reply to Russel Winder | 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:
>> 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:
>> > > 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"
>> > > }
>> >
>> > Will an SDL file also work?
>>
>> 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.
>
> I tried it, it failed. :-(
>
> Humans should never have to manually write XML or JSON.
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.
|
January 16, 2017 Re: Using Dub | ||||
---|---|---|---|---|
| ||||
Posted in reply to cym13 | 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: >> 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: >>> > On Sun, 2017-01-15 at 17:44 +0000, cym13 via Digitalmars-d-learn wrote: >>> > > [...] >>> > >>> > Will an SDL file also work? >>> >>> 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. >> >> I tried it, it failed. :-( >> >> Humans should never have to manually write XML or JSON. > > 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. 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#L165 |
Copyright © 1999-2021 by the D Language Foundation