There has been some discussion about a machine-readable Changes file.
I'm maintaining a few distributions myself and have phases of making some changes to several distributions. Opening the Changes file, copying a few lines, inserting the current date and time and so on gets tedious.
I wanted to have a command-line tool with which to interact with Changes files. Also the Changes file should be machine-readable. So I wrote Module-Changes. I've chosen YAML for the format, although this is by no means mandatory - it's easy to write a new parser or formatter for your format of choice. Integration of new parsers, formatters etc. is something I still have to work on, though.
Some see YAML as a "failed format", but enough people (me included) find it useful and easy to read for both humans and machines, so that's what I've chosen as the default format. Even so, we need to agree on a YAML schema - that is, the layout of the Changes file.
This is not set in stone, it's more of a proposal. I'm hoping for a discussion of what people like or don't like in the current version, and what they would like to see in future versions.
---
global:
name: Module-Changes
log:
- v0.02:
author:...
changes:
-...
- v0.01:
changes:
-...
---
global:
name: Module-Changes
log:
v0.02:
author:...
changes:
-...
v0.01:
changes:
-...
Re:Change YAML syntax?
Alias on 2007-11-09T02:01:20
I don't find that very readable... lots of chrome...
---
version: 0.02 # plain number or version string, required
released-at: 2007-11-09 # datestring, required
released-by: Roland Giersig <RGiersig@cpan.org> # release author, required
api-stability: draft # stable | draft, required
backward-compatibility: partial # full | partial | none, required
breaks-compatibility-in: # list of subs, optional
- foo()
- bar()
bugs-fixed: # list of bugs with references, optional
- foo() crashes when given undef parameter <http://rt.cpan.org/Ticket/Display.html?id=1234>
- bar() should return "blah"
major-new-features: # list of text, optional
- now also handles the BAZ protocol
detailed-changes: # list of text, optional
- rearranged arguments to foo()
- changed return value of bar()
---
version: 0.01
released-at: 2007-09-05
released-by: Roland Giersig <RGiersig@cpan.org>
api-stability: draft
backward-compatibility: none
license-changed-to: Artistic # new license reference, optional
maintainer-changed-to: RGIERSIG # CPAN User Id of new maintainer, optional
---
Re:Format of Changes.yml
hanekomu on 2007-11-09T10:06:15
I've seen your proposal and also thought about it.
It seems a bit too detailed. Also I don't think that splitting the structure into different YAML streams for the sake of indentation is ideal. I don't mind indentation - after all, it's supposed to be machine-readable.
If you really want a human-readable version as well, just have the YAML in Changes.yml and run:
changes -f Changes.yml -ff >Changes
By the way, more updates are coming. I've simplified the YAML somewhat (less indentation!) and added a YAML validator that uses a schema with Kwalify.pm. v0.04 should be on CPAN soon.
Re:Format of Changes.yml
Corion on 2007-11-09T13:27:42
...after all, it's supposed to be machine-readable... Sorry, but if you keep it that way, it won't get much ground. First and foremost, it should be conveniently human-writable, everything else comes afterwards. Because if you can't write it conveniently as a human, people won't use the format and stay with "unreadable" formats for Changes files. Having the Changes file generated from Changes.yml adds complexity to the build process which is somewhat acceptable if it's easily (1 line in Makefile.PL) automated and hidden away.
Personally, I believe that putting too much "machine-only information" into Changes (for example the RDF-abomination) makes it impossible for me as a human to take a glance at the Changes file and see what changed. Putting too much structure into the YAML thing is about the same - I already dislike the --- stream delimiters where a simple newline does the same, but those stream delimiters are very close to the structural limit I'm willing to afford.
But maybe there is a need for a parser that parses the more conventional format(s) of Changes files, so if you can make your module have the appropriate hooks to guess the format of a Changes file and then call the appropriate parser plugin, that would be a convenient start. People who use your module can then support other formats by writing new parsers.
Re:Format of Changes.yml
Corion on 2007-11-09T13:43:46
I'm stupid. I just saw Module::Changes::Parser::Free , which does just what I proposed. Thank you for anticipating my complaints
:))