Whoa whoa whoa slow down there folks...

Some people seemed to have misrecognised those keys as YAML.

It was NEVER meant to be YAML.

The idea was to use something more like MIME headers.

We all agreed that we DIDN'T want the format to be too heavy, and going with MIME or MIME-alike seemed the sweet spot in terms of ease of parsing and standardization vs extensibility.

Having YAML in the TAP spec would complicate things greatly, especially as the YAML spec includes things like multi-line strings. And it would mean that we'd have to deal with YAML error events, JSON-style parsing and a bunch of other things that are problematic.

It's NOT ease to parse at all, not compared to the current relative simplicity of TAP at the moment.

Adam K

Jonathan T. Rockway wrote:
 not ok 2 - omg t3h sooper test!!1!
 --- TAP diagnostics
 file:        foo.t


Why aren't we commenting the YAML block so that it's compatible with current TAP parsers? I'm thinking something like this:

not ok 2 - ensure that foo is equal to bar
# --- !!tap/diagnostics
# file: foo.t
# line: 42
# got:
#      - !!perl/foobar
#          key: value
# expected:
#      - !!perl/foobar
#         key: ~
# etc: (and so on)

The commented section is raw YAML goodness, AND this format is compatible with current TAP parsers. I'm liking this a lot, especially since I can use it Right Now (tm) by doing diag(Dump($data)).

Any reason this shouldn't be the standard? It's easy to parse, it's easy to read.

Would it be acecptable if I patched Test::More to start outputing it's expected/got messages in YAML instead of a plain text format?

Regards,
Jonathan Rockway

Reply via email to