-
Notifications
You must be signed in to change notification settings - Fork 420
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
Add public init to client call unary stubs. #401
Conversation
If this is intended for testing purposes, what are your thoughts on using |
Agree with @rebello95, IIRC we kept these internal to avoid cluttering the interface while keeping them available through @testable. Thinking about this more, should we revert the recent similar PR that made a different initializer public for testing purposes? |
I'm generally not a huge fan of Do y'all have thoughts on just splitting out stub & testing code from the production sources? |
Are there any statements on this from other sources, or examples we could follow?
This should be solvable with headerdocs.
Is this what your other PR is about? |
Sorry, I have only now looked at the context of this particular change. I agree that this initializer should be public, which would also be consistent with our other |
To be honest, I'm struggling to find any sources from Apple that either support or disprove my statement. It seems there is very little official guidance. PR #402 is about splitting up the generated code, but I would like to apply the same principle to the runtime as well. I don't think the dead code eliminator is powerful enough to drop public and open members right now, so stubs would end up released binaries. If the stubs are split out from the runtime, then presumably there's no need to restrict the visibility as strictly. |
This is fine with me |
Sounds good to me, provided it doesn't make SwiftGRPC harder to use and test from a library user perspective. |
Currently initializing test stubs from a different module fails.