rules_swift
rules_swift copied to clipboard
[swift_proto_library] Generated types are always public
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.
This is because each swift_proto_library ends up being a module. If it was anything other than public how would it be used?