Disable default OpenAPIRuntime traits#87
Conversation
|
We're not anticipating that many folks are using this transport on non-Darwin platforms. Are we expecting that dropping the foundation dependency is bringing any value here? |
|
The issue is that if you have a cross-platform lib, where you use .package(url: "https://github.com/apple/swift-openapi-urlsession", from: "1.2.0"),
.package(url: "https://github.com/swift-server/swift-openapi-async-http-client", from: "1.4.0"),
.package(url: "https://github.com/apple/swift-openapi-runtime", from: "1.11.0", traits: []),The This is even if you conditionally include the target: .product(
name: "OpenAPIURLSession",
package: "swift-openapi-urlsession",
condition: .when(platforms: [.macOS, .iOS])
), |
This seems like a serious limitation of the trait-based resolution in SwiftPM. Have we filed an issue for that? |
|
@simonjbeaumont Hm, I am not sure that is a "bug". |
|
@simonjbeaumont Would you be against getting this merged? |
|
@simonjbeaumont Hey, just wanted to check-in on this PR. We are currently forced to do an ugly We've done the same empty traits change for other repos, anything stopping us from doing the same here, and merging this in? |
|
Sorry. Still on vacation. I don't mind getting this merged. I kicked the CI. Maybe @guoye-zhang can shepherd it through while I'm out. |
|
Looks like something is wrong with the CI related to the import statements: |
|
We should probably get #89 merged first, but I don’t have the admin rights to do so |
|
OK, I merged #89 and updated this PR branch to unblock progress on this PR. |
|
Looks like the C++ interop is unrelated. This PR is good to review now. I'll take a look. |
simonjbeaumont
left a comment
There was a problem hiding this comment.
@madsodgaard thanks for your patience here while I was OOO. We've now dropped 6.0, so can we remove the additional manifest? Otherwise this LGTM.
|
@simonjbeaumont no problem! I removed the 6.0 manifest |
simonjbeaumont
left a comment
There was a problem hiding this comment.
Thanks @madsodgaard!
Disables the default traits for OpenAPIRuntime, so that anyone that depends on urlsession transport, can choose disable the default. runtime traits
Related:
FoundationEssentialsswift-server/swift-openapi-async-http-client#59