rules_swift icon indicating copy to clipboard operation
rules_swift copied to clipboard

[swift_proto_library] Generated types are always public

Open tylervick opened this issue 2 years ago • 1 comments

Currently the Visibility generation option is hardcoded to Public for all protobuf generation: https://github.com/bazelbuild/rules_swift/blob/7ea19709611d40776f05bf6d35b950e1d1a3a506/swift/internal/swift_protoc_gen_aspect.bzl#L185

Certain use cases require a non-public access level for generated objects. For example, when creating a library without exposing messages to the consumer.

tylervick avatar Jan 03 '23 23:01 tylervick

This is because each swift_proto_library ends up being a module. If it was anything other than public how would it be used?

thomasvl avatar Jan 04 '23 14:01 thomasvl