Skip to content

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

Merged
merged 1 commit into from
Nov 28, 2023
Merged

Bump runtime to 1.0.0-alpha.1 #11

merged 1 commit into from
Nov 28, 2023

Conversation

MahdiBM
Copy link
Collaborator

@MahdiBM MahdiBM commented Nov 28, 2023

  • Tests passed locally

@MahdiBM MahdiBM requested a review from 0xTim as a code owner November 28, 2023 12:07
@@ -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))
Copy link
Collaborator Author

@MahdiBM MahdiBM Nov 28, 2023

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.

Copy link
Collaborator Author

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,
Copy link
Collaborator Author

@MahdiBM MahdiBM Nov 28, 2023

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"),
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exact: as Honza suggested.

@MahdiBM MahdiBM merged commit dad79bf into main Nov 28, 2023
@MahdiBM MahdiBM deleted the mmbm-alpha-release branch December 13, 2023 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants