Skip to content

Fix multiline comments not rendering correctly at CLI. #850

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 1 commit into from
Dec 10, 2024

Conversation

grynspan
Copy link
Contributor

@grynspan grynspan commented Dec 10, 2024

This PR fixes a bug where a multi-line comment or message written to stderr would only have its first line in grey and would not write atomically, resulting in odd/incorrect output. All messages generated by a test event are now written to stderr atomically.

Resolves rdar://134519515.

Checklist:

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

This PR fixes a bug where a multi-line comment or message written to `stderr` would only
have its first line in grey and would not write atomically, resulting in odd/incorrect
output. All messages generated by a test event are now written to `stderr` atomically.

(I thought we had an issue tracking this somewhere but now I can't find it.)
@grynspan grynspan added bug 🪲 Something isn't working tools integration Integration of swift-testing into tools/IDEs command-line experience ⌨️ enhancements to the command line interface labels Dec 10, 2024
@grynspan grynspan self-assigned this Dec 10, 2024
@grynspan
Copy link
Contributor Author

@swift-ci test

@grynspan grynspan added this to the Swift 6.x milestone Dec 10, 2024
@grynspan grynspan merged commit 4be1dfe into main Dec 10, 2024
3 checks passed
@grynspan grynspan deleted the jgrynspan/fix-multiline-comments branch December 10, 2024 20:19
grynspan added a commit that referenced this pull request Dec 10, 2024
This PR fixes a bug where a multi-line comment or message written to
`stderr` would only have its first line in grey and would not write
atomically, resulting in odd/incorrect output. All messages generated by
a test event are now written to `stderr` atomically.

Resolves rdar://134519515.

### 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.
grynspan added a commit that referenced this pull request Dec 10, 2024
- **Explanation**: Refactor multi-line comment formatting in CLI and
JSON output so they correctly render.
  - **Scope**: CLI (`swift test`), VS Code plugin
  - **Issues**: rdar://134519515
  - **Original PRs**: #850
  - **Risk**: Low (no obvious risk)
- **Testing**: No additional testing needed. Verified output manually in
CLI and VS Code.
  - **Reviewers**: @briancroom @stmontgomery @plemarquand
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working command-line experience ⌨️ enhancements to the command line interface tools integration Integration of swift-testing into tools/IDEs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants