Skip to content

Conversation

@mluisbrown
Copy link
Contributor

@mluisbrown mluisbrown commented Jul 9, 2025

Rename the bytes computed property in the extension on Data to byteArray to avoid clashing with new bytes: RawSpan property added in SE-0456 for Swift 6.2

Fixes #1073

Checklist:

  • Correct file headers (see CONTRIBUTING.md).
  • Formatted with SwiftFormat.
  • Tests added.

Changes proposed in this pull request:

  • rename the bytes computed property in the extension on Data to byteArray.
  • this is a breaking change, but nonetheless necessary for compatibility with Xcode 26

to `byteArray` to avoid clashing with new `bytes: RawSpan` property
added in SE-0456 for Swift 6.2
@mluisbrown mluisbrown requested a review from krzyzanowskim as a code owner July 9, 2025 21:32
@mluisbrown mluisbrown changed the title Rename the bytes computed property in the extension on Data to byteArray Rename the bytes computed property in the extension on Data to byteArray Jul 9, 2025
Copy link
Collaborator

@nathanfallet nathanfallet left a comment

Choose a reason for hiding this comment

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

I guess it's the easiest way to fix it, since a RawSpan cannot be used directly.

@nathanfallet nathanfallet merged commit 2c06f88 into krzyzanowskim:main Jul 10, 2025
nathanfallet added a commit that referenced this pull request Jul 10, 2025
nathanfallet added a commit that referenced this pull request Jul 10, 2025
@c128128
Copy link

c128128 commented Aug 7, 2025

This PR has broken a large part of my dependency tree.

@mluisbrown
Copy link
Contributor Author

This PR has broken a large part of my dependency tree.

@c128128 you can stick with version 1.8.5 for now, but if you want to build for iOS/macOS 26 which has Swift 6.2, you will have to use version 1.9.0 with this PR, as previous versions won't compile. There was no way to fix this without a source breaking change.

@nathanfallet
Copy link
Collaborator

Agree, people were blocked with the new bytes property from Apple so their code could not compile. I don't think there is any other way to solve this issue.

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.

3 participants