Skip to content

Conversation

@adeneley
Copy link

Summary of Changes

In Swift 6.2 (6.2.0.19.9), Data.bytes now returns a RawSpan not a [UInt8].

  • Replaced .bytes calls with Array(dataSlice) where [UInt8] is required.
  • No functional changes to APIs — this is a compatibility fix for Swift 6.2.

Fixes #892

Test Data or Screenshots

All tests passed
Screenshot 2025-08-28 at 14 14 39

By submitting this pull request, you are confirming the following:
  • I have reviewed the Contribution Guidelines.
  • I have performed a self-review of my own code.
  • I have updated my repository to match the develop branch.
  • I have included test data or screenshots that prove my fix is effective or that my feature works.
  • I have checked that all tests work and swiftlint is not throwing any errors/warnings.
In Swift 6.2 (6.2.0.19.9), Data.bytes now returns a RawSpan not a [UInt8]. Updated usages of .bytes where we are expecting [UInt8] by slicing Data directly.
@yaroslavyaroslav
Copy link
Collaborator

What about backward compatibility? Is it works on prev xcodes?

@adeneley
Copy link
Author

adeneley commented Sep 2, 2025

Hi, thanks for the response.

The only change is to remove usages of .bytes where [Uint8] was expected. In replacing that, I only used the following:

Array(), .dropFirst() & .prefix()

These have all been in Swift for a long time, so there should be no backward compatibility problems. To be sure I have re-run the local tests on Xcode 16.4. All local tests passed - screenshot is below.

image

Thanks

@yaroslavyaroslav yaroslavyaroslav merged commit 5cf13de into web3swift-team:develop Sep 2, 2025
1 of 2 checks passed
@yaroslavyaroslav
Copy link
Collaborator

Thank you for your contribution!

@m4rr
Copy link

m4rr commented Sep 23, 2025

Bump on this one--it didn't pass thru CI push to the release:

Screenshot 2025-09-24 at 00 13 29
@yaroslavyaroslav
Copy link
Collaborator

yaroslavyaroslav commented Sep 24, 2025

Yeah, ci/cd was failing bc one of the remote test was failing bc of lack of gas on a wallet it used. I disabled it so now I hope ci/cd is fixed now.

And ye, 3.3.2 released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants