[Accepted] ST-0013 Test Issue Severity

After acceptance of the proposal, we identified a potential source compatibility issue caused by the addition of the severity:parameter to the Issue.record function. This issue primarily arises when storing a reference to the Issue.record function:

// ❌ Source breakage due to new Issue.Severity parameter
let myRecordFunc: (Comment?, SourceLocation) -> Issue = Issue.record

We discussed the implications of this finding within the Swift Testing Workgroup after the proposal review. Our considerations included:

  1. The importance of preserving backward compatibility, especially since the original proposal did not foresee this potential source breakage;
  2. The perceived rarity of this specific case;
  3. Availability of potential solutions.

Ultimately, we decided to amend the proposal (and its implementation) to incorporate a compatibility solution aimed at preventing this source breakage. We believe this approach strikes the best balance: enabling the addition of different test issue severities while maintaining backward compatibility with existing codebases.

See the Source Compatibility section of the proposal for more details.

2 Likes