-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Sema/SourceKit] Emit same diagnostics for missing protocol requirements on the command line and in SourceKit #75667
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
Conversation
928043b
to
564a3b6
Compare
@swift-ci Please smoke test |
564a3b6
to
6d879cf
Compare
@swift-ci Please smoke test |
6d879cf
to
6577a60
Compare
@swift-ci Please smoke test |
@@ -3474,11 +3474,6 @@ bool ContextualFailure::tryProtocolConformanceFixIt( | |||
conformanceDiag.fixItInsert(nameEndLoc, ": " + protoString); | |||
} | |||
|
|||
// Emit fix-its to insert requirement stubs if we're in editor mode. | |||
if (!getASTContext().LangOpts.DiagnosticsEditorMode) { |
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.
Can we fully remove this LangOpt?
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.
There are two more uses (about switch
IIRC) that I want to remove in a follow-up PR. This one is big enough on its own.
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.
Thanks @ahoppen!
…nts on the command line and in SourceKit Some editors use diagnostics from SourceKit to replace build issues. This causes issues if the diagnostics from SourceKit are formatted differently than the build issues. Make sure they are rendered the same way, removing most uses of `DiagnosticsEditorMode`. To do so, always emit the `add stubs for conformance` note (which previously was only emitted in editor mode) and remove all `; add <something>` suffixes from notes that state which requirements are missing. rdar://129283608
6577a60
to
6610439
Compare
@swift-ci Please smoke test |
@@ -3,12 +3,11 @@ | |||
// FIXME: this test only passes on platforms which have Float80. | |||
// <rdar://problem/19508460> Floating point enum raw values are not portable | |||
|
|||
// REQUIRES: CPU=i386 || CPU=x86_64 |
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.
The test fails on arm platforms due to this change. See FIXME above.
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.
Already fixing it in #75784. This change as unintentional.
Some editors use diagnostics from SourceKit to replace build issues. This causes issues if the diagnostics from SourceKit are formatted differently than the build issues. Make sure they are rendered the same way, removing most uses of
DiagnosticsEditorMode
.To do so, always emit the
add stubs for conformance
note (which previously was only emitted in editor mode) and remove all; add <something>
suffixes from notes that state which requirements are missing.rdar://129283608