-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Sema: Warn on all non-resilient uses of @_implementationOnly import
, even for clang targets
#76267
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
@swift-ci Please smoke test |
…r clang targets The warnings about `using '@_implementationOnly' without enabling library evolution for 'client' may lead to instability during execution` and `@_implementationOnly' is deprecated, use 'internal import' instead` were wrongly restricted to only Swift import targets. Make sure they are raised for clang module targets as well. rdar://135233043
…n to Swift targets Preserve the warning to use `internal import` instead of `@_implementationOnly` to imports of Swift modules only. This warning can be noisy, limiting it may prevent users from outright learning to ignore it. Typical uses of an `@_implementationOnly` import of a clang module is often for a project internal module instead of a layering concern as we have with Swift module targets. We can leave legacy uses of `@_implementationOnly` in peace for now.
558f8d1
to
6c3c108
Compare
@swift-ci Please smoke test I reviewed the new logic to keep the warning to use |
The potential miscompiles that can arise from |
@swift-ci Please smoke test |
@tshortli My last change only silenced the deprecation warning in resilient modules. That's generally reliable, the one miscompile there I'm aware of would be with test clients that can't load the dependency because of different search paths. It's rare but maybe it's worth the warning. |
Oh, I misunderstood, thanks for clarifying. I have debugged miscompiles stemming from the combination of |
The warning about
using '@_implementationOnly' without enabling library evolution for 'client' may lead to instability during execution
was wrongly restricted to only imports of Swift modules. Make sure they are raised for imports of clang modules as well.rdar://135233043