-
Notifications
You must be signed in to change notification settings - Fork 12
Bump runtime to 1.0.0-alpha.1 #11
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
Conversation
MahdiBM
commented
Nov 28, 2023
- Tests passed locally
@@ -175,7 +175,7 @@ extension Vapor.Response.Body { | |||
} | |||
switch body.length { | |||
case let .known(count): | |||
self = .init(stream: stream, count: count) | |||
self = .init(stream: stream, count: Int(clamping: count)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
watchOS still uses Int == Int32
so it might need to "clamp" an Int64
to an Int32
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be clear these changes are because the runtime now uses Int64
instead of Int
, for the exact same watchOS reason.
@@ -102,7 +102,7 @@ extension OpenAPIRuntime.HTTPBody { | |||
let contentLength = vaporRequest.headers.first(name: "content-length").map(Int.init) | |||
self.init( | |||
vaporRequest.body.map(\.readableBytesView), | |||
length: contentLength?.map { .known($0) } ?? .unknown, | |||
length: contentLength?.map { .known(numericCast($0)) } ?? .unknown, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Int -> Int64
conversion which as of now should always succeed AFAIK.
@@ -24,7 +24,7 @@ let package = Package( | |||
.library(name: "OpenAPIVapor", targets: ["OpenAPIVapor"]) | |||
], | |||
dependencies: [ | |||
.package(url: "https://github.com/apple/swift-openapi-runtime.git", .upToNextMinor(from: "0.3.0")), | |||
.package(url: "https://github.com/apple/swift-openapi-runtime.git", exact: "1.0.0-alpha.1"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exact:
as Honza suggested.