Skip to content

Introduce a severity level for issues, and a 'warning' severity (un-revert #931) #952

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 12, 2025

Conversation

stmontgomery
Copy link
Contributor

This un-reverts #950, effectively reintroducing the changes recently landed in #931.

The revert was needed because it revealed a latent bug in the Swift compiler, tracked by swiftlang/swift#79304. I reproduced that failure and included a workaround in the second commit on this PR.

Checklist:

  • Code and documentation should follow the style of the Style Guide.
  • If public symbols are renamed or modified, DocC references should be updated.

…evert swiftlang#931)

Revert "Merge pull request swiftlang#950 from stmontgomery/revert-issue-severity" (swiftlang#950)

This reverts commit 9998633, reversing
changes made to 55d0023.
@stmontgomery stmontgomery added enhancement New feature or request tools integration Integration of swift-testing into tools/IDEs workaround Workaround for an issue in another component (may need to revert later) build 🧱 Affects the project's build configuration or process issue-handling Related to Issue handling within the testing library labels Feb 12, 2025
@stmontgomery stmontgomery added this to the Swift 6.x milestone Feb 12, 2025
@stmontgomery stmontgomery self-assigned this Feb 12, 2025
@stmontgomery
Copy link
Contributor Author

@swift-ci please test

@stmontgomery stmontgomery merged commit fb93dd4 into swiftlang:main Feb 12, 2025
3 checks passed
@stmontgomery stmontgomery deleted the unrevert-issue-severity branch February 12, 2025 16:19
@grynspan grynspan added the self-reviewed PR was self-reviewed by a code owner label Feb 12, 2025
stmontgomery added a commit that referenced this pull request Feb 28, 2025
This updates `Event.JUnitXMLRecorder` to ignore `Issue` instances whose
`severity` is less than `.error` (such as `.warning`).

### Motivation:

The concept of issue severity was recently added in #931 (but was
reverted and re-landed in #952), and that did not adjust the JUnit XML
recorder logic. The JUnit XML schema we currently attempt to adhere to
does not appear to have a way to represent non-fatal issues, so I think
it would be best for now to ignore these issues.

### Modifications:

- Implement the fix and a validating unit test.
- (Drive-by) Fix a nearby test I noticed wasn't actually working as
intended and wasn't properly validating the fix it was intended to.

### Checklist:

- [x] Code and documentation should follow the style of the [Style
Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md).
- [x] If public symbols are renamed or modified, DocC references should
be updated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build 🧱 Affects the project's build configuration or process enhancement New feature or request issue-handling Related to Issue handling within the testing library self-reviewed PR was self-reviewed by a code owner tools integration Integration of swift-testing into tools/IDEs workaround Workaround for an issue in another component (may need to revert later)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants