-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Enable lazy ClangImporter diagnostics by default #40903
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
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.
This looks good to me.
However, before this lands, I want to make sure there is at least one test where there are multiple un-importable APIs and we only use one of them. We should only get one error.
2a6aa15
to
6726b13
Compare
@swift-ci please smoke test. |
As discussed offline, I just realized because these tests require objc-interop they are only getting run on macOS. Please add a test that uses C++ interop so they get run on all platforms. You can do something like this:
|
6726b13
to
44fd9c8
Compare
@swift-ci please smoke test |
44fd9c8
to
c236160
Compare
@swift-ci please smoke test |
@swift-ci please test Windows |
@@ -1,5 +1,5 @@ | |||
// RUN: %empty-directory(%t.mcp) | |||
// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk) -I %S/Inputs/custom-modules -Xcc -w -typecheck %s -module-cache-path %t.mcp -disable-named-lazy-member-loading 2>&1 | %FileCheck %s | |||
// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk) -disable-experimental-clang-importer-diagnostics -I %S/Inputs/custom-modules -Xcc -w -typecheck %s -module-cache-path %t.mcp -disable-named-lazy-member-loading 2>&1 | %FileCheck %s |
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.
Why did this test need to be updated?
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.
It doesn't need updating anymore, but at the time it was because the new diagnostics were tripping a CHECK-NOT. The diagnostic was accurate, and is still there, but now it's emmitted later in a position that does not trip a CHECK-NOT.
The new diagnostic informs about a circularFriends method that can't be imported because parameter type CircularName
is unimportable. Not exactly sure of the details, but looks intentional, I can dig deeper if need be.
Don't merge this until we resolve the updated test. I also want to understand why these can't be errors anymore. |
Replace the existing `-enable-experimental-clang-importer-diagnostics` flag with an opt-out version entitled `-disable-experimentalc-clang-importer-diagnostics`. Enable the beviour previously hidden behind the old flag by default.
c236160
to
7ec861f
Compare
@swift-ci please smoke test |
// CHECK-NOT: error | ||
// CHECK-NOT: note | ||
|
||
// CHECK-NOT: warning |
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.
TODO: Remove unnecessary CHECK-NOTs
@swift-ci please smoke test. |
MacOS failure looks unrelated to me. I will complete the TODO comment I have left over above, and will test with errors instead of notes here: #41162. If that goes well, should be ready for merge. |
@swift-ci please smoke test macOS |
Replace the existing
-enable-experimental-clang-importer-diagnostics
flag with an opt-out version entitled
-disable-experimentalc-clang-importer-diagnostics
.Enable the beviour previously hidden behind the old flag by default.
Implements the changes described in this forum post.