Problem
parseMusicXML / scoreFromMusicXML accept an optional warnings list, so a partial import is no longer indistinguishable from a complete one. Coverage is not total, and this issue tracks the residue rather than letting the README carry it alone.
Re-probed for 2.8.0 over nine malformed documents:
| Document |
Behaviour |
<pitch> with no <octave> |
rejected — FormatException |
unknown <step> |
rejected — FormatException |
| not a score at all |
rejected — FormatException |
<divisions>0</divisions> |
warned |
non-positive <duration> |
warned |
unknown <clef><sign> |
SILENT |
unknown <type> |
SILENT |
non-numeric <alter> |
SILENT |
missing <part-list> |
SILENT |
Why the silent four matter
Each one changes what the score means without saying so. An unknown <clef><sign> silently keeps the previous clef, so every pitch after it is engraved on the wrong line. A non-numeric <alter> drops an accidental. An unknown <type> drops a duration. A missing <part-list> loses staff naming and grouping.
Acceptance criteria
- Each of the four raises a warning naming the element and the offending value.
- The decision between warn and reject is stated per case, not chosen ad hoc — the current rule is that a defect which makes the surrounding music unreadable rejects, and one that loses a detail warns.
- A test per case, in the same shape as the existing malformed-document probes.
Problem
parseMusicXML/scoreFromMusicXMLaccept an optionalwarningslist, so a partial import is no longer indistinguishable from a complete one. Coverage is not total, and this issue tracks the residue rather than letting the README carry it alone.Re-probed for 2.8.0 over nine malformed documents:
<pitch>with no<octave>FormatException<step>FormatExceptionFormatException<divisions>0</divisions><duration><clef><sign><type><alter><part-list>Why the silent four matter
Each one changes what the score means without saying so. An unknown
<clef><sign>silently keeps the previous clef, so every pitch after it is engraved on the wrong line. A non-numeric<alter>drops an accidental. An unknown<type>drops a duration. A missing<part-list>loses staff naming and grouping.Acceptance criteria