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

No source generation when annotated interface is explicitly internal #64

Open
madp4ul opened this issue Jun 21, 2023 · 1 comment
Open

Comments

@madp4ul
Copy link

madp4ul commented Jun 21, 2023

Hi Stef,

i wanted to start a similar project today but aborted it since i found this and it perfectly fits the use case i had. It is really awesome, keep it up!

I found a small issue when trying it out:
The source generation only runs when the annotated interface is "public partial" or just "partial", but not when it is "internal partial". In any case it generates a public part for the interface which exposes the proxied class through a property, which means that it can also not generate proxies for internal classes. Then it tries to expose the internal class via the generated public property in the generated public interface which gives a compile error.

For the typical use case this should not be an issue, as proxies are mostly needed for classes from third party libraries, which are public anyway. And since we usually need the interface for mocking in unit tests, it also generally has to be public. Still i though i might let you know about it.

I do much appreciate this library and am thinking about suggesting to use it at work soon. I think stuff like this deserves some more attention, thank you very much for this!

@StefH
Copy link
Owner

StefH commented Jun 22, 2023

Hello @madp4ul,

If you have time, you can create a PR to support internal.

And if you have more ideas, just create an issue.

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

No branches or pull requests

2 participants