Skip to content

Enable Windows tests in GitHub Actions #2993

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
Mar 7, 2025

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Mar 6, 2025

Fixes #2992

This exposed a bug in swift-syntax, which I’m fixing:

Normalize line ending to \n in StringLiteralExprSyntax.representedLiteralValue

This matches the specification of multi-line string literal handling:

From https://docs.swift.org/swift-book/documentation/the-swift-programming-language/lexicalstructure/#String-Literals:

Line breaks in a multiline string literal are normalized to use the line feed character. Even if your source file has a mix of carriage returns and line feeds, all of the line breaks in the string will be the same.

From https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20170417/035923.html:

The quoted string should normalize newlines to \n in the value of the literal, regardless of whether the source file uses \n (Unix), \r\n (Windows), or \r (classic Mac) line endings. Likewise, when the compiler strips the initial and final newline from the literal value, it will strip one of any of the \n, \r\n, or \r line-ending sequences from both ends of the literal.

@ahoppen ahoppen force-pushed the enable-windows branch 3 times, most recently from 5b12853 to 099f141 Compare March 7, 2025 02:22
@ahoppen ahoppen marked this pull request as ready for review March 7, 2025 02:23
@ahoppen ahoppen requested a review from bnbarham as a code owner March 7, 2025 02:23
…LiteralValue`

This matches the specification of multi-line string literal handling:

From https://docs.swift.org/swift-book/documentation/the-swift-programming-language/lexicalstructure/#String-Literals:
> Line breaks in a multiline string literal are normalized to use the line feed character. Even if your source file has a mix of carriage returns and line feeds, all of the line breaks in the string will be the same.

From https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20170417/035923.html:

> The quoted string should normalize newlines to \n in the value of the literal, regardless of whether the source file uses \n (Unix), \r\n (Windows), or \r (classic Mac) line endings. Likewise, when the compiler strips the initial and final newline from the literal value, it will strip one of any of the \n, \r\n, or \r line-ending sequences from both ends of the literal.
@ahoppen
Copy link
Member Author

ahoppen commented Mar 7, 2025

@swift-ci Please test

@ahoppen ahoppen enabled auto-merge March 7, 2025 07:28
@ahoppen ahoppen merged commit f2a32a7 into swiftlang:main Mar 7, 2025
22 checks passed
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.

Enable Windows CI checks in GitHub Actions
2 participants