Commit Graph

19 Commits (main)

Author SHA1 Message Date
Sandy Zhang f68350225f Move system_python.bzl to the correct open source folder
PiperOrigin-RevId: 632265705
2024-05-09 14:18:46 -07:00
Protobuf Team Bot 7a7efe9e64 Add bzl_libraries to protobuf
PiperOrigin-RevId: 623784182
2024-04-11 04:35:42 -07:00
Protobuf Team Bot 8257c4469d Copy py_proto_library from rules_python to protobuf
https://github.com/bazelbuild/rules_python/blob/main/python/private/proto/py_proto_library.bzl

Contributors:
d96214f tpudlik@google.com      Wed Nov 15 02:48:06 2023 -0800  fix: py_proto_library: transitive strip_import_prefix (#1558)
85e50d2 tpudlik@gmail.com       Tue Nov 14 06:04:59 2023 -0800  fix: py_proto_library: append to PYTHONPATH less (#1553)
bee35ef zplin@uber.com  Wed Oct 11 20:59:34 2023 -0700  fix: allowing to import code generated from proto with strip_import_prefix (#1406)
1a333ce ilist@google.com        Tue Jun 20 19:36:39 2023 +0200  fix: plugin_output in py_proto_library rule (#1280)
6905e63 ignas.anikevicius@woven-planet.global   Sat Feb 11 14:02:33 2023 +0900  fix: make py_proto_library respect PyInfo imports (#1046)
0d3c4f7 ilist@google.com        Wed Jan 18 23:15:52 2023 +0000  Implement py_proto_library (#832)
PiperOrigin-RevId: 623401031
2024-04-10 00:35:29 -07:00
Protobuf Team Bot 21d75f861c Remove references to rules_proto
They are not needed after the rules are move into protobuf repo.
Except for the reference to toolchain type, which is currently in rules_proto and can be moved after the implementation is moved into protobuf repo.

PiperOrigin-RevId: 622176865
2024-04-05 07:50:25 -07:00
Protobuf Team Bot 9da1b86c30 Add redirects for C++ and Java proto rules
Redirected rules: java_proto_library, java_lite_proto_library, cc_proto_library

PiperOrigin-RevId: 622118691
2024-04-05 02:54:27 -07:00
Protobuf Team Bot d4d34abd7d Add redirects for proto rules
Redirected rules: proto_library, proto_toolchain, proto_lang_toolchain
Modules and providers: proto_common, ProtoInfo, ProtoLangToolchainInfo

The structure follows proposal: https://docs.google.com/document/d/1L1JFgjpZ7SrBinb24DC_5nTIELeYDacikcme-YcA7xs/edit?usp=drive_open&ouid=102306600948089647787

PiperOrigin-RevId: 622117921
2024-04-05 02:44:32 -07:00
Protobuf Team Bot d7f032ad15 Move private definitions out of //bazel
This is needed to make protobuf/bazel package minimal for other proto rules.

Keep 4 public bzl files in upb/bazel. They end up under protobuf/bazel, and they are legitimately used by other repositories.

Move upb_proto_library_internal/* under bazel/private. Those are utilities used in the rules. Moving them one level deeper makes protobuf/bazel package clean for other rules.

Move build_defs.bzl and amalgamation under /upb/bazel. Those are utilities used in the build.

Move lua.BUILD and python* uner /python/dist. Those are used in the WORKSPACE dependency setup.

PiperOrigin-RevId: 621442236
2024-04-03 01:37:51 -07:00
Protobuf Team Bot 83ec410d30 Internal change
PiperOrigin-RevId: 619377672
2024-03-27 05:50:55 -07:00
Tiago Quelhas 774627235e Automated Code Change
PiperOrigin-RevId: 617586334
2024-03-20 12:09:39 -07:00
Mike Kruskal bca8fb6117 Implement edition 2023 support in all Ruby runtimes.
Three of these runtimes are based on upb, and the fourth is based on the Java runtime.  Both of these already have editions support, so this was mostly just a matter of:
- Advertising support to allow editions codegen
- Stripping features from the runtime options
- Hooking up conformance tests
- Adding some lightweight editions tests

There are also a few minor orthogonal fixes included here:
- Ruby's upb hack for treating all enums as open enums needed tweaking
- The `enable_editions` flag is no longer needed in our internal proto rules

PiperOrigin-RevId: 616256211
2024-03-15 15:17:33 -07:00
Protobuf Team Bot 2dd2dfaca3 Rename use_cpp_toolchain in protos/bazel/cc_proto_library.bzl, for consistency.
This now matches the upb_use_cpp_toolchain function name in the equivalent function in third_party/upb/bazel/upb_proto_library_internal/cc_library_func.bzl.

PiperOrigin-RevId: 606257428
2024-02-12 08:21:11 -08:00
Adam Cozzette 4ec9170bcd Fix layering check for usage of gtest
To satisfy the layering check, we need to depend on :gtest for the headers, in
addition to :gtest_main which provides the main() function.

There are a bunch of formatting changes as a side effect of this, but they
should be harmless.

PiperOrigin-RevId: 594318263
2023-12-28 14:41:48 -08:00
Protobuf Team Bot 79009d9237 Internal change
PiperOrigin-RevId: 588275922
2023-12-05 20:51:44 -08:00
Richard Levasseur 06776d20a5 Add `load()` statements for builtin Python rules/providers
PiperOrigin-RevId: 584089414
2023-11-20 11:54:29 -08:00
xiaolou86 48ebb9b0bb Fix typos (#14409)
Closes #14409

COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/14409 from xiaolou86:main 52126750f0
PiperOrigin-RevId: 574190850
2023-10-17 10:22:51 -07:00
Adam Cozzette 12c7bb0750 Rename `upbc` to `upb_generator`
This makes the file layout a bit more consistent with the `protos ->
protos_generator` pattern. I also replaced the `upbc` namespace with
`upb::generator`.

PiperOrigin-RevId: 569264372
2023-09-28 12:56:03 -07:00
Adam Cozzette 0d995193e5 Remove `upb_deps()` helper function
This separate helper for upb dependencies no longer makes sense now that upb
has been merged into the protobuf repo. This change deletes that helper and
moves the upb-specific dependencies into the `protobuf_deps()` function.

I noticed that the Python package deps need to be updated to reflect our
current support level, but I will fix that in a followup CL.

PiperOrigin-RevId: 568997625
2023-09-27 16:48:24 -07:00
Joshua Haberman 2c7193b810 Migrated upb rules to use proto_common.
PiperOrigin-RevId: 568943311
2023-09-27 13:29:15 -07:00
Adam Cozzette 501ececd39 Reorganize upb file structure
This change moves almost everything in the `upb/` directory up one level, so
that for example `upb/upb/generated_code_support.h` becomes just
`upb/generated_code_support.h`. The only exceptions I made to this were that I
left `upb/cmake` and `upb/BUILD` where they are, mostly because that avoids
conflict with other files and the current locations seem reasonable for now.

The `python/` directory is a little bit of a challenge because we had to merge
the existing directory there with `upb/python/`. I made `upb/python/BUILD` into
the BUILD file for the merged directory, and it effectively loads the contents
of the other BUILD file via `python/build_targets.bzl`, but I plan to clean
this up soon.

PiperOrigin-RevId: 568651768
2023-09-26 14:38:35 -07:00