akkadotnet / akka.net

Canonical actor model implementation for .NET with local + distributed actors in C# and F#.
http://getakka.net
Other
4.69k stars 1.04k forks source link

Akka.FSharp System.create trows an exception when akka.extensions is populated in HOCON #3404

Open mjelev opened 6 years ago

mjelev commented 6 years ago

System.ArgumentException: An item with the same key has already been added. at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at Akka.FSharp.Serialization.exprSerializationSupport(ActorSystem system) at Akka.FSharp.System.create(String name, Config config) at <StartupCode$FSI_0042>.$FSI_0042.main@() in

Here is the script to reproduce:

let configWithExtension = Configuration.parse """akka { extensions = ["Akka.Cluster.Tools.PublishSubscribe.DistributedPubSubExtensionProvider,Akka.Cluster.Tools"] actor {
provider = cluster } }""" let system = System.create "mySystem" configWithExtension

AaronEshbach commented 6 years ago

Pull Request #3407 adds a unit test that reproduces this issue.

chrisjhoare commented 6 years ago

If you don't need remote deployment of serialized f# actors you can use the regular ActorSystem.Create to get around this.