Oslo: TAP Diagnostics

Ovid on 2008-04-05T09:47:32

Sitting in Oslo right now. We are now nailing down the new YAML diagnostic syntax. Tentatively we have something like this:

TAP version 14
   1..4
   ok 1 - Input file opened
   not ok 2 - First line of the input valid
     ---
     results:
       have: 'Flirble'
       want: 'Fnible'
     severity: fail
     file: t/foo.t
     line: 12
     tags:
       - IO
       - config
     source: is $line[0], 'Fnible', 'First line of the input valid';
     ...

There are other keys like 'timestamp', url', 'display' and similar that will likely be included. All are optional.


YAML

Aristotle on 2008-04-05T14:53:26

Please make sure to specify that the diagnostics have to conform to the YAML Tiny subset of YAML.

Re:YAML

Ovid on 2008-04-05T16:46:01

Why? Do recall that this is also be allowed for other languages with different data structures with different serialization requirements.

Re:YAML

Aristotle on 2008-04-05T17:26:18

Precisely. YAML is not suitable for high-fidelity serialisation. You really want eg. Data::Dump::Streamer if your data structures are tricky.

However, writing a YAML parser is a much bigger job than writing a TAP parser. Parsing YAML Tiny is on par with parsing TAP, and the dialect is perfectly sufficient for modest serialisation needs.

So demanding a full YAML parser to parse TAP won’t provide substantial benefit but may hamper adoption of TAP.