Posted Mon, 20 Jan 2014 09:17:02 GMT in reply to
Sönke Ludwig
Reply
On Wed, 15 Jan 2014 14:09:58 GMT, Sönke Ludwig wrote:
There is a third, and hopefully last, beta version for DUB 0.9.21. It contains four major new features:
New per-package build system (builds individual packages as static libraries), use --combined
to build everything at once (almost) like before
New "dub test" command to run the (unit) tests of a project
Supports (and recommends) public sub packages in sub folders. For example, the following entry in vibe.d's package description file would make the http server example available as a dependency "vibe-d:http-server-example"
:
{
...
"subPackages": {
"examples/http_server"
}
}
The preferred package description file name is now "dub.json" instead of "package.json" (the old name will continue to be supported).
Everything basically works, but a lot of testing is still needed to get a solid release. Please download from http://code.dlang.org/download (or GIT clone from https://github.com/rejectedsoftware/dub.git) and test with your projects, so that any regressions can be worked out early.
Not sure if this is a bug or a problem with a non-properly configured package.json, but the gfm package from code.dlang.org fails to compile: if you create a simple test project:
{
"name": "test",
"description": "A minimal D application.",
"copyright": "Copyright",
"authors": ["me"],
"dependencies": {
"gfm" : "~master"
}
}
This fails to compile: after building the single subpackages, it appears that a non-valid dmd command is issued:
dub build --verbose
[snip]
Building gfm configuration "library", build type debug.
Ignoring all import libraries for static library build.
Trying to use pkg-config to resolve library flags for [].
pkg-config failed: pkg-config exited with error code 1
Falling back to direct -lxyz flags.
Running dmd...
dmd -lib -of../../.dub/packages/gfm-master/.dub/build/library-debug-x8664-dmd-0F143CEA0D94A974CB517ABFF7D4DCBC/libgfm.a -debug -g -w -version=Havegfm -version=Havegfmmath -version=Havegfmnet -version=Havegfmcore -version=Havegfmassimp -version=Havederelictassimp3 -version=Havederelictutil -version=Havegfmfreeimage -version=Havederelictfi -version=Havegfmimage -version=Havegfmopengl -version=Havederelictgl3 -version=Havegfmsdl2 -version=Havederelictsdl2 -version=Have_temptest -I../../.dub/packages/gfm-master/math -I../../.dub/packages/gfm-master/net -I../../.dub/packages/gfm-master/core -I../../.dub/packages/gfm-master/assimp -I../../.dub/packages/derelict-assimp3-master/source -I../../.dub/packages/derelict-util-1.0.0/source -I../../.dub/packages/gfm-master/freeimage -I../../.dub/packages/derelict-fi-master/source -I../../.dub/packages/gfm-master/image -I../../.dub/packages/gfm-master/opengl -I../../.dub/packages/derelict-gl3-master/source -I../../.dub/packages/gfm-master/sdl2 -I../../.dub/packages/derelict-sdl2-master/source
DMD64 D Compiler v2.064
Copyright (c) 1999-2013 by Digital Mars written by Walter Bright
Documentation: http://dlang.org/
Usage:
<blablabla>
Again, my guess it's a package.json problem, but I couldn't find what's wrong, so I'm submitting this. Check it out if you have any spare time!