orleans icon indicating copy to clipboard operation
orleans copied to clipboard

Bug: Exclude inaccessible interface methods from codegen

Open alrz opened this issue 1 year ago • 3 comments

Using the following type:

interface ISomeGrain : IGrain {
  protected Task Method();
  // other methods
}

The codegen generates invalid code. This member should be excluded from the proxy as it's not accessible from outside.

alrz avatar May 04 '24 13:05 alrz

What would you like to see happen here? Internal interfaces are acceptable. Protected members within them could possibly be supported with a codegen change to mark the corresponding member on the generated proxy as protected also

ReubenBond avatar May 06 '24 13:05 ReubenBond

What would you like to see happen here?

The implementation must be public or explicit, but it's simply throwing an unreachable exception because the code from ISomeGrain client won't get there anyways.

Note this member is not callable from "outside" but at that point we're already on the server, not client.

alrz avatar May 06 '24 14:05 alrz

simply throwing an unreachable exception

Correction: that wouldn't be correct for internal methods though

alrz avatar May 08 '24 13:05 alrz