Update to the latest protobuf.

PiperOrigin-RevId: 447642349
pull/13171/head
Joshua Haberman 3 years ago committed by Copybara-Service
parent 79afb79f93
commit 32f45b5f33
  1. 12
      BUILD
  2. 5
      bazel/protobuf.patch
  3. 2
      bazel/workspace_deps.bzl
  4. 8
      python/dist/BUILD.bazel
  5. 2
      upb/bindings/lua/BUILD.bazel
  6. 8
      upb/conformance_upb.c
  7. 4
      upb/mini_table_accessors_test.cc
  8. 2
      upb/msg_test.cc
  9. 2
      upb/msg_test.proto
  10. 4
      upb/test_generated_code.cc

12
BUILD

@ -494,13 +494,13 @@ cc_test(
upb_proto_library(
name = "conformance_proto_upb",
testonly = 1,
deps = ["@com_google_protobuf//:conformance_proto"],
deps = ["@com_google_protobuf//conformance:conformance_proto"],
)
upb_proto_reflection_library(
name = "conformance_proto_upbdefs",
testonly = 1,
deps = ["@com_google_protobuf//:conformance_proto"],
deps = ["@com_google_protobuf//conformance:conformance_proto"],
)
upb_proto_reflection_library(
@ -537,7 +537,7 @@ cc_binary(
make_shell_script(
name = "gen_test_conformance_upb",
out = "test_conformance_upb.sh",
contents = "external/com_google_protobuf/conformance_test_runner " +
contents = "external/com_google_protobuf/conformance/conformance_test_runner " +
" --enforce_recommended " +
" --failure_list ./upb/conformance_upb_failures.txt" +
" ./conformance_upb",
@ -549,7 +549,7 @@ sh_test(
data = [
"upb/conformance_upb_failures.txt",
":conformance_upb",
"@com_google_protobuf//:conformance_test_runner",
"@com_google_protobuf//conformance:conformance_test_runner",
],
deps = ["@bazel_tools//tools/bash/runfiles"],
)
@ -578,7 +578,7 @@ cc_binary(
make_shell_script(
name = "gen_test_conformance_upb_dynamic_minitable",
out = "test_conformance_upb_dynamic_minitable.sh",
contents = "external/com_google_protobuf/conformance_test_runner " +
contents = "external/com_google_protobuf/conformance/conformance_test_runner " +
" --enforce_recommended " +
" --failure_list ./upb/conformance_upb_failures.txt" +
" ./conformance_upb_dynamic_minitable",
@ -590,7 +590,7 @@ sh_test(
data = [
"upb/conformance_upb_failures.txt",
":conformance_upb_dynamic_minitable",
"@com_google_protobuf//:conformance_test_runner",
"@com_google_protobuf//conformance:conformance_test_runner",
],
deps = ["@bazel_tools//tools/bash/runfiles"],
)

@ -1,5 +1,5 @@
--- BUILD
+++ BUILD
--- BUILD.bazel
+++ BUILD.bazel
@@ -896,6 +896,10 @@ py_library(
[
"python/google/protobuf/**/*.py",
@ -52,4 +52,3 @@
# Search internally.
path = '.'

@ -24,7 +24,7 @@ def upb_deps():
_github_archive,
name = "com_google_protobuf",
repo = "https://github.com/protocolbuffers/protobuf",
commit = "ec79d0d328c7e6cea15cc27fbeb9b018ca289590",
commit = "b180b2809f7e77fdf7dd075d26a7421085bac58f",
patches = ["//bazel:protobuf.patch"],
)

@ -26,7 +26,7 @@
load("//bazel:py_proto_library.bzl", "py_proto_library")
load(":dist.bzl", "py_dist", "py_dist_module")
load("@bazel_skylib//lib:selects.bzl", "selects")
load("@com_google_protobuf//:protobuf_version.bzl", "PROTOBUF_VERSION")
load("@com_google_protobuf//:protobuf_version.bzl", "PROTOBUF_PYTHON_VERSION")
load("@rules_python//python:packaging.bzl", "py_wheel")
load("@system_python//:version.bzl", "SYSTEM_PYTHON_VERSION")
@ -119,7 +119,7 @@ py_wheel(
"python/dist/",
"python/",
],
version = PROTOBUF_VERSION,
version = PROTOBUF_PYTHON_VERSION,
deps = [
":message_mod",
":well_known_proto_py_pb2",
@ -136,7 +136,7 @@ py_wheel(
strip_path_prefixes = [
"python/",
],
version = PROTOBUF_VERSION,
version = PROTOBUF_PYTHON_VERSION,
deps = [
":well_known_proto_py_pb2",
"@com_google_protobuf//:python_srcs",
@ -150,7 +150,7 @@ py_wheel(
platform = "any",
python_tag = "py3",
strip_path_prefixes = ["python/"],
version = PROTOBUF_VERSION,
version = PROTOBUF_PYTHON_VERSION,
deps = [
"//python/pb_unit_tests:test_files",
"@com_google_protobuf//:python_common_test_protos",

@ -83,8 +83,8 @@ cc_test(
"//:third_party/lunit/console.lua",
"//:third_party/lunit/lunit.lua",
"//upb/bindings/lua:upb.lua",
"@com_google_protobuf//:conformance_proto",
"@com_google_protobuf//:descriptor_proto",
"@com_google_protobuf//conformance:conformance_proto",
],
linkstatic = 1,
deps = [

@ -37,8 +37,8 @@
#include "conformance/conformance.upb.h"
#include "conformance/conformance.upbdefs.h"
#include "src/google/protobuf/test_messages_proto2.upbdefs.h"
#include "src/google/protobuf/test_messages_proto3.upbdefs.h"
#include "google/protobuf/test_messages_proto2.upbdefs.h"
#include "google/protobuf/test_messages_proto3.upbdefs.h"
#include "upb/decode.h"
#include "upb/encode.h"
#include "upb/json_decode.h"
@ -325,9 +325,9 @@ int main(void) {
#ifdef REBUILD_MINITABLES
_upb_DefPool_LoadDefInitEx(
symtab, &src_google_protobuf_test_messages_proto2_proto_upbdefinit, true);
symtab, &google_protobuf_test_messages_proto2_proto_upbdefinit, true);
_upb_DefPool_LoadDefInitEx(
symtab, &src_google_protobuf_test_messages_proto3_proto_upbdefinit, true);
symtab, &google_protobuf_test_messages_proto3_proto_upbdefinit, true);
#else
protobuf_test_messages_proto2_TestAllTypesProto2_getmsgdef(symtab);
protobuf_test_messages_proto3_TestAllTypesProto3_getmsgdef(symtab);

@ -34,8 +34,8 @@
#include "upb/mini_table_accessors.h"
#include "gtest/gtest.h"
#include "src/google/protobuf/test_messages_proto2.upb.h"
#include "src/google/protobuf/test_messages_proto3.upb.h"
#include "google/protobuf/test_messages_proto2.upb.h"
#include "google/protobuf/test_messages_proto3.upb.h"
#include "upb/collections.h"
#include "upb/mini_table.h"
#include "upb/test.upb.h"

@ -27,7 +27,7 @@
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "src/google/protobuf/test_messages_proto3.upb.h"
#include "google/protobuf/test_messages_proto3.upb.h"
#include "upb/def.hpp"
#include "upb/json_decode.h"
#include "upb/json_encode.h"

@ -31,7 +31,7 @@ syntax = "proto2";
package upb_test;
import "src/google/protobuf/test_messages_proto3.proto";
import "google/protobuf/test_messages_proto3.proto";
message TestExtensions {
extensions 1000 to max;

@ -31,8 +31,8 @@
*/
#include "gtest/gtest.h"
#include "src/google/protobuf/test_messages_proto2.upb.h"
#include "src/google/protobuf/test_messages_proto3.upb.h"
#include "google/protobuf/test_messages_proto2.upb.h"
#include "google/protobuf/test_messages_proto3.upb.h"
#include "upb/test.upb.h"
#include "upb/upb.hpp"

Loading…
Cancel
Save