swift-distributed-actors icon indicating copy to clipboard operation
swift-distributed-actors copied to clipboard

Cleanup all warnings in 5.9 build

Open ktoso opened this issue 1 year ago • 7 comments

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

  • We should probably remove a bunch of those deprecations because they are not types the public API exposes and we just have the noise to suffer through it.
  • We should consistently remove those deprecated "actor ref" APIs
  • We should address new warnings that appear in the 5.9 build

ktoso avatar Jul 03 '23 04:07 ktoso

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

ktoso avatar Jul 03 '23 04:07 ktoso

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

  • Bump target version to macOS 14
  • Add macOS 13 specific extension that adds conformance?

Garfeild avatar Jun 23 '24 20:06 Garfeild

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

ktoso avatar Jun 27 '24 13:06 ktoso

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

Garfeild avatar Jun 29 '24 07:06 Garfeild

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

Garfeild avatar Jul 12 '24 03:07 Garfeild

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

Garfeild avatar Jul 18 '24 04:07 Garfeild

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

ktoso avatar Jul 18 '24 05:07 ktoso