protobuf icon indicating copy to clipboard operation
protobuf copied to clipboard

Open up visibility for some compiler internals

Open mkruskal-google opened this issue 3 years ago • 2 comments

https://github.com/protocolbuffers/protobuf/pull/9985 made all of our language-specific compiler code visibility-restricted in Bazel builds. While most of this code was intended to be internal, we never explicitly specified it. Specifically, gRPC (and likely other code generators) needs visibility into language-specific naming helpers.

This PR takes a middle-ground approach for our 22.x breaking release, only exposing what we think is reasonable for downstream codegen to reuse. Other alternatives open for discussion are:

  1. Make all of the compiler internals public again. This wouldn't break anyone, but is intentionally exposing a lot of code we intended to make private
  2. Keep all of the compiler internals private and have downstream teams branch any functionality they need. This would block gRPC's upgrade to our main branch, and require additional work from their end

mkruskal-google avatar Sep 16 '22 21:09 mkruskal-google

This LGTM. We should get signoff from @jskeet and @thomasvl too since we're publicly exposing symbols in the C#/Obj-C generators. They may want to take a look in case there are any parts of those APIs they would want to clean up before making them officially public.

haberman avatar Sep 19 '22 17:09 haberman

Good point, I'll add them thanks Josh!

mkruskal-google avatar Sep 19 '22 18:09 mkruskal-google