Skip to content

[Dependency Scanner] Do not escape strings in the scanner output #34360

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
Oct 20, 2020

Conversation

artemcm
Copy link
Contributor

@artemcm artemcm commented Oct 20, 2020

When outputting strings for things like filenames, using write_escaped will result in Unicode characters being outputted with a full 3-character-octal or hex escape. Clients which expect a UTF-8 JSON output will not be able to parse such escape sequences.

@artemcm artemcm requested a review from nkcsgexi October 20, 2020 00:00
@artemcm
Copy link
Contributor Author

artemcm commented Oct 20, 2020

@swift-ci please test

When outputting strings for things like filenames, using `write_escaped` will result in Unicode characters being outputted with a full 3-character-octal or hex escape. Clients which expect a UTF-8 JSON output will not be able to parse such escape sequences.
@artemcm artemcm force-pushed the DoNotEscapeScannerOutputStrings branch from 94365bb to d7a6ded Compare October 20, 2020 00:02
@artemcm
Copy link
Contributor Author

artemcm commented Oct 20, 2020

@swift-ci please smoke test

@@ -0,0 +1,3 @@
func foo() {
print(1)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having an actual test itself have a Unicode character in its filename seems to trip up lit test infra.

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 94365bbf559b04b38db7fddf26fd24e9559007ed

@artemcm
Copy link
Contributor Author

artemcm commented Oct 20, 2020

@swift-ci please smoke test Windows platform

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 94365bbf559b04b38db7fddf26fd24e9559007ed

@artemcm
Copy link
Contributor Author

artemcm commented Oct 20, 2020

@swift-ci please test Windows platform

@artemcm artemcm merged commit 792c4b7 into swiftlang:main Oct 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants