apple / swift-distributed-actors

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

ActorTestKit uses @testable import DistributedCluster, causing problems for build -c release #1113

Open ktoso opened 1 year ago

ktoso commented 1 year ago

The testkit inherently DOES pry into a lot of the actor runtime internals of the cluster. It provides mocks and test probes and various things that pretend to be behavior actors but are not.

This needs to use internal APIs, and we do so by using a @testable import in the TestKit. Making it not need that is a painful task making a lot of "old runtime" types public, which we absolutely don't want to do, given that now actors and distributed actors are in the language, so we would not want to expose MORE of our previous infrastructure.

If we had the package access visibility this would solve the issue. https://forums.swift.org/t/se-0386-package-access-modifier/62808/

This prevents the source-compatibility-suite to build the cluster in release mode.

ktoso commented 1 year ago

Related issue rdar://106086239

ktoso commented 1 year ago

Ah, we can move to @_spi(ActorTestKit) and that should work, excellent