Commit 0de1799
authored
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]>1 parent 6a259ae commit 0de1799
File tree
2 files changed
+5
-2
lines changed- Sources/_OpenAPIGeneratorCore
2 files changed
+5
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | 30 | | |
| 31 | + | |
32 | 32 | | |
33 | | - | |
34 | 33 | | |
35 | 34 | | |
36 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
0 commit comments