Skip to content
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

Move warning about strict concurrency into PlatformChecks.swift #289

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,9 @@ swiftSettings.append(

// Strict concurrency is enabled in CI; use this environment variable to enable it locally.
if ProcessInfo.processInfo.environment["SWIFT_OPENAPI_STRICT_CONCURRENCY"].flatMap(Bool.init) ?? false {
#warning("Compiling with Strict Concurrency")
swiftSettings.append(contentsOf: [
.define("SWIFT_OPENAPI_STRICT_CONCURRENCY"),
.enableExperimentalFeature("StrictConcurrency"),
.unsafeFlags(["-warnings-as-errors"]),
])
}
#endif
Expand Down
4 changes: 4 additions & 0 deletions Sources/_OpenAPIGeneratorCore/PlatformChecks.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@
#if !(os(macOS) || os(Linux))
#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.")
#endif

#if SWIFT_OPENAPI_STRICT_CONCURRENCY
#warning("Compiling with Strict Concurrency")
#endif