-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Diagnostics] Mark invalid ‘@testable import’ as fatal #22191
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
Still needs a test. |
8964adf
to
7ce440d
Compare
@jrose-apple I added a test (was not aware -verify doesn't handle fatal errors!) |
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.
Looks good. And yeah, I don't know what tricks we'd have to jump through to make -verify
handle fatal errors, but at least it tells you!
@swift-ci please smoke test |
7ce440d
to
997c677
Compare
@swift-ci please smoke test |
@testable import Swift // expected-error {{module 'Swift' was not compiled for testing}} | ||
// CHECK: module 'Swift' was not compiled for testing | ||
// DISABLED-NOT: module 'Swift' was not compiled for testing | ||
@testable import Swift | ||
@testable import empty // no-error | ||
@testable import Testable_ClangModule // no-error |
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.
Now these aren't being checked anymore.
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.
How about now? I'm trying to be a bit more explicit than before.
If this isn’t fatal, this will just end up cascading to a bunch of “could not find member … in …” errors, which hides the real issue.
997c677
to
f4b0e0e
Compare
@swift-ci please smoke test |
If this isn’t fatal, this will just end up cascading to a bunch of “could not find member … in …” errors, which hides the real issue.