Skip to content

Change HTTPBody length stored integer from Int to Int64 #354

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

Closed
czechboy0 opened this issue Oct 31, 2023 · 2 comments · Fixed by apple/swift-openapi-runtime#79
Closed

Change HTTPBody length stored integer from Int to Int64 #354

czechboy0 opened this issue Oct 31, 2023 · 2 comments · Fixed by apple/swift-openapi-runtime#79
Labels
area/runtime Affects: the runtime library. kind/bug Feature doesn't work as expected. size/S Small task. (A couple of hours of work.)
Milestone

Comments

@czechboy0
Copy link
Contributor

Change HTTPBody length stored integer from Int to Int64.

This will be an API break, so must happen as part of a minor before 1.0 or as part of 1.0 itself.

@czechboy0 czechboy0 added area/runtime Affects: the runtime library. kind/bug Feature doesn't work as expected. size/S Small task. (A couple of hours of work.) labels Oct 31, 2023
@czechboy0 czechboy0 added this to the 1.0 milestone Oct 31, 2023
@simonjbeaumont
Copy link
Collaborator

This will be an API break, so must happen as part of a minor before 1.0 or as part of 1.0 itself.

To help roll this out, we could rename this type at the same time to contentLength and deprecate length?

@czechboy0
Copy link
Contributor Author

Yeah that's a good idea, that way we can land now and clean up the deprecated one for 1.0.

simonjbeaumont added a commit to apple/swift-openapi-runtime that referenced this issue Nov 27, 2023
### Motivation

The associated value of enum case `HTTPBody.Length.known` was `Int`,
and, on watchOS, `Int = Int32`, which is not ideal for a content length.

### Modifications

- (API breaking) Change type of HTTPBody.Length.known from Int to Int64.

### Result

Can now express larger values for content type on 32-bit platforms.

### Test Plan

Unit tests pass.

### Related Issues

- Fixes apple/swift-openapi-generator#354.

### Note

I have marked this PR as `semver/major` as it constitutes the first of
the PRs we make in the run up to 1.0.0-alpha.1 and the release notes
generator should therefore catch us from inadvertently cutting another
pre-1.0 patch release.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/runtime Affects: the runtime library. kind/bug Feature doesn't work as expected. size/S Small task. (A couple of hours of work.)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants