Skip to content

Prepare Data(capacity:_:) and Data(rawCapacity:_:) for renaming#2029

Merged
jmschonfeld merged 1 commit into
swiftlang:release/6.4.xfrom
jmschonfeld:data-init-capacity-rename
Jun 9, 2026
Merged

Prepare Data(capacity:_:) and Data(rawCapacity:_:) for renaming#2029
jmschonfeld merged 1 commit into
swiftlang:release/6.4.xfrom
jmschonfeld:data-init-capacity-rename

Conversation

@jmschonfeld

Copy link
Copy Markdown
Contributor

Marks Data's relatively new initializers as non-public while its naming is under review

Motivation:

I'm preparing a pitch for new APIs across the Data type that align with new APIs proposed for UniqueArray and RigidArray. I'd like to reconsider the naming of these initializers to make them consistent with new naming proposed for other to-be-added APIs. Since we haven't shipped them yet, we can avoid a deprecate-and-replace by hiding the new APIs for now until the naming is confirmed

Modifications:

Marks the two initializers as internal or @_spi as needed to hide them without breaking clients.

Result:

These APIs are not widely accessible until the naming is finalized

Testing:

Existing unit tests still pass

@jmschonfeld jmschonfeld requested a review from glessard June 9, 2026 22:09
@jmschonfeld jmschonfeld requested a review from a team as a code owner June 9, 2026 22:09
@jmschonfeld

Copy link
Copy Markdown
Contributor Author

@swift-ci please test

@jmschonfeld jmschonfeld merged commit 01b7a4e into swiftlang:release/6.4.x Jun 9, 2026
24 checks passed
@jmschonfeld jmschonfeld deleted the data-init-capacity-rename branch June 9, 2026 22:54
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