Changes to support import into google3 (#291)

* Fixes for google3.

* Added to failure list for new failure.

* Reused existing failure list file.

* Add a ./ to assist rewriting.
pull/13171/head
Joshua Haberman 5 years ago committed by GitHub
parent 363e39c171
commit 0dc2394da5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 20
      BUILD
  2. 3
      bazel/build_defs.bzl
  3. 2
      bazel/upb_proto_library.bzl
  4. 2
      bazel/workspace_deps.bzl
  5. 2
      tests/conformance_upb_failures.txt
  6. 1
      upb/json_decode.h

20
BUILD

@ -1,7 +1,3 @@
load(
"@rules_proto//proto:defs.bzl",
"proto_library",
)
load(
"//bazel:build_defs.bzl",
"generated_file_staleness_test",
@ -14,10 +10,17 @@ load(
"upb_proto_library",
"upb_proto_reflection_library",
)
# copybara:strip_for_google3_begin
load(
"@rules_proto//proto:defs.bzl",
"proto_library",
)
load(
"//:upb/bindings/lua/lua_proto_library.bzl",
"lua_proto_library",
)
# copybara:strip_end
licenses(["notice"]) # BSD (Google-authored w/ possible external contributions)
@ -627,11 +630,15 @@ cc_binary(
srcs = [
"tests/conformance_upb.c",
],
data = [
"tests/conformance_upb_failures.txt",
],
copts = select({
":windows": [],
"//conditions:default": COPTS,
}) + ["-Ibazel-out/k8-fastbuild/bin"],
deps = [
":port",
":conformance_proto_upb",
":conformance_proto_upbdefs",
":json",
@ -646,7 +653,10 @@ cc_binary(
make_shell_script(
name = "gen_test_conformance_upb",
out = "test_conformance_upb.sh",
contents = "external/com_google_protobuf/conformance_test_runner --enforce_recommended ./conformance_upb",
contents = "external/com_google_protobuf/conformance_test_runner " +
" --enforce_recommended " +
" --failure_list ./tests/conformance_upb_failures.txt" +
" ./conformance_upb",
)
sh_test(

@ -50,7 +50,8 @@ def _remove_suffix(str, suffix):
return str[:-len(suffix)]
def make_shell_script(name, contents, out):
contents = (runfiles_init + contents).replace("$", "$$")
contents = runfiles_init + contents # copybara:strip_for_google3
contents = contents.replace("$", "$$")
native.genrule(
name = "gen_" + name,
outs = [out],

@ -5,7 +5,7 @@
load("@bazel_skylib//lib:paths.bzl", "paths")
load("@bazel_tools//tools/cpp:toolchain_utils.bzl", "find_cpp_toolchain")
load("@rules_proto//proto:defs.bzl", "ProtoInfo")
load("@rules_proto//proto:defs.bzl", "ProtoInfo") # copybara:strip_for_google3
# Generic support code #########################################################

@ -16,7 +16,7 @@ def upb_deps():
git_repository,
name = "com_google_protobuf",
remote = "https://github.com/protocolbuffers/protobuf.git",
commit = "62832897c3cf14c93b91c412f7e64086cd272cb7", # Need to use Git until proto3 optional is released
commit = "5f5efe50c5bef20042645b51a697f58b0704ac89", # Need to use Git until proto3 optional is released
)
maybe(

@ -1 +1 @@
Required.ProtobufInput.PrematureEofInSubmessageValue.MESSAGE
Recommended.Proto2.JsonInput.FieldNameExtension.Validator

@ -3,7 +3,6 @@
#define UPB_JSONDECODE_H_
#include "upb/def.h"
#include "upb/msg.h"
#ifdef __cplusplus
extern "C" {

Loading…
Cancel
Save