Skip to content

Adjust the platform-based linkage check #737

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

Merged
merged 1 commit into from
Feb 12, 2025
Merged
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
6 changes: 3 additions & 3 deletions Sources/_OpenAPIGeneratorCore/PlatformChecks.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@

// Emit a compiler error if this library is linked with a target in an adopter
// project.
//
// When compiling for MacCatalyst, the plugin is (erroneously?) compiled with os(iOS).
#if !(os(macOS) || os(Linux) || (os(iOS) && targetEnvironment(macCatalyst)))
// This is only done for platforms where the linkage was most likely added
// erroneously (for platforms which can't be used as development hosts).
#if (os(iOS) && !targetEnvironment(macCatalyst)) || os(tvOS) || os(watchOS) || os(visionOS)
#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."
)
Expand Down
Loading