-
Notifications
You must be signed in to change notification settings - Fork 460
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 an option to use @_implementationOnly import SwiftProtobuf
#1157
Comments
For context: we make a library, an XCFramework used by our client's apps. Without |
If a proto file imports another one, it is likely because of the types (message/enums) are used as fields. So it wouldn't really be implementation only as the types are exposed by the types in the generate file. I'm guessing you want the protos to be an implementation details of your types and you don't expose them? i.e. - they should be implementation imports of your code? If that's what you are after, what's the error? Sounds like maybe this should be an issue agains Swift for the transitive imports of |
We're not talking about protos importing other proto files. We're talking about importing the core We're writing a framework that deals with protobufs. We call We don't want to expose any type coming from |
Following this discussion, |
Ah, ok, I'm following now. I was mistakenly thinking you wanted all imports as impl only and that's what confused me. |
|
Makes sense to me not to make it default. But do you think it could be a good idea to make it a code generation option? |
It would be nice if there was an option for this... Ended up having a script do this after generating the .swift files. |
Hey! |
At this time there is not. |
The standard Unix |
Fixed by #1393 |
Currently the generated
xxx.pb.swift
always useimport SwiftProtobuf
, but sometimes we want to use@_implementationOnly import SwiftProtobuf
, it would be nice to have an option to do so.The text was updated successfully, but these errors were encountered: