upb icon indicating copy to clipboard operation
upb copied to clipboard

Use proto_common module in lua_proto_library

Open comius opened this issue 3 years ago • 6 comments

This handles all the paths correctly and reduces the code size. It should work correctly also internally.

Fixes: https://github.com/protocolbuffers/upb/issues/784

comius avatar Sep 16 '22 11:09 comius

Thanks for the change but we cannot do this yet. We need to support the two most recent Bazel LTS versions per our policy:

https://opensource.google/documentation/policies/cplusplus-support#3_build_systems

Until proto_common is supported in the latest two LTS releases, we cannot use it.

Is there a way to make this conditional on the availability of proto_common?

haberman avatar Sep 16 '22 15:09 haberman

I'm reluctant to fix workarounds in upb, that are broken with fixes in proto_library for LTS release: https://github.com/protocolbuffers/upb/issues/784

It doesn't sound like a good use of my time.

@meteorcloudy, can we disable upb in downstream test and reenable it after LTS is released?

comius avatar Sep 16 '22 16:09 comius

I repeat my previous question:

Is there a way to make this PR conditional on the availability of proto_common?

If we could use the new code-paths when a newer Bazel is available, we would not need to disable upb.

haberman avatar Sep 16 '22 16:09 haberman

For example, if we could test the Bazel version from Starlark, we could achieve both goals (support old Bazel versions and have less buggy behavior with newer Bazels).

haberman avatar Sep 16 '22 16:09 haberman

Please hold this PR until after LTS.

comius avatar Sep 16 '22 16:09 comius

I don't think one LTS will be enough. We need to support the two most recent LTS releases. So we will need to wait until proto_common is in the last two LTS releases.

haberman avatar Sep 16 '22 17:09 haberman

@comius We now require Bazel 6 or higher, so we can start relying on proto_common. However, we just moved upb into the protobuf repo and I also can't merge this PR as it is due to the conflicts. If you can fix the conflicts and send us a PR for upb's new location then we would be happy to accept this, though.

acozzette avatar Sep 07 '23 21:09 acozzette

@acozzette Interesting to see upb is now a part of the protobuf repo. Do you think we should still keep the upb module in the BCR for future versions?

meteorcloudy avatar Sep 08 '23 09:09 meteorcloudy

@meteorcloudy Good question, I have not thought about this very much yet. For now, protobuf and upb are still in separate Bazel repos although they're in the same Git repo. Soon we will be merging the Bazel repos as well, though. So I guess we may want to keep the upb module in BCR for backward compatibility, but soon everyone should update their dependencies to just depend on protobuf instead.

acozzette avatar Sep 08 '23 21:09 acozzette