www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Dub use

reply Russel Winder via Digitalmars-d <digitalmars-d puremagic.com> writes:
Dub appears to use only dmd, there appears to be no option fir the
dub.sdl file to tell it to use ldc2. Or am I just missing something =E2=80=
=93
very likely.

--=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
Dec 01 2015
next sibling parent reply Brad Anderson <eco gnuk.net> writes:
On Tuesday, 1 December 2015 at 18:43:17 UTC, Russel Winder wrote:
 Dub appears to use only dmd, there appears to be no option fir 
 the dub.sdl file to tell it to use ldc2. Or am I just missing 
 something – very likely.
dub --compiler=ldc2
Dec 01 2015
next sibling parent reply Russel Winder via Digitalmars-d <digitalmars-d puremagic.com> writes:
On Tue, 2015-12-01 at 18:45 +0000, Brad Anderson via Digitalmars-d
wrote:
 [=E2=80=A6]
=20
 dub --compiler=3Dldc2
Is there an in dub.sdl version of this? --=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
Dec 01 2015
parent reply =?UTF-8?Q?S=c3=b6nke_Ludwig?= <sludwig outerproduct.org> writes:
Am 01.12.2015 um 20:21 schrieb Russel Winder via Digitalmars-d:
 On Tue, 2015-12-01 at 18:45 +0000, Brad Anderson via Digitalmars-d
 wrote:
 […]

 dub --compiler=ldc2
Is there an in dub.sdl version of this?
Not currently. dub.sdl is not ideal, because it would lead to ambiguities within the dependency graph, but dub.selections.json could be extended to support that. What is also possible is to add a "defaultCompiler" field to ~/.dub/settings.json to change the default compiler user-wide.
Dec 01 2015
next sibling parent reply Russel Winder via Digitalmars-d <digitalmars-d puremagic.com> writes:
On Tue, 2015-12-01 at 20:38 +0100, S=C3=B6nke Ludwig via Digitalmars-d
wrote:
=20
[=E2=80=A6]
 Not currently. dub.sdl is not ideal, because it would lead to=20
 ambiguities within the dependency graph, but dub.selections.json
 could=20
 be extended to support that.
As Mathias pointed out putting the compiler choice in the dub.sdl file is actually not a good idea. I think leaving the dub.selection.json file as an automated file is probably best, it means it is disposable and recreatable easily without fear.
 What is also possible is to add a "defaultCompiler" field to=20
 ~/.dub/settings.json to change the default compiler user-wide.
I hadn't thought of that, possibly because the file name has .json as an extension. :-) I wonder if having a per-project file for this sort of "not part of the package specification, but part of the users use of the package" might be a good idea. THis way there could be different defaults on a per- project basis. Perhaps a settings.sdl file per project that takes priority of the settings.sdl/settings.json file in ~/.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
Dec 02 2015
parent reply Chris Wright <dhasenan gmail.com> writes:
On Wed, 02 Dec 2015 09:53:32 +0000, Russel Winder via Digitalmars-d wrote:

 On Tue, 2015-12-01 at 20:38 +0100, Sönke Ludwig via Digitalmars-d wrote:
 
[…]
 Not currently. dub.sdl is not ideal, because it would lead to
 ambiguities within the dependency graph, but dub.selections.json could
 be extended to support that.
As Mathias pointed out putting the compiler choice in the dub.sdl file is actually not a good idea. I think leaving the dub.selection.json file as an automated file is probably best, it means it is disposable and recreatable easily without fear.
You mean dub.selections.json isn't intended to be end-user-modifiable? I keep getting warnings about deprecated branch dependencies that say I should use a version tag and, if I really want a branch, edit dub.selections.json to make it happen. (This is mainly for ancient packages from before the semver times, most of which don't work at present.)
Dec 02 2015
parent reply Marc =?UTF-8?B?U2Now7x0eg==?= <schuetzm gmx.net> writes:
On Wednesday, 2 December 2015 at 16:50:28 UTC, Chris Wright wrote:
 On Wed, 02 Dec 2015 09:53:32 +0000, Russel Winder via 
 Digitalmars-d wrote:

 On Tue, 2015-12-01 at 20:38 +0100, Sönke Ludwig via 
 Digitalmars-d wrote:
 
[…]
 Not currently. dub.sdl is not ideal, because it would lead to 
 ambiguities within the dependency graph, but 
 dub.selections.json could be extended to support that.
As Mathias pointed out putting the compiler choice in the dub.sdl file is actually not a good idea. I think leaving the dub.selection.json file as an automated file is probably best, it means it is disposable and recreatable easily without fear.
You mean dub.selections.json isn't intended to be end-user-modifiable? I keep getting warnings about deprecated branch dependencies that say I should use a version tag and, if I really want a branch, edit dub.selections.json to make it happen. (This is mainly for ancient packages from before the semver times, most of which don't work at present.)
IMO it really should be auto-generated only, and fully determine the exact combination of package versions, so that it can be checked into SCM and be used to reproduce the same package state later on on a different machine. But currently that's not the case, and the deprecated branch dependencies are only one reason for it. I think this needs a rethought. Ruby's bundler [1] is a system that works really well in my experience, and can serve as a model. [1] http://bundler.io/
Dec 02 2015
parent Jacob Carlborg <doob me.com> writes:
On 2015-12-02 21:26, Marc Schütz wrote:

 IMO it really should be auto-generated only, and fully determine the
 exact combination of package versions, so that it can be checked into
 SCM and be used to reproduce the same package state later on on a
 different machine.

 But currently that's not the case, and the deprecated branch
 dependencies are only one reason for it. I think this needs a rethought.
 Ruby's bundler [1] is a system that works really well in my experience,
 and can serve as a model.

 [1] http://bundler.io/
I pushed for following the Bundler model from the start. It was very difficult to try to convince the author(s). -- /Jacob Carlborg
Dec 03 2015
prev sibling parent reply Mathias Lang via Digitalmars-d <digitalmars-d puremagic.com> writes:
2015-12-02 10:53 GMT+01:00 Russel Winder via Digitalmars-d <
digitalmars-d puremagic.com>:

 On Tue, 2015-12-01 at 20:38 +0100, S=C3=B6nke Ludwig via Digitalmars-d
 wrote:
 What is also possible is to add a "defaultCompiler" field to
 ~/.dub/settings.json to change the default compiler user-wide.
I hadn't thought of that, possibly because the file name has .json as an extension. :-) I wonder if having a per-project file for this sort of "not part of the package specification, but part of the users use of the package" might be a good idea. THis way there could be different defaults on a per- project basis. Perhaps a settings.sdl file per project that takes priority of the settings.sdl/settings.json file in ~/.dub. -- 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.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
I'd personally like to have a `.dubconfig` settings, similar to how `.gitconfig` does it (same locations and lookup rules, e.g. ~/.dubconfig taking precedence over the global one). Some obvious candidates are the default compiler, where to store the package cache, the default file format to use, and the default values that gets used for copyright / author / license when running `dub init`. I guess this should be part of an issue :)
Dec 02 2015
parent Guillaume Piolat <first.last gmail.com> writes:
On Wednesday, 2 December 2015 at 12:03:50 UTC, Mathias Lang wrote:
 I'd personally like to have a `.dubconfig` settings, similar to 
 how
 `.gitconfig` does it (same locations and lookup rules, e.g. 
 ~/.dubconfig
 taking precedence over the global one). Some obvious candidates 
 are the
 default compiler, where to store the package cache, the default 
 file format
 to use, and the default values that gets used for copyright / 
 author /
 license when running `dub init`.
 I guess this should be part of an issue :)
How about this goes in .dub/config.something (or following XDG, I don't know)
Dec 02 2015
prev sibling next sibling parent Mathias Lang via Digitalmars-d <digitalmars-d puremagic.com> writes:
2015-12-01 20:21 GMT+01:00 Russel Winder via Digitalmars-d <
digitalmars-d puremagic.com>:

 On Tue, 2015-12-01 at 18:45 +0000, Brad Anderson via Digitalmars-d
 wrote:
 [=E2=80=A6]

 dub --compiler=3Dldc2
Is there an in dub.sdl version of this? -- 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.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
Nope. And there won't be any, as it would imply supporting the idea of having packages that only compiles with a specific compiler (not very future-proof).
Dec 01 2015
prev sibling parent Russel Winder via Digitalmars-d <digitalmars-d puremagic.com> writes:
On Tue, 2015-12-01 at 20:37 +0100, Mathias Lang via Digitalmars-d
wrote:
=20
[=E2=80=A6]
 Nope. And there won't be any, as it would imply supporting the idea
 of
 having packages that only compiles with a specific compiler (not very
 future-proof).
Good point. I didn't think this through enough before commenting. Though S=C3=B6nke has provided a couple of ideas to achieve the goal in a sensible fashion. So I'm glad I did ask. :-) --=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
Dec 02 2015
prev sibling parent reply BBaz <2b.temp gmx.com> writes:
On Tuesday, 1 December 2015 at 18:43:17 UTC, Russel Winder wrote:

to:

 Dub appears to use only dmd, there appears to be no option fir 
 the dub.sdl file to tell it to use ldc2. Or am I just missing 
 something – very likely.
I reply: bolocks. ;)
Dec 01 2015
parent BBaz <2b.temp gmx.com> writes:
On Tuesday, 1 December 2015 at 18:45:25 UTC, BBaz wrote:
 On Tuesday, 1 December 2015 at 18:43:17 UTC, Russel Winder 
 wrote:

 to:

 Dub appears to use only dmd, there appears to be no option fir 
 the dub.sdl file to tell it to use ldc2. Or am I just missing 
 something – very likely.
I reply: bolocks. ;)
bollocks, indeed.
Dec 01 2015