Am 12.12.2013 14:08, schrieb Dicebot:

On Thu, 12 Dec 2013 11:48:40 +0100, Sönke Ludwig wrote:

Am 12.12.2013 04:27, schrieb Øivind Loe:

How can I use DUB together with another build-tool? I want to use DUB to fetch dependencies, and list paths to these dependencies.. Then I want to take that list and do the actual compilation through another build-system.

Currently "dub describe" or "dub generate" are the interfaces to other
build systems, requiring either that the external tool reads the "dub
describe" JSON, or that a generator for that build tool is integrated
into DUB.

However, a "dub run-tool" (or whatever the name), that emits a bunch of
environment variables was another idea, which should be easier to handle
from a shell script, but is not implemented. Another final idea would be
to add a simple "dub list-dependencies" command, which prints a table
with "name/version/path" of the involved packages.

Following all recent threads on topic I am starting to think that maybe it would have been better to decouple package.json from build.json and thus registry interaction from building. Does it sound viable?

I don't know, they are coupled in may ways, but most importantly
facilitating using different build systems is probably the last thing I
would support, or put differently, the converse was one of the prime
reasons for even starting DUB. It's a tremendous advantage for the
ecosystem to have a unified build system, where things "just build"
without having to install different build tools or having to adjust make
scripts because they don't work on a certain platform etc.

Everything else just leads to the horrible mess that C++ is, where every
project at the very least needs to support two build systems
(Windows/others), but often needs to maintain a multitude of build
options. It will also destroy seamless package interoperability, because
each dependency needs to be configured, built and liked to differently.

Also, everyone is of course free to parse the JSON files and ignore the
fields that are only relevant for building.

So in conclusion, my opinion is that it should be possible to use
different systems when really desired, but everything should be done to
avoid that it becomes common practice.