Skip to content

New diagnostic formatter adds extra whitespace on Windows #64413

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

Closed
bnbarham opened this issue Mar 8, 2023 · 2 comments · Fixed by #66061
Closed

New diagnostic formatter adds extra whitespace on Windows #64413

bnbarham opened this issue Mar 8, 2023 · 2 comments · Fixed by #66061
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler itself diagnostic printer Area → compiler: diagnostic printer swift 5.9 Windows Platform: Windows

Comments

@bnbarham
Copy link
Contributor

bnbarham commented Mar 8, 2023

Description

The new formatter on Windows seems to add extra whitespace between each line:

=== .../swift/stdlib/public/core/Macros.swift:32:11 ===

31 | public macro fileID<T: ExpressibleByStringLiteral>() -> T =

32 |   Builtin.FileIDMacro

   |           ^ warning: ignoring definition of unknown builtin macro 'FileIDMacro'

33 |

Possibly some mishandling of \r\n?

Steps to Reproduce

Run a swift build on Windows now that it uses the new formatter by default for the compiler compilation. CC @compn

@bnbarham bnbarham added the bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. label Mar 8, 2023
@ahoppen
Copy link
Member

ahoppen commented Mar 8, 2023

rdar://106434712

@compnerd compnerd added the Windows Platform: Windows label Mar 13, 2023
@compnerd
Copy link
Member

This is almost certainly in the C++ implementation and not in the Swift implementation. Should we move this to the Swift repository?

@ahoppen ahoppen removed bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. Windows Platform: Windows labels Mar 16, 2023
@ahoppen ahoppen transferred this issue from swiftlang/swift-syntax Mar 16, 2023
@AnthonyLatsis AnthonyLatsis added bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler itself Windows Platform: Windows swift 5.9 diagnostic printer Area → compiler: diagnostic printer labels Mar 16, 2023
hjyamauchi added a commit to hjyamauchi/swift that referenced this issue May 22, 2023
The swift driver emits extra newlines because it applies the LF ->
CRLF conversions on the outpt from the child processes. Fix it by
using the binary mode when outputting the output from the child
processes.

Fixes: swiftlang#64413
hjyamauchi added a commit to hjyamauchi/swift that referenced this issue May 22, 2023
The swift driver emits extra newlines because it applies the LF ->
CRLF conversions again on the outpt from the child processes. Fix it
by using the binary mode when outputting the output from the child
processes.

Fixes: swiftlang#64413
hjyamauchi added a commit to hjyamauchi/swift that referenced this issue May 22, 2023
The swift driver emits extra newlines because it applies the LF ->
CRLF conversions again on the outpt from the child processes. Fix it
by using the binary mode when outputting the output from the child
processes.

Fixes: swiftlang#64413
hjyamauchi added a commit to hjyamauchi/swift that referenced this issue May 23, 2023
The swift driver emits extra newlines because it applies the LF ->
CRLF conversions again on the outpt from the child processes. Fix it
by using the binary mode when outputting the output from the child
processes.

Fixes: swiftlang#64413
hjyamauchi added a commit to hjyamauchi/swift that referenced this issue May 23, 2023
The swift driver emits extra newlines because it applies the LF ->
CRLF conversions again on the outpt from the child processes. Fix it
by using the binary mode when outputting the output from the child
processes.

Fixes: swiftlang#64413
NuriAmari pushed a commit to NuriAmari/swift that referenced this issue May 28, 2023
The swift driver emits extra newlines because it applies the LF ->
CRLF conversions again on the outpt from the child processes. Fix it
by using the binary mode when outputting the output from the child
processes.

Fixes: swiftlang#64413
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler itself diagnostic printer Area → compiler: diagnostic printer swift 5.9 Windows Platform: Windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants