Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Exclude inaccessible interface methods from codegen #8973

Closed
alrz opened this issue May 4, 2024 · 3 comments · Fixed by #9019
Closed

Bug: Exclude inaccessible interface methods from codegen #8973

alrz opened this issue May 4, 2024 · 3 comments · Fixed by #9019
Assignees

Comments

@alrz
Copy link
Member

alrz commented May 4, 2024

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.

@ReubenBond
Copy link
Member

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 ReubenBond self-assigned this May 6, 2024
@alrz
Copy link
Member Author

alrz commented May 6, 2024

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
Copy link
Member Author

alrz commented May 8, 2024

simply throwing an unreachable exception

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants