Skip to content

Commit

Permalink
Update workspace_deps.bzl protobuf main commit
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 479635174
  • Loading branch information
protobuf-github-bot authored and copybara-github committed Oct 7, 2022
1 parent 3faf958 commit 04363f7
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 12 deletions.
3 changes: 3 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ build --features=-debug_prefix_map_pwd_is_dot

build --extra_toolchains=@system_python//:python_toolchain

# Pin to C++14
build --cxxopt=-std=c++14 --host_cxxopt=-std=c++14

# Use our custom-configured c++ toolchain.

build:m32 --copt=-m32 --linkopt=-m32
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/python_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ jobs:
python -m venv env
source env/bin/activate
echo "VIRTUAL ENV:" $VIRTUAL_ENV
- name: Install numpy
run: pip install numpy
- name: Install Protobuf Wheels
run: pip install -vvv --no-index --find-links wheels protobuf protobuftests
- name: Run the unit tests
Expand Down
10 changes: 5 additions & 5 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -610,13 +610,13 @@ upb_proto_reflection_library(
upb_proto_library(
name = "test_messages_proto2_proto_upb",
testonly = 1,
deps = ["@com_google_protobuf//:test_messages_proto2_proto"],
deps = ["@com_google_protobuf//src/google/protobuf:test_messages_proto2_proto"],
)

upb_proto_library(
name = "test_messages_proto3_proto_upb",
testonly = 1,
deps = ["@com_google_protobuf//:test_messages_proto3_proto"],
deps = ["@com_google_protobuf//src/google/protobuf:test_messages_proto3_proto"],
)

proto_library(
Expand Down Expand Up @@ -685,7 +685,7 @@ proto_library(
name = "msg_test_proto",
testonly = 1,
srcs = ["upb/msg_test.proto"],
deps = ["@com_google_protobuf//:test_messages_proto3_proto"],
deps = ["@com_google_protobuf//src/google/protobuf:test_messages_proto3_proto"],
)

upb_proto_library(
Expand Down Expand Up @@ -817,13 +817,13 @@ upb_proto_reflection_library(
upb_proto_reflection_library(
name = "test_messages_proto2_upbdefs",
testonly = 1,
deps = ["@com_google_protobuf//:test_messages_proto2_proto"],
deps = ["@com_google_protobuf//src/google/protobuf:test_messages_proto2_proto"],
)

upb_proto_reflection_library(
name = "test_messages_proto3_upbdefs",
testonly = 1,
deps = ["@com_google_protobuf//:test_messages_proto3_proto"],
deps = ["@com_google_protobuf//src/google/protobuf:test_messages_proto3_proto"],
)

cc_binary(
Expand Down
7 changes: 7 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,10 @@ rules_fuzzing_dependencies()
load("@rules_fuzzing//fuzzing:init.bzl", "rules_fuzzing_init")

rules_fuzzing_init()

load("@rules_python//python:pip.bzl", "pip_install")

pip_install(
name="pip_deps",
requirements = "@com_google_protobuf//python:requirements.txt"
)
2 changes: 1 addition & 1 deletion bazel/workspace_deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def upb_deps():
_github_archive,
name = "com_google_protobuf",
repo = "https://github.com/protocolbuffers/protobuf",
commit = "5407aa62af5f8d71c344ef10877806232a137991",
commit = "d938afd6e35676f6b8c8012d9eacd1dc0bb693b4",
patches = ["@upb//bazel:protobuf.patch"],
)

Expand Down
4 changes: 2 additions & 2 deletions benchmarks/benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ static void BM_LoadAdsDescriptor_Proto2(benchmark::State& state) {
protobuf::Arena arena;
protobuf::DescriptorPool pool;
for (auto file : serialized_files) {
protobuf::StringPiece input(file.data, file.size);
absl::string_view input(file.data, file.size);
auto proto =
protobuf::Arena::CreateMessage<protobuf::FileDescriptorProto>(&arena);
bool ok = proto->ParseFrom<protobuf::MessageLite::kMergePartial>(input) &&
Expand Down Expand Up @@ -284,7 +284,7 @@ void BM_Parse_Proto2(benchmark::State& state) {
for (auto _ : state) {
Proto2Factory<AMode, P> proto_factory;
auto proto = proto_factory.GetProto();
protobuf::StringPiece input(descriptor.data, descriptor.size);
absl::string_view input(descriptor.data, descriptor.size);
bool ok = proto->template ParseFrom<kParseFlags>(input);
if (!ok) {
printf("Failed to parse.\n");
Expand Down
3 changes: 3 additions & 0 deletions cmake/make_cmakelists.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,9 @@ def upb_deps(self):
def protobuf_deps(self):
pass

def pip_install(self, **kwargs):
pass

def rules_fuzzing_dependencies(self):
pass

Expand Down
4 changes: 2 additions & 2 deletions upb/bindings/lua/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,11 @@ lua_proto_library(
lua_proto_library(
name = "test_messages_proto3_proto_lua",
testonly = 1,
deps = ["@com_google_protobuf//:test_messages_proto3_proto"],
deps = ["@com_google_protobuf//src/google/protobuf:test_messages_proto3_proto"],
)

lua_proto_library(
name = "test_messages_proto2_proto_lua",
testonly = 1,
deps = ["@com_google_protobuf//:test_messages_proto2_proto"],
deps = ["@com_google_protobuf//src/google/protobuf:test_messages_proto2_proto"],
)
4 changes: 2 additions & 2 deletions upb/port_def.inc
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@
*/

#if !((defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \
(defined(__cplusplus) && __cplusplus >= 201103L) || \
(defined(__cplusplus) && __cplusplus >= 201402L) || \
(defined(_MSC_VER) && _MSC_VER >= 1900))
#error upb requires C99 or C++11 or MSVC >= 2015.
#error upb requires C99 or C++14 or MSVC >= 2015.
#endif

// Portable check for GCC minimum version:
Expand Down

0 comments on commit 04363f7

Please sign in to comment.