Add @preconcurrency import (AddPreconcurrencyImport)
Overview
Adding @preconcurrency to an import suppresses or downgrades Sendable-related diagnostics that originate from the imported module.
When a module was written before Swift concurrency was introduced, its types may not have Sendable conformances. Importing such a module with @preconcurrency tells the compiler to treat missing Sendable conformances from that module more leniently, suppressing warnings in minimal and targeted strict concurrency modes and downgrading errors to warnings in complete mode.
To resolve this warning, add @preconcurrency to the import declaration:
@preconcurrency import NonStrictModuleSee Also
@dynamicCallable implementation requirements (DynamicCallable)Always enabled availability domains (AlwaysAvailableDomain)Argument matching for trailing closures (TrailingClosureMatching)Calling a mutating async actor-isolated method (ActorIsolatedMutatingAsync)Calling an actor-isolated method from a synchronous nonisolated context (ActorIsolatedCall)Captures in a `@Sendable` closure (SendableClosureCaptures)Compilation caching (CompilationCaching)Conforming to `StringInterpolationProtocol` (StringInterpolationConformance)Conversion from `@isolated(any)` function type to synchronous function type (ConversionFromIsolatedAnyToSynchronous)Cross-isolation data race (RegionIsolationCrossIsolationDataRace)Deprecated declaration warnings (DeprecatedDeclaration)Deprecated implementation-only imports (ImplementationOnlyDeprecated)Dynamic exclusivity (DynamicExclusivity)Embedded Swift language restrictions (EmbeddedRestrictions)Existential Types and Performance (ExistentialType)