On Fri, 09 May 2014 20:00:22 GMT, Luís Marques wrote:

On Fri, 09 May 2014 18:20:48 GMT, Sönke Ludwig wrote:

There is also a little tool for simple cases in the registry: forever-d

There's something I don't understand about dub and forever-d. forever-d has a package.json, and the page at http://code.dlang.org/packages/forever-d says you can add forever-d as a dependency in your .json file. But forever-d is not a library (is it?). If you add it as a dependency nothing is built, so not only do you not get a lib but you also don't get the unix program built either.

This is indeed sub-optimal. The registry should ideally detect if a package is an application or a library (or both) and adjust the instructions accordingly.

Even though nothing is built, dub complains that "Package forever-d contains no source files. Please add {"targetType": "none"} to it's package description to avoid building it."

DUB should most probably rather error out with something like "Package forever-d doesn't define a library configuration. Cannot build as a dependency.". I'd need to look at the package to see why this is not the case.

Furthermore, dub has no option to just say "fetch and build forever-d", as a general package manager, instead of a dependency manager -- does it? I guess it would not be too hard to extend dub to do that. That would be nicer than having to find the forever-d repo, making sure a stable version is checked-out, building it, installing it, etc.

That's a two step procedure currently:

dub fetch forever-d
dub run forever-d     # or: dub build forever-d