apple / swift-openapi-urlsession

URLSession transport for Swift OpenAPI Generator.
https://swiftpackageindex.com/apple/swift-openapi-urlsession/documentation
Apache License 2.0
160 stars 29 forks source link

Disable ExistentialAny temporarily #10

Closed czechboy0 closed 1 year ago

czechboy0 commented 1 year ago

Motivation

Unfortunately until we adopt 5.9, adding ExistentialAny on upstream packages has unintended consequences for some downstream packages, so disabling for now. Details in https://github.com/apple/swift-openapi-generator/issues/120

Modifications

Disabled the feature enforcement, but the code changes are there, so downstream adopters can still use them.

Result

We won't be seeing the issue described in https://github.com/apple/swift-openapi-generator/issues/120.

Test Plan

PR CI, which discovered the original issue.

simonjbeaumont commented 1 year ago

Rather than just disable it everywhere, let's enable it in just the Swift 5.9+ builds, by adding -Xswiftc -enable-upcoming-feature -Xswiftc ExistentialAny to the 5.9 and nightly docker-compose files.

This way we won't regress.

FranzBusch commented 1 year ago

Rather than just disable it everywhere, let's enable it in just the Swift 5.9+ builds, by adding -Xswiftc -enable-upcoming-feature -Xswiftc ExistentialAny to the 5.9 and nightly docker-compose files.

What about adding a #if to the Package.swift so that also in local development we get this. I would prefer that over a flag just on the CI.