onekiloparsec / SwiftAA

The most comprehensive collection of accurate astronomical algorithms in (C++, Objective-C and) Swift.
http://www.onekiloparsec.dev/
MIT License
172 stars 31 forks source link

Cannot compile SwiftAA with Swift4 #58

Closed alex-vasenin closed 5 years ago

alex-vasenin commented 7 years ago

Even with SWIFT_VERSION=3.2, due to the changes in Swift Standard Library, Xcode 9 says .../SwiftAA/Angles.swift:96:15: Type 'ArcMinute' does not conform to protocol 'Numeric' for all NumericTypes

onekiloparsec commented 7 years ago

Hm... I haven't opened Xcode9 yet (but I have it installed!). Too busy elsewhere. I'll have a look!

onekiloparsec commented 7 years ago

Hm, Xcode requires to implement these stubs (here for Degree but similar for others):

public static func *(lhs: Degree, rhs: Degree) -> Degree {
    <#code#>
}

public static func *=(lhs: inout Degree, rhs: Degree) {
    <#code#>
}

No idea how to deal with it right now.

rodericj commented 7 years ago

I just ran into this as well. I'd be down to help out. I started along the path described above but ran into some issues with public typealias Magnitude = <#type#> in the Xcode suggestion when I hit the Fixit button. I'll have to look at it a bit later.

onekiloparsec commented 7 years ago

Hm, I wish we could finish milestone 2.0 before migrating to Swift4...

Sent from an iPhone 6s running iOS10 at 1 kiloparsec from the galactic stellar black-hole GRO J1655-40.

Le 1 août 2017 à 02:19, Roderic Campbell notifications@github.com a écrit :

I just ran into this as well. I'd be down to help out. I started along the path described above but ran into some issues with public typealias Magnitude = <#type#> in the Xcode suggestion when I hit the Fixit button. I'll have to look at it a bit later.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

onekiloparsec commented 6 years ago

I renamed the issue, because it is formally possible to compile current SwiftAA with Xcode9. But we have to work on Swift4 (milestone 3.0)

onekiloparsec commented 5 years ago

This is now done since quite a while. Closing.

rodericj commented 5 years ago

Thank you!