I can't really use distributed actors feature for experimentation on my linux device because of the lack of different actor systems. Even the swift distributed actor repository doesn't compile because of version couldn't be resolved
Any help @ktoso
Hi there,
can you be more clear about what doesn't compile?
What versions of tools are you using, and what is the error you're seeing.
Available systems today are:
- The distributed actors cluster builds fine and is verified using CI and periodic source compatibility builds.
- GitHub - apple/swift-distributed-actors: Peer-to-peer cluster implementation for Swift Distributed Actors
- to double check, I've just verified and it builds fine.
- or the sample transport implementation, if you'd like something with a smaller implementation to learn how actor system implementations can be written
- GitHub - apple/swift-sample-distributed-actors-transport: Distributed actors transport example, for feature review
- also confirmed it builds fine using the provided instructions.
- the local testing actor system that ships with Swift if you just want to play around with the isolation semantics
Happy to assist with any issues you might be facing, but you'll have to provide more concrete information about what's not working as expected.
This looks like a broken package cache tbh. The message does not make any sense, there are no conflicting versions here and the version definitely exists.
I suspect the following would fail on your machine:
cd ~/.swiftpm/cache/repositories/swift-nio-???????? && git fetch --tags && git tag -l;
i.e. not contain the expected tags.
You may want to wipe the cache:
rm -rf ~/.swiftpm/cache/
and all build artifacts to be double sure you get everything nice and clean built:
rm -rf .build
rm -rf Samples/.build
and try again.
--
I've also double checked resolution on a Linux host and as expected it worked fine (since we test this project on Linux hosts all the time, but I double checked).
Thanks, it really worked
Hooray, glad it was only a cache issue.
If you have any questions please donβt hesitate to reach out, Iβm more than happy to help
So glad but is there any comprehensive tutorial or documentation on how to use distributed actors?
Where can I get other Actor Systems such as SampleWebSocketActorSystem not the LocalTestingDistributedActorSystem?
Reference style documentation for the cluster is hosted here: ClusterSystem - Documentation
Reference style documentation for the language feature we sadly didn't yet add to the Swift Book on Swift.org but that will appear there eventually. The holdup has mostly been logistics, but now that the swift book is hosted publicly, the adding of the documentaiton is much easier than before so we'll pick it up eventually. I mostly recommend the WWDC talk as primary "how to use" resource for now.
In the resources linked from the WWDC talk: Meet distributed actors in Swift - WWDC22 - Videos - Apple Developer "the tic tac fish" sample app.