mirror of
https://github.com/apple/swift-crypto
synced 2026-11-24 04:37:48 +00:00
This project is currently warnings-as-errors clean, but only because we
suppress `ImplementationOnlyDeprecated` warnings, using the following:
```
-Xswiftc -warnings-as-errors -Xswiftc -Wwarning -Xswiftc ImplementationOnlyDeprecated
```
With this setup, the warnings are still generated and are noisy.
Swift 6.4 introduces `SourceWarningControl`, which we can use to
actually _silence_ these warnings, using `@diagnose(_:as:)`.
This patch adds a dance around the `@_implementationOnly imports`:
#if hasFeature(SourceWarningControl)
@diagnose(ImplementationOnlyDeprecated, as: ignored)
#endif
@_implementationOnly import ...
On Swift 6.4, this project is now warnings free.
When we raise the minimum supported Swift compiler version to one that
supports `SourceWarningControl`, we can remove the `#if hasFeature`
guards.