Skip to content

Emit a descriptive error when running the generator on iOS, tvOS, or watchOS #86

Closed
@czechboy0

Description

@czechboy0

The _OpenAPIGeneratorCore library and swift-openapi-generator executable are mostly an implementation detail of the OpenAPIGenerator plugin, all vended by the swift-openapi-generator package.

The generator runs at build time to generate code, but the _OpenAPIGeneratorCore library shouldn't actually be linked by adopters's target, which is documented correctly here (Step 7 of https://swiftpackageindex.com/apple/swift-openapi-generator/0.1.3/tutorials/swift-openapi-generator/clientxcode#Configuring-your-target-to-use-the-Swift-OpenAPI-Generator-plugin), but it's also easy to get it wrong and link it when adding the package in Xcode.

We should make it so that a clear, descriptive error is emitted when someone links the generator module itself to a non-macOS/Linux target.

Metadata

Metadata

Assignees

Labels

area/generatorAffects: plugin, CLI, config file.size/SSmall task. (A couple of hours of work.)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions