-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Switch to the "Swift" diagnostic style as the default #71722
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
Switch to the "Swift" diagnostic style as the default #71722
Conversation
These tests are checking the printed outpout of the diagnostic formatter in ways that change with the Swift formatter, but are not consequential.
These tests are using FileCheck to check the result of diagnostic formatting in ways that don't match the new formatter. Force the old formatter or, where possible, generalize so that they match both formatters.
The old diagnostic formatter would crash on some Fix-Its involving Unicode characters. The new one does not.
@swift-ci please test |
Python on Windows seems unhappy with some of the Unicode we are producing:
|
Some versions of Python are unhappy with the Unicode the new diagnostic formatter produces. For now, disable in one of the Python scripts where we detect this.
@@ -2,5 +2,12 @@ | |||
// RUN: not %target-swift-frontend -typecheck %s 2> %t.errors | |||
// RUN: %FileCheck %s <%t.errors | |||
// CHECK-NOT: Program arguments: | |||
|
|||
// Note: extra newlines below ensure that context printing doesn't show the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this comment would be useful in the other tests that have multiple newlines as well. I was quite confused by them at first.
swiftlang/swift-package-manager#7349 @swift-ci please test |
swiftlang/swift-package-manager#7368 @swift-ci please test |
@DougGregor Hahaha you finally fixed that compiler_crasher! Nice! Only one left... |
The new "Swift" diagnostic style has been enabled for standard library builds for quite a while now, and we've addressed all of the issues we've seen with it. Turn it on by default.
There are a significant number of FileCheck-based tests in our test suite that are checking for the precise output of the LLVM diagnostic formatter, and do not pass with the new Swift one. Generalize those tests that are easy to generalize, so they pass with both, and force others to use the older formatter with
-diagnostic-style llvm
. If we need to switch back, we can leave the tests and switch the default back easily enough.This resolves one old compiler crasher due to some poor Unicode handling in the older diagnostic formatter.