On Sat, 09 Mar 2013 12:11:09 GMT, Sönke Ludwig wrote:

There has been some discussion about using a different format than JSON for the package description files. While this topic is techinically not particularily pressing, it would be good to know where to go with this early. The two candidates so far are YAML and SDL. JSON will still be supported for backwards compatibility and as the default format that is transferred over the network (package registry). The following sections list the pros/cons of each format and an example of how it could look like. My favorite so far is SDL, which was originally proposed by Nick Sabalausky, who also made a D implementation. So now I think it would be good to get some more input to get a collective opinion on this before implementing anything.

I confess that I detest yaml due to the fact that it's whitespace sensitive. json is far superior IMHO. As for SDL, the format seems a bit off to me due to the complete lack of separators or delimiters on most lines, though at least it requires fewer quotes than json does. Overall, I'm perfectly okay with json except that the lack of comments is a serious downside (is that a json spec issue or an issue with the current implementation?), but I'm not against SDL if the consensus is that it's better. But the change needs to be made soon if you want to minimize breakage when people update, and the fact that dub has been getting some attention it the main D newsgroup will likely lead to it being used more soon if it hasn't already (that's how I found out about it).

I think that one key thing to remember is that if dub is trying to become D's official package manager, it can't rely on external libraries for anything (except for the standard library). So, any package format that it supports either needs to be parseable with Phobos or with dub's own code. json is the only one of the three that's currently in Phobos (though std.json does need an overhaul). So, if dub goes with SDL (or yaml), it either needs to an SDL parser internally, or an SDL parser needs to be added to Phobos (though it's quite possible that one could be used internally and then added to Phobos later).