vlingo-net / xoom-net-actors

Type safe Actor Model toolkit for reactive concurrency and resiliency using C# and other .NET languages.
Mozilla Public License 2.0
39 stars 18 forks source link

Proxy generator should include full names for types resolution #54

Closed tjaskula closed 5 years ago

tjaskula commented 5 years ago

The current implementation generates the code in the form:

LocalMessage<Node>

but this leads to many conflicts where for example we have a namespace clash with type name like for the type Vlingo.Wire.Node.Node. The generated proxy LocalMessage<Node> obviously doesn't compile if we have using Vlingo.Wire.Node at the beginning of the file.

It would be much better and less error prone if instead of relying on using directives we just put the full name spaces like

LocalMessage<Vlingo.Wire.Node.Node>

They are just proxy, so we don't care if this looks bad but at least it will work in every case. Now it's not working for many proxies that I have to fix manually.

zpbappi commented 5 years ago

Thanks @tjaskula. I should change it to include the fully qualified name everywhere a type is used. That's safer. Will make the changes soon.

VaughnVernon commented 5 years ago

For generated code import/using is far more difficult to get right. We should eliminate imports in to generated Java. The IDE will show warnings if the import isn't used, which is an annoying false negative that distracts me.

tjaskula commented 5 years ago

Fixed by #55