rules_swift icon indicating copy to clipboard operation
rules_swift copied to clipboard

Add generate_internal_visibility_from_proto_files feature

Open tylervick opened this issue 2 years ago • 1 comments

Fixes #961

Change Create a new feature swift.generate_internal_visibility_from_proto_files which will set protoc's swift_opt Visibility from Public to Internal.

Test

  • Create a valid rule for swift_grpc_library or swift_proto_library
    • Verify the generated sources still have the "public" access modifier
  • Add the swift.generate_internal_visibility_from_proto_files to the features attribute for the above rule
    • Verify the generated sources now omit access modifiers (implicitly internal)

Note The ideal solution would be to make the Public setting opt-in for this feature, thereby mirroring default protoc Swift plugin behavior. Since rules_swift has always defaulted to public visibility this should instead remain the default.

tylervick avatar Jan 04 '23 01:01 tylervick

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

google-cla[bot] avatar Jan 04 '23 01:01 google-cla[bot]