-
Notifications
You must be signed in to change notification settings - Fork 43
Use protocol's access control on the spy's declaration #72
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
Comments
@Matejkob Any chance to get this feature any time soon? |
@Matejkob This is an essential feature if you are using this in a library. |
@armintelker I'm aware of that, and I already have a ready implementation on a branch, just waiting to test it. I'll try to create a PR in a few days! |
Hi everyone! Thanks for your patience and for emphasizing how important this feature is. I’m happy to share that a new PR (#130) has been created to address this issue. The implementation ensures that generated spies inherit the protocol’s access control, solving the visibility issues described here. I’m planning to merge the PR in 2/3 days to allow time for community feedback. I’d love to hear your thoughts or suggestions on the new implementation—your input is always valuable! |
Thanks you time and effort! I will give it a try next week. |
Is your feature request related to a problem? Please describe.
If you use the macro on a public protocol declaration from module A and you have a unit test in another module that you'd like to use the protocol spy from module A, you don't have visibility to the Spy in module B since it's declared as internal.
Describe the solution you'd like
The generated spy should use the same access control as the attached protocol's.
Describe alternatives you've considered
You could import the module as testable
Additional context
The text was updated successfully, but these errors were encountered: