-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Diag] Print the diagnostic ID name from localization #34319
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
Changes from all commits
dc5a4bd
1b0e8f9
651655e
ef7551d
f676066
b34cf95
d4ae826
8665e0c
65da71a
09b794d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// RUN: not %target-swift-frontend -debug-diagnostic-names -localization-path %S/Inputs -locale en -typecheck %s 2>&1 | %FileCheck %s --check-prefix=CHECK_NAMES | ||
|
||
_ = "HI! | ||
// CHECK_NAMES: error: unterminated string literal [lex_unterminated_string]{{$}} | ||
|
||
var self1 = self1 | ||
// CHECK_NAMES: error: circular reference [circular_reference]{{$}} | ||
// CHECK_NAMES: note: through reference here [circular_reference_through]{{$}} | ||
|
||
struct Broken { | ||
var b : Bool = True | ||
} | ||
// CHECK_NAMES: error: cannot find 'True' in scope [cannot_find_in_scope]{{$}} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// RUN: %empty-directory(%t) | ||
// RUN: swift-serialize-diagnostics --input-file-path=%S/Inputs/fr.yaml --output-directory=%t/ | ||
// RUN: swift-serialize-diagnostics --input-file-path=%S/Inputs/en.yaml --output-directory=%t/ 2>&1 | %FileCheck %s | ||
// RUN: not %target-swift-frontend -debug-diagnostic-names -localization-path %S/Inputs -locale fr -typecheck %s 2>&1 | %FileCheck %s --check-prefix=CHECK_NAMES | ||
|
||
// CHECK: These diagnostic IDs are no longer availiable: 'not_available_in_def, not_available_in_def_2, not_available_in_def_3, not_available_in_def_4, not_available_in_def_5' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you please remove these diagnostics from yaml in a separate PR? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Of course! But can you explain why? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I mean shouldn't we be testing/checking on There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay... makes sense thank you! |
||
_ = "HI! | ||
// CHECK_NAMES: error: chaîne non terminée littérale [lex_unterminated_string]{{$}} | ||
|
||
// FIXME: This used to produce a localized diagnostic. | ||
|
||
var self1 = self1 | ||
// CHECK_NAMES: error: circular reference [circular_reference]{{$}} | ||
// CHECK_NAMES: note: through reference here [circular_reference_through]{{$}} | ||
|
||
struct Broken { | ||
var b : Bool = True | ||
} | ||
// CHECK_NAMES: error: impossible de trouver 'True' portée [cannot_find_in_scope]{{$}} |
Uh oh!
There was an error while loading. Please reload this page.