[Sema/SourceKit] Emit same diagnostics for missing protocol requirements 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
This commit is contained in:
Alex Hoppen
2024-08-05 13:15:07 -07:00
parent 2b2b763697
commit 66104395d7
143 changed files with 889 additions and 690 deletions

View File

@@ -53,6 +53,7 @@ distributed actor ProtocolWithChecksSeqReqDA_MissingSystem: ProtocolWithChecksSe
// expected-error@-4{{distributed actor 'ProtocolWithChecksSeqReqDA_MissingSystem' does not declare ActorSystem it can be used with}}
//
// expected-error@-6{{type 'ProtocolWithChecksSeqReqDA_MissingSystem' does not conform to protocol 'DistributedActor'}}
// expected-note@-7 {{add stubs for conformance}}
// Entire conformance is doomed, so we didn't proceed to checking the functions; that's fine
distributed func testAT() async throws -> NotCodable { .init() }