www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - A little DUB question

reply "thedeemon" <dlang thedeemon.com> writes:
I've missed all the DUB discussions here and couldn't find the 
answer to my question in the docs, so here it is, very simple:
I've got an app with one dependency stated in package.json as
	"dependencies": {
		"pegged": "~master"
	}
When I build my app with
dub build --build=release
the app itself gets compiled in release mode, but the library it 
depends on (in this case Pegged) gets compiled in Debug, so the 
binary ends up 2-3 times larger than if I build everything myself 
without DUB.
What is the right way to build everything in release using DUB 
here?
Dec 31 2013
next sibling parent reply "ponce" <contact g3m3sfrommars.fr> writes:
On Tuesday, 31 December 2013 at 10:35:46 UTC, thedeemon wrote:
 I've missed all the DUB discussions here and couldn't find the 
 answer to my question in the docs, so here it is, very simple:
 I've got an app with one dependency stated in package.json as
 	"dependencies": {
 		"pegged": "~master"
 	}
 When I build my app with
 dub build --build=release
 the app itself gets compiled in release mode, but the library 
 it depends on (in this case Pegged) gets compiled in Debug, so 
 the binary ends up 2-3 times larger than if I build everything 
 myself without DUB.
 What is the right way to build everything in release using DUB 
 here?
Looks like a bug. In the meantime you can compile combined. $ dub --build=release --combined
Dec 31 2013
next sibling parent reply "thedeemon" <dlang thedeemon.com> writes:
On Tuesday, 31 December 2013 at 10:42:35 UTC, ponce wrote:

     $ dub --build=release --combined
I guess this is something very recent, latest binary version from http://code.dlang.org/download doesn't know this word yet.
Dec 31 2013
parent reply "ponce" <contact g3mesfrommars.fr> writes:
On Tuesday, 31 December 2013 at 16:32:19 UTC, thedeemon wrote:
 On Tuesday, 31 December 2013 at 10:42:35 UTC, ponce wrote:

    $ dub --build=release --combined
I guess this is something very recent, latest binary version from http://code.dlang.org/download doesn't know this word yet.
Erm. Yes it is. You would have to use dub HEAD.
Jan 01 2014
parent "ponce" <contact g3mesfrommars.fr> writes:
On Wednesday, 1 January 2014 at 15:47:47 UTC, ponce wrote:
 On Tuesday, 31 December 2013 at 16:32:19 UTC, thedeemon wrote:
 On Tuesday, 31 December 2013 at 10:42:35 UTC, ponce wrote:

   $ dub --build=release --combined
I guess this is something very recent, latest binary version from http://code.dlang.org/download doesn't know this word yet.
Erm. Yes it is. You would have to use dub HEAD.
Never mind, if you don't have the --combined switch it's because you have a dub version where it is the default.
Jan 01 2014
prev sibling parent "Casper =?UTF-8?B?RsOmcmdlbWFuZCI=?= <shorttail hotmail.com> writes:
On Tuesday, 31 December 2013 at 10:42:35 UTC, ponce wrote:
 Looks like a bug. In the meantime you can compile combined.

     $ dub --build=release --combined
Error executing command run: Failed to find a package named '--combined'.
Dec 31 2013
prev sibling parent reply =?UTF-8?B?U8O2bmtlIEx1ZHdpZw==?= <sludwig outerproduct.org> writes:
Am 31.12.2013 11:35, schrieb thedeemon:
 I've missed all the DUB discussions here and couldn't find the answer to
 my question in the docs, so here it is, very simple:
 I've got an app with one dependency stated in package.json as
      "dependencies": {
          "pegged": "~master"
      }
 When I build my app with
 dub build --build=release
 the app itself gets compiled in release mode, but the library it depends
 on (in this case Pegged) gets compiled in Debug, so the binary ends up
 2-3 times larger than if I build everything myself without DUB.
 What is the right way to build everything in release using DUB here?
Hm, which version do you use? The latest releases don't yet support building dependencies separately, so I guess it must be a GIT master version. However, for the latest HEAD, I can't reproduce the issue, so I'd recommend to pull the latest changes in that case. But there will also be a new beta release shortly.
Jan 03 2014
parent "thedeemon" <dlang thedeemon.com> writes:
On Friday, 3 January 2014 at 09:28:32 UTC, Sönke Ludwig wrote:

 Hm, which version do you use?
This one: http://code.dlang.org/files/dub-0.9.21-beta.1-setup.exe (I'm on Windows)
Jan 03 2014