apple / swift-distributed-actors

Peer-to-peer cluster implementation for Swift Distributed Actors
https://apple.github.io/swift-distributed-actors/
Apache License 2.0
587 stars 55 forks source link

Cleanup all warnings in 5.9 build #1125

Open ktoso opened 1 year ago

ktoso commented 1 year ago

We have a lot of self induced "deprecation warnings" because we use the runtime that people should not be touching.

ktoso commented 1 year ago

There's a lot of these annoying ones:

/Users/ktoso/code/swift-distributed-actors/Sources/DistributedCluster/ClusterSystem.swift:833:38: warning: conformance of 'Never' to 'Encodable' is only available in macOS 14.0 or newer
        guard let selector = context.selectorSegments.first else {
                                     ^
/Users/ktoso/code/swift-distributed-actors/Sources/DistributedCluster/ClusterSystem.swift:833:38: note: add 'if #available' version check
        guard let selector = context.selectorSegments.first else {
                                     ^
/Users/ktoso/code/swift-distributed-actors/Sources/DistributedCluster/ClusterSystem.swift:832:10: note: add @available attribute to enclosing instance method
    func _resolveUntyped(context: _ResolveContext<Never>) -> _AddressableActorRef {
         ^

due to Never gaining a Codable conformance as well

Garfeild commented 3 months ago

Hey @ktoso! What would be the best strategy to address Never warnings? I can think about two solutions:

ktoso commented 3 months ago

Tbh I think we can bump the platform requirement, would you want to do that? :)

Garfeild commented 3 months ago

Yeah, I would like to do that with some of other warnings as well. 🙂

Garfeild commented 2 months ago

FYI, I have opened one PR and have another one pending 😉

Garfeild commented 2 months ago

@ktoso sorry for the ping, but could you take a look on it when you have spare time? 😇 #1158

ktoso commented 2 months ago

Thanks for the ping, I'll give it a look