Distributed Actors Help

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 :person_facepalming:
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:

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.

1 Like

Error:

Swift version:

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).

3 Likes

Thanks, it really worked :muscle:

1 Like

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 :+1:

1 Like

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.