Skip to content
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

Release 0.31.0 does not compile with macos template of Xcode 15.4 #388

Open
ericleponner opened this issue Sep 15, 2024 · 3 comments
Open
Labels
bug Something isn't working

Comments

@ericleponner
Copy link

ericleponner commented Sep 15, 2024

Description

I created a new project using Xcode 15.4 with macOS / App template.
I added hedera-sdk-swift package to the project (release 0.31.0 is automatically selected).
Build fails when Xcode tries to compile hedera-sdk-swift:

/Users/eric/Library/Developer/Xcode/DerivedData/Tagada-afirnpgcsvmepebtrdnhddpmxfev/SourcePackages/checkouts/hedera-sdk-swift/Sources/Hedera/CustomFee.swift:302:17: error: type 'UInt64' does not conform to protocol 'IntegerNumber'
         amount: Rational<UInt64> = "1/1",
                 ^
 /Users/eric/Library/Developer/Xcode/DerivedData/Tagada-afirnpgcsvmepebtrdnhddpmxfev/SourcePackages/checkouts/hedera-sdk-swift/Sources/Hedera/CustomFee.swift:333:24: error: type 'UInt64' does not conform to protocol 'IntegerNumber'
     public var amount: Rational<UInt64> {
                        ^
 /Users/eric/Library/Developer/Xcode/DerivedData/Tagada-afirnpgcsvmepebtrdnhddpmxfev/SourcePackages/checkouts/hedera-sdk-swift/Sources/Hedera/CustomFee.swift:351:43: error: type 'UInt64' does not conform to protocol 'IntegerNumber'
     public mutating func amount(_ amount: Rational<UInt64>) -> Self {
                                           ^
 /Users/eric/Library/Developer/Xcode/DerivedData/Tagada-afirnpgcsvmepebtrdnhddpmxfev/SourcePackages/checkouts/hedera-sdk-swift/Sources/Hedera/CustomFee.swift:471:24: error: type 'UInt64' does not conform to protocol 'IntegerNumber'
         exchangeValue: Rational<UInt64> = "1/1",
                        ^
 /Users/eric/Library/Developer/Xcode/DerivedData/Tagada-afirnpgcsvmepebtrdnhddpmxfev/SourcePackages/checkouts/hedera-sdk-swift/Sources/Hedera/CustomFee.swift:518:31: error: type 'UInt64' does not conform to protocol 'IntegerNumber'
     public var exchangeValue: Rational<UInt64> {
                               ^
 /Users/eric/Library/Developer/Xcode/DerivedData/Tagada-afirnpgcsvmepebtrdnhddpmxfev/SourcePackages/checkouts/hedera-sdk-swift/Sources/Hedera/CustomFee.swift:536:57: error: type 'UInt64' does not conform to protocol 'IntegerNumber'
     public mutating func exchangeValue(_ exchangeValue: Rational<UInt64>) -> Self {
                                                         ^
 /Users/eric/Library/Developer/Xcode/DerivedData/Tagada-afirnpgcsvmepebtrdnhddpmxfev/SourcePackages/checkouts/hedera-sdk-swift/Sources/Hedera/Protobufs/Rational+ProtobufCodable.swift:4:37: error: no type for 'T' can satisfy both 'T == UInt64' and 'T : IntegerNumber'
 extension Rational: ProtobufCodable where T == UInt64 {
                                     ^
 /Users/eric/Library/Developer/Xcode/DerivedData/Tagada-afirnpgcsvmepebtrdnhddpmxfev/SourcePackages/checkouts/hedera-sdk-swift/Sources/Hedera/Protobufs/Rational+ProtobufCodable.swift:4:37: error: no type for 'T' can satisfy both 'T == UInt64' and 'T : SignedInteger'
 extension Rational: ProtobufCodable where T == UInt64 {
                                     ^
 /Users/eric/Library/Developer/Xcode/DerivedData/Tagada-afirnpgcsvmepebtrdnhddpmxfev/SourcePackages/checkouts/hedera-sdk-swift/Sources/Hedera/Protobufs/Rational+ProtobufCodable.swift:4:37: error: no type for 'T' can satisfy both 'T == UInt64' and 'T : SignedNumeric'
 extension Rational: ProtobufCodable where T == UInt64 {


Steps to reproduce

  1. Start Xcode 15.4
  2. File > New > Project
    • Select macOS / App
    • Enter project name XXX
  3. File > Add Package
    • Select hedera-sdk-swift
  4. Product > Build

=> build fails (see above)

Additional context

No response

Hedera network

other

Version

v0.31.0

Operating system

macOS 14.6.1

@ericleponner ericleponner added the bug Something isn't working label Sep 15, 2024
@ericleponner
Copy link
Author

After investigation, it looks like NumberKit 2.6.0 is not compatible with hedera-sdk-swift.
If you force NumberKit to release 2.5.1 project builds successfully.

@RickyLB
Copy link
Contributor

RickyLB commented Sep 18, 2024

@ericleponner I have merged a PR that fixes this issue, making the SDK compatible with NumberKit version 2.6.0. This will be present on the SDK 0.32.0 release early next week.

@cdigiacinto
Copy link

@RickyLB when you will release version 0.32.0?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants