Skip to content

Conversation

simonjbeaumont
Copy link
Collaborator

@simonjbeaumont simonjbeaumont commented 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

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.

@simonjbeaumont simonjbeaumont added the ⚠️ semver/major Breaks existing public API. label Nov 27, 2023
@simonjbeaumont
Copy link
Collaborator Author

@czechboy0 we discussed previously on the Github issue renaming this to ContentLength and contentLength to allow for a staged upgrade path, but given we are now about to break API for 1.0.0-alpha, I did not do this. Happy to reconsider. WDYT?

@czechboy0
Copy link
Contributor

No let's just change the type, no need to stage this in. We'll be making more breaking changes before 1.0.0-alpha.1 anyway.

@simonjbeaumont
Copy link
Collaborator Author

OK, merging over API breakage CI as this is a deliberate API break, and the PR is labelled semver/major.

@simonjbeaumont simonjbeaumont merged commit 3917031 into apple:main Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚠️ semver/major Breaks existing public API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change HTTPBody length stored integer from Int to Int64
2 participants