[DEP 12] Why chosing YAML.
Le Thu, Jan 03, 2013 at 10:29:13AM +0800, Paul Wise a écrit :
> Is there any reason you didn't choose a deb822 based format?
The "deb822" format, also known as "control data" or "paragraph" format, is
particularly useful for keeping in a single file a serie of groups of fields,
where the order of the groups is significant. This is the case for the source
package control file (debian/control), where the first paragraph is a header,
or for the machine-readable Debian copyright file, where the patterns of the
Files paragraphs take precedence over each other. Apart from this, I think
that it has no advantage over YAML.
The YAML format is precisely specified, but it is not the case of the control
data format, because the nature of each field (simple, folded, multiline) has
to be defined in advance. In contrast, with YAML, the nature of the field
(scalar, sequence, mapping), is embedded in the syntax. In the case of the
proposed debian/upstream file, I find this feature very important as I would
like it to be easy to extend with new fields.
The YAML format is also very convenient as it matches closely data structures
(scalar, array, hash) found in common interpreted languages.
We have used YAML as the syntax of debian/upstream for a couple of years and
have not experienced significant inconvenience. Other files formatted in YAML
are also already provided by the Debian infrastructure. There are good parsers
for a large number of languages.
Lastly, I think that using YAML for debian/upstream is more inviting for third
parties to download and use the data, because the control data format is not
much used outside Debian.
Altogether, I do not see benefits for using the control data format in
debian/upstream. I think that YAML is more straightforward and natural
for the debian/upstream file.
Are there major shortcomings that we would have overlooked ?
Have a nice week-end,
Tsurumi, Kanagawa, Japan