Am 20.03.2014 10:10, schrieb Jonas Drewsen:
On Thursday, 20 March 2014 at 07:17:04 UTC, Sönke Ludwig wrote:
Am 19.03.2014 00:16, schrieb Atila Neves:
V0.0.4 now supports both package.json and dub.json
There is one change that I would highly recommend - using the output
of "dub describe" instead of directly reading dub.json:
- It's planned to add an SDL based format, which otherwise then would
also have to be supported
I currently have a tool that read and writes the dub.json files. What
would you suggest for this tool since "describe" would only solve the
reading part and not the writing. Furthermore adding SDL format as well
doubles the effort for this. Is dub usable as a library so that this
wouldn't be a problem?
Yes, it has been built to be usable as a library, although there are
certain parts of the API that are not yet considered full quality. But
package file reading and writing using the "Package" class works fine
and is already used by some other projects, such as the package registry.
Having said that, there are of course cases where processing the JSON
file directly isn't really problematic. It just may not be the best idea
to rebuild the dependency and platform logic as long as the package
format isn't fully stable.