Skip to content

CodeGen needs updating in preparation for CoreCLR #1782

@jdom

Description

@jdom

As I try to get Orleans working with CoreCLR (#368), I noticed a few issues arising when trying to compile codegen'ed code in this new platform.

This is the code currently generated:

private static readonly global::System.Reflection.FieldInfo field0 = typeof (global::Orleans.ObserverSubscriptionManager<T>).@GetField("observers", (System.@Reflection.@BindingFlags.@Instance | System.@Reflection.@BindingFlags.@NonPublic | System.@Reflection.@BindingFlags.@Public));

But it needs the additional .GetTypeInfo() call first before it can call GetField() on it:

private static readonly global::System.Reflection.FieldInfo field0 = typeof (global::Orleans.ObserverSubscriptionManager<T>).GetTypeInfo().@GetField("observers", (System.@Reflection.@BindingFlags.@Instance | System.@Reflection.@BindingFlags.@NonPublic | System.@Reflection.@BindingFlags.@Public));

I tried briefly to fix SerializerGenerator.GenerateStaticFields() but was not able to do it. So instead of wasting a lot of time (which is limited, since there's a lot of changes that still need to happen for the port, and very little time before we can suggest changes), I ask the community if somebody can submit a PR for it (I assume it is very simple if you know the syntax, which I don't).
Any takers? @ReubenBond , @jasonholloway , @dVakulen ?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions