You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Move warning about strict concurrency into PlatformChecks.swift (#289)
### Motivation
In #191 we enabled strict concurrency in CI. We also attempted to
include it conditionally as part of a local development flow. However,
the `#warning` (that strict concurrency was enabled) added to
Package.swift was firing unconditionally because it was, itself, behind
a _runtime_ conditional.
### Modifications
Now if `SWIFT_OPENAPI_STRICT_CONCURRENCY=true` then we will add a
`define` to the `swiftSettings` and we will move the `#warning` to the
existing `PlatformChecks.swift`.
### Result
Opening Xcode with `SWIFT_OPENAPI_STRICT_CONCURRENCY=true` will enable
strict concurrency warnings locally. Opening Xcode without this will no
longer produce a misleading warning.
### Test Plan
Tested locally.
Signed-off-by: Si Beaumont <[email protected]>
Copy file name to clipboardExpand all lines: Sources/_OpenAPIGeneratorCore/PlatformChecks.swift
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -17,3 +17,7 @@
17
17
#if !(os(macOS) || os(Linux))
18
18
#error("_OpenAPIGeneratorCore is only to be used by swift-openapi-generator itself—your target should not link this library or the command line tool directly.")
0 commit comments