Merge the protobuf and upb Bazel repos
A couple weeks ago we moved upb into the protobuf Git repo, and this change
continues the merger of the two repos by making them into a single Bazel repo.
This was mostly a matter of deleting upb's WORKSPACE file and fixing up a bunch
of references to reflect the new structure.
Most of the changes are pretty mechanical, but one thing that needed more
invasive changes was the Python script for generating CMakeLists.txt,
make_cmakelists.py. The WORKSPACE file it relied on no longer exists with this
change, so I updated it to hardcode the information it needed from that file.
PiperOrigin-RevId: 564810016
diff --git a/.bazelignore b/.bazelignore
index 35656cd..dc5c301 100644
--- a/.bazelignore
+++ b/.bazelignore
@@ -1,6 +1,4 @@
# These are fetched as external repositories.
third_party/abseil-cpp
third_party/googletest
-# upb is its own Bazel repository for now.
-upb/
_build/
diff --git a/.github/workflows/test_python.yml b/.github/workflows/test_python.yml
index 61d336b..8b00ada 100644
--- a/.github/workflows/test_python.yml
+++ b/.github/workflows/test_python.yml
@@ -20,7 +20,7 @@
version: [ "3.7", "3.8", "3.9", "3.10" ]
include:
- type: Pure
- targets: //python/... @upb//python/... //python:python_version
+ targets: //python/... //upb/python/... //python:python_version
flags: --define=use_fast_cpp_protos=false
- type: C++
targets: //python/... //python:python_version
@@ -57,7 +57,7 @@
version: [ "3.10" ]
include:
- type: Pure
- targets: //python/... @upb//python/... //python:python_version
+ targets: //python/... //upb/python/... //python:python_version
- type: C++
targets: //python/... //python:python_version
flags: --define=use_fast_cpp_protos=true
diff --git a/.github/workflows/test_upb.yml b/.github/workflows/test_upb.yml
index b2a152b..4c82671 100644
--- a/.github/workflows/test_upb.yml
+++ b/.github/workflows/test_upb.yml
@@ -19,10 +19,10 @@
config:
- { name: "Fastbuild" }
- { name: "Optimized", flags: "-c opt" }
- - { name: "FastTable", flags: "--@upb//:fasttable_enabled=true" }
- - { name: "ASAN", flags: "--config=asan -c dbg", exclude-targets: "-@upb//benchmarks:benchmark -@upb//python/..." }
- - { name: "UBSAN", flags: "--config=ubsan -c dbg", exclude-targets: "-@upb//benchmarks:benchmark -@upb//python/... -@upb//lua/..." }
- - { name: "32-bit", flags: "--copt=-m32 --linkopt=-m32", exclude-targets: "-@upb//benchmarks:benchmark -@upb//python/..." }
+ - { name: "FastTable", flags: "--//upb:fasttable_enabled=true" }
+ - { name: "ASAN", flags: "--config=asan -c dbg", exclude-targets: "-//upb/benchmarks:benchmark -//upb/python/..." }
+ - { name: "UBSAN", flags: "--config=ubsan -c dbg", exclude-targets: "-//upb/benchmarks:benchmark -//upb/python/... -//upb/lua/..." }
+ - { name: "32-bit", flags: "--copt=-m32 --linkopt=-m32", exclude-targets: "-//upb/benchmarks:benchmark -//upb/python/..." }
# TODO: b/297027295 - Add 32-bit ASAN test
name: ${{ matrix.config.name }}
@@ -39,7 +39,7 @@
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/sanitize@sha256:04cd765285bc52cbbf51d66c8c66d8603579cf0f19cc42df26b09d2c270541fb
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
bazel-cache: upb-bazel
- bazel: test --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 @upb//... ${{ matrix.config.flags }}
+ bazel: test --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 //upb/... ${{ matrix.config.flags }}
exclude-targets: ${{ matrix.config.exclude-targets }}
linux-gcc:
@@ -58,12 +58,7 @@
image: "us-docker.pkg.dev/protobuf-build/containers/test/linux/gcc:12.2-6.3.0-518b4fcd8d0ded2484c94f02e835526cacfdac2d"
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
bazel-cache: "upb-bazel-gcc"
- # The other test runs use the protobuf workspace. For this one let's
- # cd into upb and use its workspace instead, to make sure we cover
- # that use case.
- bash: >-
- cd upb &&
- bazel test $BAZEL_FLAGS --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 -c opt //...
+ bazel: test --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 -c opt //upb/...
windows:
strategy:
@@ -80,7 +75,7 @@
with:
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
bazel-cache: "upb-bazel-windows"
- bazel: test --cxxopt=/std:c++17 --host_cxxopt=/std:c++17 @upb//upb/... @upb//upbc/... @upb//python/... @upb//protos/... @upb//protos_generator/...
+ bazel: test --cxxopt=/std:c++17 --host_cxxopt=/std:c++17 //upb/upb/... //upb/upbc/... //upb/python/... //upb/protos/... //upb/protos_generator/...
macos:
strategy:
@@ -101,7 +96,7 @@
with:
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
bazel-cache: "upb-bazel-macos"
- bazel: ${{ matrix.config.bazel-command }} --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 ${{ matrix.config.flags }} @upb//...
+ bazel: ${{ matrix.config.bazel-command }} --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 ${{ matrix.config.flags }} //upb/...
no-python:
strategy:
@@ -123,4 +118,4 @@
which python3 &&
mv `which python3` /tmp &&
! which python3 &&
- bazel test $BAZEL_FLAGS --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 @upb//python/... -- -@upb//python/dist:source_wheel
+ bazel test $BAZEL_FLAGS --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 //upb/python/... -- -//upb/python/dist:source_wheel
diff --git a/BUILD.bazel b/BUILD.bazel
index a5fa012..88a1999 100644
--- a/BUILD.bazel
+++ b/BUILD.bazel
@@ -294,13 +294,13 @@
alias(
name = "python_srcs",
actual = "//python:python_srcs",
- visibility = ["@upb//:__subpackages__"],
+ visibility = ["//upb:__subpackages__"],
)
alias(
name = "python_test_srcs",
actual = "//python:python_test_srcs",
- visibility = ["@upb//:__subpackages__"],
+ visibility = ["//upb:__subpackages__"],
)
alias(
diff --git a/WORKSPACE b/WORKSPACE
index 73aada1..95a31a0 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -7,15 +7,6 @@
path = "examples",
)
-# We will soon merge upb and protobuf into the same Bazel repository, but for
-# now we depend on the separate Bazel repo in the upb/ directory. This is
-# important to ensure that the CI tests exercise upb at head instead of relying
-# on a stale version from protobuf_deps.bzl.
-local_repository(
- name = "upb",
- path = "upb",
-)
-
# Load common dependencies first to ensure we use the correct version
load("//:protobuf_deps.bzl", "PROTOBUF_MAVEN_ARTIFACTS", "protobuf_deps")
@@ -116,13 +107,13 @@
gemfile = "//ruby:Gemfile",
)
-load("@upb//bazel:workspace_deps.bzl", "upb_deps")
+load("//upb/bazel:workspace_deps.bzl", "upb_deps")
upb_deps()
http_archive(
name = "lua",
- build_file = "@upb//bazel:lua.BUILD",
+ build_file = "//upb/bazel:lua.BUILD",
sha256 = "b9e2e4aad6789b3b63a056d442f7b39f0ecfca3ae0f1fc0ae4e9614401b69f4b",
strip_prefix = "lua-5.2.4",
urls = [
@@ -143,11 +134,11 @@
urls = ["https://github.com/googleapis/googleapis/archive/30ed2662a85403cbdeb9ea38df1e414a2a276b83.zip"],
strip_prefix = "googleapis-30ed2662a85403cbdeb9ea38df1e414a2a276b83",
sha256 = "4dfc28101127d22abd6f0f6308d915d490c4594c0cfcf7643769c446d6763a46",
- build_file = "@upb//benchmarks:BUILD.googleapis",
+ build_file = "//upb/benchmarks:BUILD.googleapis",
patch_cmds = ["find google -type f -name BUILD.bazel -delete"],
)
-load("@upb//bazel:system_python.bzl", "system_python")
+load("//upb/bazel:system_python.bzl", "system_python")
system_python(
name = "system_python",
@@ -158,9 +149,9 @@
pip_parse(
name = "pip_deps",
- requirements = "@upb//python:requirements.txt",
+ requirements = "//upb/python:requirements.txt",
requirements_overrides = {
- "3.11": "@upb//python:requirements_311.txt",
+ "3.11": "//upb/python:requirements_311.txt",
},
)
diff --git a/objectivec/BUILD.bazel b/objectivec/BUILD.bazel
index c59bf0e..70727cc 100644
--- a/objectivec/BUILD.bazel
+++ b/objectivec/BUILD.bazel
@@ -1,6 +1,6 @@
load("@rules_cc//cc:defs.bzl", "objc_library")
load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix")
-load("@upb//cmake:build_defs.bzl", "staleness_test")
+load("//upb/cmake:build_defs.bzl", "staleness_test")
load("//conformance:defs.bzl", "conformance_test")
load(":defs.bzl", "objc_proto_camel_case_name")
diff --git a/php/BUILD.bazel b/php/BUILD.bazel
index dc40603..966b3e2 100644
--- a/php/BUILD.bazel
+++ b/php/BUILD.bazel
@@ -4,7 +4,7 @@
load("@rules_pkg//:mappings.bzl", "pkg_files", "pkg_filegroup", "strip_prefix")
load("@rules_pkg//:pkg.bzl", "pkg_tar")
-load("@upb//cmake:build_defs.bzl", "staleness_test")
+load("//upb/cmake:build_defs.bzl", "staleness_test")
load("//build_defs:internal_shell.bzl", "inline_sh_binary")
load("//conformance:defs.bzl", "conformance_test")
load("//:protobuf_version.bzl", "PROTOBUF_PHP_VERSION", "PROTOC_VERSION")
@@ -85,14 +85,14 @@
genrule(
name = "copy_php_amalgamation_h",
- srcs = ["@upb//:php-upb.h"],
+ srcs = ["//upb:php-upb.h"],
outs = ["generated-in/ext/google/protobuf/php-upb.h"],
cmd = "cp $< $@",
)
genrule(
name = "copy_php_amalgamation_c",
- srcs = ["@upb//:php-upb.c"],
+ srcs = ["//upb:php-upb.c"],
outs = ["generated-in/ext/google/protobuf/php-upb.c"],
cmd = "cp $< $@",
)
diff --git a/python/BUILD.bazel b/python/BUILD.bazel
index 192c08a..45fedf1 100644
--- a/python/BUILD.bazel
+++ b/python/BUILD.bazel
@@ -46,7 +46,7 @@
srcs_version = "PY2AND3",
visibility = [
"//:__pkg__",
- "@upb//:__subpackages__",
+ "//upb:__subpackages__",
],
)
@@ -152,7 +152,7 @@
srcs_version = "PY2AND3",
visibility = [
"//:__pkg__",
- "@upb//:__subpackages__",
+ "//upb:__subpackages__",
],
)
@@ -170,7 +170,7 @@
srcs_version = "PY3",
visibility = [
"//:__pkg__",
- "@upb//:__subpackages__",
+ "//upb:__subpackages__",
],
)
@@ -437,7 +437,7 @@
"tox.ini",
],
strip_prefix = "",
- visibility = ["@upb//:__subpackages__"],
+ visibility = ["//upb:__subpackages__"],
)
pkg_files(
diff --git a/python/README.md b/python/README.md
index dc4b1d0..baa58c2 100644
--- a/python/README.md
+++ b/python/README.md
@@ -21,8 +21,8 @@
can use the following Bazel commands:
```
-$ bazel build @upb//python/dist:source_wheel
-$ bazel build @upb//python/dist:binary_wheel
+$ bazel build //upb/python/dist:source_wheel
+$ bazel build //upb/python/dist:binary_wheel
```
The binary wheel will build against whatever version of Python is installed on
@@ -49,7 +49,7 @@
better performance than any of the previous backends, and it is now the
default. It is distributed in our PyPI packages, and requires no special
installation. The code for this module lives in
- [@upb/python](https://github.com/protocolbuffers/upb/tree/main/python).
+ [upb/python](https://github.com/protocolbuffers/protobuf/tree/main/upb/python).
1. **cpp**: This extension module wraps the C++ protobuf library. It is
deprecated and is no longer released in our PyPI packages, however it is
still used in some legacy cases where apps want to perform zero-copy message
diff --git a/python/google/protobuf/internal/numpy/BUILD.bazel b/python/google/protobuf/internal/numpy/BUILD.bazel
index d88ae8a..5c1c166 100644
--- a/python/google/protobuf/internal/numpy/BUILD.bazel
+++ b/python/google/protobuf/internal/numpy/BUILD.bazel
@@ -18,6 +18,6 @@
],
visibility = [
"//python:__pkg__",
- "@upb//python/pb_unit_tests:__pkg__",
+ "//upb/python/pb_unit_tests:__pkg__",
]
)
diff --git a/regenerate_stale_files.sh b/regenerate_stale_files.sh
index db0d13c..c96693a 100755
--- a/regenerate_stale_files.sh
+++ b/regenerate_stale_files.sh
@@ -18,7 +18,7 @@
${BazelBin} test objectivec:well_known_types_staleness_test "$@" || ./bazel-bin/objectivec/well_known_types_staleness_test --fix
${BazelBin} test php:test_amalgamation_staleness "$@" || ./bazel-bin/php/test_amalgamation_staleness --fix
${BazelBin} test ruby/ext/google/protobuf_c:test_amalgamation_staleness "$@" || ./bazel-bin/ruby/ext/google/protobuf_c/test_amalgamation_staleness --fix
-(cd upb; ${BazelBin} test cmake:test_generated_files "$@" || ./bazel-bin/cmake/test_generated_files --fix)
+${BazelBin} test upb/cmake:test_generated_files "$@" || ./bazel-bin/upb/cmake/test_generated_files --fix
# Generate C# code.
# This doesn't currently have Bazel staleness tests, but there's an existing
diff --git a/ruby/ext/google/protobuf_c/BUILD.bazel b/ruby/ext/google/protobuf_c/BUILD.bazel
index b2a6310..755a249 100644
--- a/ruby/ext/google/protobuf_c/BUILD.bazel
+++ b/ruby/ext/google/protobuf_c/BUILD.bazel
@@ -1,6 +1,6 @@
load("@build_bazel_rules_apple//apple:apple_binary.bzl", "apple_binary")
load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix")
-load("@upb//cmake:build_defs.bzl", "staleness_test")
+load("//upb/cmake:build_defs.bzl", "staleness_test")
package(default_visibility = ["//ruby:__subpackages__"])
@@ -31,7 +31,7 @@
name = "copy_sources",
srcs = PROTOBUF_C_SOURCES + [
"glue.c",
- "@upb//:gen_ruby_amalgamation",
+ "//upb:gen_ruby_amalgamation",
],
outs = ["copy/%s" % src for src in PROTOBUF_C_SOURCES] + [
"copy/glue.c",
@@ -155,14 +155,14 @@
genrule(
name = "copy_ruby_amalgamation_h",
- srcs = ["@upb//:ruby-upb.h"],
+ srcs = ["//upb:ruby-upb.h"],
outs = ["generated-in/ruby-upb.h"],
cmd = "cp $< $@",
)
genrule(
name = "copy_ruby_amalgamation_c",
- srcs = ["@upb//:ruby-upb.c"],
+ srcs = ["//upb:ruby-upb.c"],
outs = ["generated-in/ruby-upb.c"],
cmd = "cp $< $@",
)
diff --git a/rust/aspects.bzl b/rust/aspects.bzl
index 4639f79..506f18e 100644
--- a/rust/aspects.bzl
+++ b/rust/aspects.bzl
@@ -9,7 +9,7 @@
# buildifier: disable=bzl-visibility
load("@rules_rust//rust/private:rustc.bzl", "rustc_compile_action")
load("@rules_rust//rust:defs.bzl", "rust_common")
-load("@upb//bazel:upb_proto_library.bzl", "UpbWrappedCcInfo", "upb_proto_library_aspect")
+load("//upb/bazel:upb_proto_library.bzl", "UpbWrappedCcInfo", "upb_proto_library_aspect")
load("@bazel_tools//tools/cpp:toolchain_utils.bzl", "find_cpp_toolchain")
proto_common = proto_common_do_not_use
diff --git a/rust/upb_kernel/BUILD b/rust/upb_kernel/BUILD
index ecff4ce..653063c 100644
--- a/rust/upb_kernel/BUILD
+++ b/rust/upb_kernel/BUILD
@@ -8,6 +8,6 @@
"//rust:__subpackages__",
],
deps = [
- "@upb//:upb",
+ "//upb",
],
)
diff --git a/rust/upb_kernel/upb_api.c b/rust/upb_kernel/upb_api.c
index 985749d..c4eb226 100644
--- a/rust/upb_kernel/upb_api.c
+++ b/rust/upb_kernel/upb_api.c
@@ -8,4 +8,4 @@
#define UPB_BUILD_API
-#include "upb/mem/arena.h" // IWYU pragma: keep
+#include "upb/upb/mem/arena.h" // IWYU pragma: keep
diff --git a/src/BUILD.bazel b/src/BUILD.bazel
index 0de1a4e..96b7001 100644
--- a/src/BUILD.bazel
+++ b/src/BUILD.bazel
@@ -4,7 +4,7 @@
# Most rules are under google/protobuf. This package exists for convenience.
load("@rules_pkg//:mappings.bzl", "pkg_filegroup", "pkg_files", "strip_prefix")
-load("@upb//cmake:build_defs.bzl", "staleness_test")
+load("//upb/cmake:build_defs.bzl", "staleness_test")
load("//conformance:defs.bzl", "conformance_test")
pkg_files(
diff --git a/src/google/protobuf/BUILD.bazel b/src/google/protobuf/BUILD.bazel
index acbc6a1..6e70f79 100644
--- a/src/google/protobuf/BUILD.bazel
+++ b/src/google/protobuf/BUILD.bazel
@@ -5,7 +5,7 @@
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_proto_library", "cc_test")
load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_proto//proto:defs.bzl", "proto_library")
-load("@upb//cmake:build_defs.bzl", "staleness_test")
+load("//upb/cmake:build_defs.bzl", "staleness_test")
load("//build_defs:cpp_opts.bzl", "COPTS", "LINK_OPTS")
package(
@@ -636,7 +636,6 @@
],
visibility = [
"//:__subpackages__",
- "@upb//:__subpackages__",
],
)
@@ -786,7 +785,7 @@
visibility = [
"//:__pkg__",
"//conformance:__pkg__",
- "@upb//:__subpackages__",
+ "//upb:__subpackages__",
],
)
@@ -797,7 +796,7 @@
visibility = [
"//:__pkg__",
"//conformance:__pkg__",
- "@upb//:__subpackages__",
+ "//upb:__subpackages__",
],
deps = [
":any_proto",
diff --git a/src/google/protobuf/compiler/BUILD.bazel b/src/google/protobuf/compiler/BUILD.bazel
index b5ee0c1..e85d9f5 100644
--- a/src/google/protobuf/compiler/BUILD.bazel
+++ b/src/google/protobuf/compiler/BUILD.bazel
@@ -200,7 +200,7 @@
filegroup(
name = "plugin_proto_src",
srcs = ["plugin.proto"],
- visibility = ["@upb//:__subpackages__"],
+ visibility = ["//upb:__subpackages__"],
)
exports_files(
diff --git a/upb/BUILD b/upb/BUILD
index adea12f..e1ab344 100644
--- a/upb/BUILD
+++ b/upb/BUILD
@@ -7,14 +7,14 @@
load("@rules_python//python:defs.bzl", "py_binary")
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
-load("//bazel:build_defs.bzl", "UPB_DEFAULT_COPTS")
+load("//upb/bazel:build_defs.bzl", "UPB_DEFAULT_COPTS")
load(
- "//bazel:upb_proto_library.bzl",
+ "//upb/bazel:upb_proto_library.bzl",
"upb_proto_library_copts",
"upb_proto_reflection_library",
)
load(
- "//upbc:bootstrap_compiler.bzl",
+ "//upb/upbc:bootstrap_compiler.bzl",
"bootstrap_cc_library",
"bootstrap_upb_proto_library",
)
@@ -26,13 +26,13 @@
# begin:github_only
load(
- "//bazel:amalgamation.bzl",
+ "//upb/bazel:amalgamation.bzl",
"upb_amalgamation",
)
# end:github_only
# begin:google_only
-# package(default_applicable_licenses = ["//:license"])
+# package(default_applicable_licenses = ["//upb:license"])
#
# license(
# name = "license",
@@ -49,7 +49,7 @@
"BUILD",
"WORKSPACE",
],
- visibility = ["//cmake:__pkg__"],
+ visibility = ["//upb/cmake:__pkg__"],
)
config_setting(
@@ -66,7 +66,7 @@
config_setting(
name = "fasttable_enabled_setting",
- flag_values = {"//:fasttable_enabled": "true"},
+ flag_values = {"//upb:fasttable_enabled": "true"},
visibility = ["//visibility:public"],
)
@@ -109,7 +109,7 @@
hdrs = ["upb/generated_code_support.h"],
copts = UPB_DEFAULT_COPTS,
textual_hdrs = [
- "//upb/port:inc",
+ "//upb/upb/port:inc",
],
visibility = ["//visibility:public"],
deps = [
@@ -133,7 +133,7 @@
name = "generated_cpp_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me",
copts = UPB_DEFAULT_COPTS,
textual_hdrs = [
- "//upb/port:inc",
+ "//upb/upb/port:inc",
],
visibility = ["//visibility:public"],
)
@@ -146,7 +146,7 @@
],
copts = UPB_DEFAULT_COPTS,
textual_hdrs = [
- "//upb/port:inc",
+ "//upb/upb/port:inc",
],
visibility = ["//visibility:public"],
deps = [
@@ -164,16 +164,16 @@
google3_src_files = ["net/proto2/proto/descriptor.proto"],
google3_src_rules = ["//net/proto2/proto:descriptor_proto_source"],
oss_src_files = ["google/protobuf/descriptor.proto"],
- oss_src_rules = ["@com_google_protobuf//:descriptor_proto_srcs"],
+ oss_src_rules = ["//:descriptor_proto_srcs"],
oss_strip_prefix = "third_party/protobuf/github/bootstrap/src",
- proto_lib_deps = ["@com_google_protobuf//:descriptor_proto"],
+ proto_lib_deps = ["//:descriptor_proto"],
visibility = ["//visibility:public"],
)
upb_proto_reflection_library(
name = "descriptor_upb_proto_reflection",
visibility = ["//visibility:public"],
- deps = ["@com_google_protobuf//:descriptor_proto"],
+ deps = ["//:descriptor_proto"],
)
# TODO(b/232091617): Once we can delete the deprecated forwarding headers
@@ -273,196 +273,196 @@
alias(
name = "base",
- actual = "//upb/base",
+ actual = "//upb/upb/base",
visibility = ["//visibility:public"],
)
alias(
name = "base_internal",
- actual = "//upb/base:internal",
+ actual = "//upb/upb/base:internal",
visibility = ["//visibility:public"],
)
alias(
name = "collections",
- actual = "//upb/collections",
+ actual = "//upb/upb/collections",
visibility = ["//visibility:public"],
)
alias(
name = "collections_internal",
- actual = "//upb/collections:internal",
+ actual = "//upb/upb/collections:internal",
visibility = ["//visibility:public"],
)
alias(
name = "collections_split64",
- actual = "//upb/collections:split64",
+ actual = "//upb/upb/collections:split64",
visibility = ["//visibility:public"],
)
alias(
name = "hash",
- actual = "//upb/hash",
+ actual = "//upb/upb/hash",
visibility = ["//visibility:public"],
)
alias(
name = "json",
- actual = "//upb/json",
+ actual = "//upb/upb/json",
visibility = ["//visibility:public"],
)
alias(
name = "lex",
- actual = "//upb/lex",
+ actual = "//upb/upb/lex",
visibility = ["//visibility:public"],
)
alias(
name = "mem",
- actual = "//upb/mem",
+ actual = "//upb/upb/mem",
visibility = ["//visibility:public"],
)
alias(
name = "mem_internal",
- actual = "//upb/mem:internal",
- visibility = ["//:__subpackages__"],
+ actual = "//upb/upb/mem:internal",
+ visibility = ["//upb:__subpackages__"],
)
alias(
name = "message",
- actual = "//upb/message",
+ actual = "//upb/upb/message",
visibility = ["//visibility:public"],
)
alias(
name = "message_accessors",
- actual = "//upb/message:accessors",
+ actual = "//upb/upb/message:accessors",
visibility = ["//visibility:public"],
)
alias(
name = "message_accessors_internal",
- actual = "//upb/message:accessors_internal",
- visibility = ["//:friends"],
+ actual = "//upb/upb/message:accessors_internal",
+ visibility = ["//upb:friends"],
)
alias(
name = "message_copy",
- actual = "//upb/message:copy",
+ actual = "//upb/upb/message:copy",
visibility = ["//visibility:public"],
)
alias(
name = "message_internal",
- actual = "//upb/message:internal",
+ actual = "//upb/upb/message:internal",
visibility = ["//visibility:public"],
)
alias(
name = "message_internal_types",
- actual = "//upb/message:internal_types",
+ actual = "//upb/upb/message:internal_types",
visibility = ["//visibility:public"],
)
alias(
name = "message_promote",
- actual = "//upb/message:promote",
+ actual = "//upb/upb/message:promote",
visibility = ["//visibility:public"],
)
alias(
name = "message_split64",
- actual = "//upb/message:split64",
+ actual = "//upb/upb/message:split64",
visibility = ["//visibility:public"],
)
alias(
name = "message_tagged_ptr",
- actual = "//upb/message:tagged_ptr",
- visibility = ["//:friends"],
+ actual = "//upb/upb/message:tagged_ptr",
+ visibility = ["//upb:friends"],
)
alias(
name = "message_types",
- actual = "//upb/message:types",
+ actual = "//upb/upb/message:types",
visibility = ["//visibility:public"],
)
alias(
name = "mini_descriptor",
- actual = "//upb/mini_descriptor",
+ actual = "//upb/upb/mini_descriptor",
visibility = ["//visibility:public"],
)
alias(
name = "mini_descriptor_internal",
- actual = "//upb/mini_descriptor:internal",
- visibility = ["//:__subpackages__"],
+ actual = "//upb/upb/mini_descriptor:internal",
+ visibility = ["//upb:__subpackages__"],
)
alias(
name = "mini_table",
- actual = "//upb/mini_table",
- visibility = ["//:friends"],
+ actual = "//upb/upb/mini_table",
+ visibility = ["//upb:friends"],
)
# begin:google_only
# alias(
# name = "mini_table_compat",
-# actual = "//upb/mini_table:compat",
+# actual = "//upb/upb/mini_table:compat",
# compatible_with = ["//buildenv/target:non_prod"],
-# visibility = ["//:friends"],
+# visibility = ["//upb:friends"],
# )
# end:google_only
alias(
name = "mini_table_internal",
- actual = "//upb/mini_table:internal",
+ actual = "//upb/upb/mini_table:internal",
visibility = ["//visibility:public"],
)
alias(
name = "port",
- actual = "//upb/port",
+ actual = "//upb/upb/port",
visibility = ["//visibility:public"],
)
alias(
name = "text",
- actual = "//upb/text",
+ actual = "//upb/upb/text",
visibility = ["//visibility:public"],
)
alias(
name = "wire",
- actual = "//upb/wire",
+ actual = "//upb/upb/wire",
visibility = ["//visibility:public"],
)
alias(
name = "wire_internal",
- actual = "//upb/wire:internal",
+ actual = "//upb/upb/wire:internal",
visibility = ["//visibility:public"],
)
alias(
name = "wire_reader",
- actual = "//upb/wire:reader",
+ actual = "//upb/upb/wire:reader",
visibility = ["//visibility:public"],
)
alias(
name = "wire_types",
- actual = "//upb/wire:types",
+ actual = "//upb/upb/wire:types",
visibility = ["//visibility:public"],
)
alias(
name = "eps_copy_input_stream",
- actual = "//upb/wire:eps_copy_input_stream",
+ actual = "//upb/upb/wire:eps_copy_input_stream",
visibility = ["//visibility:public"],
)
@@ -664,7 +664,7 @@
"third_party/lunit/console.lua",
"third_party/lunit/lunit.lua",
],
- visibility = ["//lua:__pkg__"],
+ visibility = ["//upb/lua:__pkg__"],
)
filegroup(
@@ -681,8 +681,8 @@
],
),
visibility = [
- "//cmake:__pkg__",
- "//python/dist:__pkg__",
+ "//upb/cmake:__pkg__",
+ "//upb/python/dist:__pkg__",
]
)
# end:github_only
@@ -720,7 +720,7 @@
# "upb_UnknownToMessage_Status",
# "upb_WireType",
# ],
-# visibility = ["//:__subpackages__"],
+# visibility = ["//upb:__subpackages__"],
# )
#
# end:google_only
diff --git a/upb/WORKSPACE b/upb/WORKSPACE
deleted file mode 100644
index c0e0a13..0000000
--- a/upb/WORKSPACE
+++ /dev/null
@@ -1,91 +0,0 @@
-workspace(name = "upb")
-
-load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
-load("//bazel:workspace_deps.bzl", "upb_deps")
-
-local_repository(
- name = "com_google_protobuf",
- path = "..",
-)
-
-load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
-protobuf_deps()
-
-upb_deps()
-
-load("@utf8_range//:workspace_deps.bzl", "utf8_range_deps")
-utf8_range_deps()
-
-http_archive(
- name = "lua",
- build_file = "//bazel:lua.BUILD",
- sha256 = "b9e2e4aad6789b3b63a056d442f7b39f0ecfca3ae0f1fc0ae4e9614401b69f4b",
- strip_prefix = "lua-5.2.4",
- urls = [
- "https://mirror.bazel.build/www.lua.org/ftp/lua-5.2.4.tar.gz",
- "https://www.lua.org/ftp/lua-5.2.4.tar.gz",
- ],
-)
-
-http_archive(
- name = "com_github_google_benchmark",
- urls = ["https://github.com/google/benchmark/archive/0baacde3618ca617da95375e0af13ce1baadea47.zip"],
- strip_prefix = "benchmark-0baacde3618ca617da95375e0af13ce1baadea47",
- sha256 = "62e2f2e6d8a744d67e4bbc212fcfd06647080de4253c97ad5c6749e09faf2cb0",
-)
-
-http_archive(
- name = "com_google_googleapis",
- urls = ["https://github.com/googleapis/googleapis/archive/refs/heads/master.zip"],
- build_file = "//benchmarks:BUILD.googleapis",
- strip_prefix = "googleapis-master",
- patch_cmds = ["find google -type f -name BUILD.bazel -delete"],
-)
-
-http_archive(
- name = "com_google_absl",
- sha256 = "e7fdfe0bed87702a22c5b73b6b5fe08bedd25f17d617e52df6061b0f47d480b0",
- strip_prefix = "abseil-cpp-e6044634dd7caec2d79a13aecc9e765023768757",
- urls = [
- "https://github.com/abseil/abseil-cpp/archive/e6044634dd7caec2d79a13aecc9e765023768757.tar.gz"
- ],
-)
-
-http_archive(
- name = "com_google_googletest",
- sha256 = "730215d76eace9dd49bf74ce044e8daa065d175f1ac891cc1d6bb184ef94e565",
- strip_prefix = "googletest-f53219cdcb7b084ef57414efea92ee5b71989558",
- urls = [
- "https://github.com/google/googletest/archive/f53219cdcb7b084ef57414efea92ee5b71989558.tar.gz" # 2023-03-16
- ],
-)
-
-load("@com_google_googletest//:googletest_deps.bzl", "googletest_deps")
-
-googletest_deps()
-
-load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
-
-rules_pkg_dependencies()
-
-load("//bazel:system_python.bzl", "system_python")
-system_python(
- name = "system_python",
- minimum_python_version = "3.7",
-)
-
-load("@system_python//:register.bzl", "register_system_python")
-register_system_python()
-
-load("@system_python//:pip.bzl", "pip_parse")
-
-pip_parse(
- name="pip_deps",
- requirements = "//python:requirements.txt",
- requirements_overrides = {
- "3.11": "//python:requirements_311.txt",
- },
-)
-
-load("@pip_deps//:requirements.bzl", "install_deps")
-install_deps()
diff --git a/upb/bazel/BUILD b/upb/bazel/BUILD
index 06bb153..005bb63 100644
--- a/upb/bazel/BUILD
+++ b/upb/bazel/BUILD
@@ -9,20 +9,20 @@
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
# begin:google_only
-# package(default_applicable_licenses = ["//:license"])
+# package(default_applicable_licenses = ["//upb:license"])
# end:google_only
licenses(["notice"])
exports_files(
["workspace_deps.bzl"],
- visibility = ["//cmake:__pkg__"],
+ visibility = ["//upb/cmake:__pkg__"],
)
py_binary(
name = "amalgamate",
srcs = ["amalgamate.py"],
- visibility = ["//:__pkg__"],
+ visibility = ["//upb:__pkg__"],
)
# py_proto_library() is private rule, only intended for internal use by upb.
diff --git a/upb/bazel/amalgamation.bzl b/upb/bazel/amalgamation.bzl
index dd8ddf6..206dcb5 100644
--- a/upb/bazel/amalgamation.bzl
+++ b/upb/bazel/amalgamation.bzl
@@ -54,7 +54,7 @@
"_amalgamator": attr.label(
executable = True,
cfg = "exec",
- default = "//bazel:amalgamate",
+ default = "//upb/bazel:amalgamate",
),
"prefix": attr.string(
default = "",
diff --git a/upb/bazel/build_defs.bzl b/upb/bazel/build_defs.bzl
index 66c255d..64c877e 100644
--- a/upb/bazel/build_defs.bzl
+++ b/upb/bazel/build_defs.bzl
@@ -29,13 +29,13 @@
# end:github_only
UPB_DEFAULT_CPPOPTS = select({
- "//:windows": [],
+ "//upb:windows": [],
"//conditions:default": _DEFAULT_CPPOPTS,
})
UPB_DEFAULT_COPTS = select({
- "//:windows": [],
- "//:fasttable_enabled_setting": ["-std=gnu99", "-DUPB_ENABLE_FASTTABLE"],
+ "//upb:windows": [],
+ "//upb:fasttable_enabled_setting": ["-std=gnu99", "-DUPB_ENABLE_FASTTABLE"],
"//conditions:default": _DEFAULT_COPTS,
})
diff --git a/upb/bazel/py_proto_library.bzl b/upb/bazel/py_proto_library.bzl
index b4a0f04..08ff9a8 100644
--- a/upb/bazel/py_proto_library.bzl
+++ b/upb/bazel/py_proto_library.bzl
@@ -116,7 +116,7 @@
"_protoc": attr.label(
executable = True,
cfg = "exec",
- default = "@com_google_protobuf//:protoc",
+ default = "//:protoc",
),
},
implementation = _py_proto_library_aspect_impl,
diff --git a/upb/bazel/upb_proto_library.bzl b/upb/bazel/upb_proto_library.bzl
index f353fa8..4542263 100644
--- a/upb/bazel/upb_proto_library.bzl
+++ b/upb/bazel/upb_proto_library.bzl
@@ -413,25 +413,25 @@
upb_proto_library_aspect = aspect(
attrs = {
"_copts": attr.label(
- default = "//:upb_proto_library_copts__for_generated_code_only_do_not_use",
+ default = "//upb:upb_proto_library_copts__for_generated_code_only_do_not_use",
),
"_gen_upb": attr.label(
executable = True,
cfg = "exec",
- default = "//upbc:protoc-gen-upb_stage1",
+ default = "//upb/upbc:protoc-gen-upb_stage1",
),
"_protoc": attr.label(
executable = True,
cfg = "exec",
- default = "@com_google_protobuf//:protoc",
+ default = "//:protoc",
),
"_cc_toolchain": attr.label(
default = "@bazel_tools//tools/cpp:current_cc_toolchain",
),
"_upb": attr.label_list(default = [
- "//:generated_code_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me",
+ "//upb:generated_code_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me",
]),
- "_fasttable_enabled": attr.label(default = "//:fasttable_enabled"),
+ "_fasttable_enabled": attr.label(default = "//upb:fasttable_enabled"),
},
implementation = upb_proto_library_aspect_impl,
provides = _get_upb_proto_library_aspect_provides(),
@@ -462,24 +462,24 @@
_upb_proto_reflection_library_aspect = aspect(
attrs = {
"_copts": attr.label(
- default = "//:upb_proto_library_copts__for_generated_code_only_do_not_use",
+ default = "//upb:upb_proto_library_copts__for_generated_code_only_do_not_use",
),
"_gen_upbdefs": attr.label(
executable = True,
cfg = "exec",
- default = "//upbc:protoc-gen-upbdefs",
+ default = "//upb/upbc:protoc-gen-upbdefs",
),
"_protoc": attr.label(
executable = True,
cfg = "exec",
- default = "@com_google_protobuf//:protoc",
+ default = "//:protoc",
),
"_cc_toolchain": attr.label(
default = "@bazel_tools//tools/cpp:current_cc_toolchain",
),
"_upbdefs": attr.label_list(
default = [
- "//:generated_reflection_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me",
+ "//upb:generated_reflection_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me",
],
),
},
diff --git a/upb/bazel/workspace_deps.bzl b/upb/bazel/workspace_deps.bzl
index e80ad60..2515a8a 100644
--- a/upb/bazel/workspace_deps.bzl
+++ b/upb/bazel/workspace_deps.bzl
@@ -1,6 +1,6 @@
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
-load("//bazel:python_downloads.bzl", "python_nuget_package", "python_source_archive")
+load("//upb/bazel:python_downloads.bzl", "python_nuget_package", "python_source_archive")
def _github_archive(repo, commit, **kwargs):
repo_name = repo.split("/")[-1]
diff --git a/upb/benchmarks/BUILD b/upb/benchmarks/BUILD
index e074778..8839584 100644
--- a/upb/benchmarks/BUILD
+++ b/upb/benchmarks/BUILD
@@ -12,7 +12,7 @@
# end:google_only
load(
- "//bazel:upb_proto_library.bzl",
+ "//upb/bazel:upb_proto_library.bzl",
"upb_proto_library",
"upb_proto_reflection_library",
)
@@ -25,7 +25,7 @@
)
# begin:google_only
-# package(default_applicable_licenses = ["//:license"])
+# package(default_applicable_licenses = ["//upb:license"])
# end:google_only
licenses(["notice"])
@@ -75,14 +75,14 @@
":benchmark_descriptor_sv_cc_proto",
":benchmark_descriptor_upb_proto",
":benchmark_descriptor_upb_proto_reflection",
- "//:base",
- "//:base_internal",
- "//:descriptor_upb_proto",
- "//:mem",
- "//:reflection",
+ "//:protobuf",
+ "//upb:base",
+ "//upb:base_internal",
+ "//upb:descriptor_upb_proto",
+ "//upb:mem",
+ "//upb:reflection",
"@com_github_google_benchmark//:benchmark_main",
"@com_google_absl//absl/container:flat_hash_set",
- "@com_google_protobuf//:protobuf",
],
)
diff --git a/upb/benchmarks/benchmark.cc b/upb/benchmarks/benchmark.cc
index a2e2cc2..689ff1b 100644
--- a/upb/benchmarks/benchmark.cc
+++ b/upb/benchmarks/benchmark.cc
@@ -38,15 +38,15 @@
#include "google/protobuf/descriptor.pb.h"
#include "absl/container/flat_hash_set.h"
#include "google/protobuf/dynamic_message.h"
-#include "benchmarks/descriptor.pb.h"
-#include "benchmarks/descriptor.upb.h"
-#include "benchmarks/descriptor.upbdefs.h"
-#include "benchmarks/descriptor_sv.pb.h"
-#include "upb/base/internal/log2.h"
-#include "upb/mem/arena.h"
-#include "upb/reflection/def.hpp"
+#include "upb/benchmarks/descriptor.pb.h"
+#include "upb/benchmarks/descriptor.upb.h"
+#include "upb/benchmarks/descriptor.upbdefs.h"
+#include "upb/benchmarks/descriptor_sv.pb.h"
+#include "upb/upb/base/internal/log2.h"
+#include "upb/upb/mem/arena.h"
+#include "upb/upb/reflection/def.hpp"
-upb_StringView descriptor = benchmarks_descriptor_proto_upbdefinit.descriptor;
+upb_StringView descriptor = upb_benchmarks_descriptor_proto_upbdefinit.descriptor;
namespace protobuf = ::google::protobuf;
// A buffer big enough to parse descriptor.proto without going to heap.
diff --git a/upb/cmake/BUILD.bazel b/upb/cmake/BUILD.bazel
index a18c797..9bc2401 100644
--- a/upb/cmake/BUILD.bazel
+++ b/upb/cmake/BUILD.bazel
@@ -10,7 +10,7 @@
"staleness_test",
)
load(
- "//bazel:build_defs.bzl",
+ "//upb/bazel:build_defs.bzl",
"make_shell_script",
)
@@ -35,21 +35,17 @@
genrule(
name = "gen_cmakelists",
srcs = [
- "//:BUILD",
- "//:WORKSPACE",
- "//bazel:workspace_deps.bzl",
+ "//upb:BUILD",
],
outs = ["generated-in/CMakeLists.txt"],
cmd = "$(location :make_cmakelists) " +
- "$(location //bazel:workspace_deps.bzl) " +
- "$(location //:WORKSPACE) " +
- "$(location //:BUILD) $@",
+ "$(location //upb:BUILD) $@",
tools = [":make_cmakelists"],
)
genrule(
name = "copy_protos",
- srcs = ["//:descriptor_upb_proto"],
+ srcs = ["//upb:descriptor_upb_proto"],
outs = [
"generated-in/google/protobuf/descriptor.upb.c",
"generated-in/google/protobuf/descriptor.upb.h",
@@ -85,18 +81,18 @@
data = [
":copy_protos",
":gen_cmakelists",
- "//:source_files",
- "//upb/base:source_files",
- "//upb/collections:source_files",
- "//upb/hash:source_files",
- "//upb/lex:source_files",
- "//upb/mem:source_files",
- "//upb/message:source_files",
- "//upb/mini_descriptor:source_files",
- "//upb/mini_table:source_files",
- "//upb/port:source_files",
- "//upb/text:source_files",
- "//upb/wire:source_files",
+ "//upb:source_files",
+ "//upb/upb/base:source_files",
+ "//upb/upb/collections:source_files",
+ "//upb/upb/hash:source_files",
+ "//upb/upb/lex:source_files",
+ "//upb/upb/mem:source_files",
+ "//upb/upb/message:source_files",
+ "//upb/upb/mini_descriptor:source_files",
+ "//upb/upb/mini_table:source_files",
+ "//upb/upb/port:source_files",
+ "//upb/upb/text:source_files",
+ "//upb/upb/wire:source_files",
"@utf8_range//:utf8_range_srcs",
],
target_compatible_with = select({
diff --git a/upb/cmake/build_defs.bzl b/upb/cmake/build_defs.bzl
index 9db39b3..05e9f99 100644
--- a/upb/cmake/build_defs.bzl
+++ b/upb/cmake/build_defs.bzl
@@ -27,7 +27,7 @@
"""
script_name = name + ".py"
- script_src = Label("//cmake:staleness_test.py")
+ script_src = Label("//upb/cmake:staleness_test.py")
# Filter out non-existing rules so Blaze doesn't error out before we even
# run the test.
@@ -52,7 +52,7 @@
data = existing_outs + [generated_pattern % file for file in outs],
python_version = "PY3",
deps = [
- Label("//cmake:staleness_test_lib"),
+ Label("//upb/cmake:staleness_test_lib"),
],
tags = ["staleness_test"] + tags,
**kwargs
diff --git a/upb/cmake/make_cmakelists.py b/upb/cmake/make_cmakelists.py
index 358f9cf..ddeded4 100755
--- a/upb/cmake/make_cmakelists.py
+++ b/upb/cmake/make_cmakelists.py
@@ -30,7 +30,7 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-"""A tool to convert {WORKSPACE, BUILD} -> CMakeLists.txt.
+"""A tool to convert BUILD -> CMakeLists.txt.
This tool is very upb-specific at the moment, and should not be seen as a
generic Bazel -> CMake converter.
@@ -236,92 +236,14 @@
pass
-class WorkspaceFileFunctions(object):
- def __init__(self, converter):
- self.converter = converter
-
- def load(self, *args, **kwargs):
- pass
-
- def workspace(self, **kwargs):
- self.converter.prelude += "project(%s)\n" % (kwargs["name"])
- self.converter.prelude += "set(CMAKE_C_STANDARD 99)\n"
-
- def maybe(self, rule, **kwargs):
- if kwargs["name"] == "utf8_range":
- self.converter.utf8_range_commit = kwargs["commit"]
- pass
-
- def http_archive(self, **kwargs):
- pass
-
- def git_repository(self, **kwargs):
- pass
-
- def new_git_repository(self, **kwargs):
- pass
-
- def bazel_version_repository(self, **kwargs):
- pass
-
- def protobuf_deps(self):
- pass
-
- def utf8_range_deps(self):
- pass
-
- def pip_parse(self, **kwargs):
- pass
-
- def rules_fuzzing_dependencies(self):
- pass
-
- def rules_fuzzing_init(self):
- pass
-
- def rules_pkg_dependencies(self):
- pass
-
- def system_python(self, **kwargs):
- pass
-
- def register_system_python(self, **kwargs):
- pass
-
- def register_toolchains(self, toolchain):
- pass
-
- def python_source_archive(self, **kwargs):
- pass
-
- def python_nuget_package(self, **kwargs):
- pass
-
- def install_deps(self):
- pass
-
- def fuzzing_py_install_deps(self):
- pass
-
- def googletest_deps(self):
- pass
-
- def local_repository(self, **kwargs):
- pass
-
-
class Converter(object):
def __init__(self):
- self.prelude = ""
self.toplevel = ""
self.if_lua = ""
- self.utf8_range_commit = ""
def convert(self):
return self.template % {
- "prelude": converter.prelude,
"toplevel": converter.toplevel,
- "utf8_range_commit": converter.utf8_range_commit,
}
template = textwrap.dedent("""\
@@ -329,7 +251,8 @@
cmake_minimum_required(VERSION 3.10...3.24)
- %(prelude)s
+ project(upb)
+ set(CMAKE_C_STANDARD 99)
# Prevent CMake from setting -rdynamic on Linux (!!).
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
@@ -366,7 +289,7 @@
endif()
if(NOT TARGET utf8_range)
- if(EXISTS ../external/utf8_range)
+ if(EXISTS ../../external/utf8_range)
# utf8_range is already installed
include_directories(../external/utf8_range)
elseif(EXISTS ../../utf8_range)
@@ -376,7 +299,7 @@
FetchContent_Declare(
utf8_range
GIT_REPOSITORY "https://github.com/protocolbuffers/utf8_range.git"
- GIT_TAG "%(utf8_range_commit)s"
+ GIT_TAG "d863bc33e15cba6d873c878dcca9e6fe52b2f8cb"
)
FetchContent_GetProperties(utf8_range)
if(NOT utf8_range_POPULATED)
@@ -412,12 +335,9 @@
globs = GetDict(converter)
-workspace_dict = GetDict(WorkspaceFileFunctions(converter))
-# We take all file paths as command-line arguments to ensure that we can find
-# each file regardless of how exactly Bazel was invoked.
-exec(open(sys.argv[1]).read(), workspace_dict) # workspace_deps.bzl
-exec(open(sys.argv[2]).read(), workspace_dict) # WORKSPACE
-exec(open(sys.argv[3]).read(), GetDict(BuildFileFunctions(converter))) # BUILD
+# We take the BUILD path as a command-line argument to ensure that we can find
+# it regardless of how exactly Bazel was invoked.
+exec(open(sys.argv[1]).read(), GetDict(BuildFileFunctions(converter))) # BUILD
-with open(sys.argv[4], "w") as f:
+with open(sys.argv[2], "w") as f:
f.write(converter.convert())
diff --git a/upb/cmake/staleness_test.py b/upb/cmake/staleness_test.py
index c2971c2..f9fe04e 100644
--- a/upb/cmake/staleness_test.py
+++ b/upb/cmake/staleness_test.py
@@ -36,7 +36,7 @@
from __future__ import absolute_import
-from cmake import staleness_test_lib
+from upb.cmake import staleness_test_lib
import unittest
import sys
diff --git a/upb/docs/wrapping-upb.md b/upb/docs/wrapping-upb.md
index bc1bd63..cefced6 100644
--- a/upb/docs/wrapping-upb.md
+++ b/upb/docs/wrapping-upb.md
@@ -173,8 +173,8 @@
To use reflection-based access:
-1. Load and access descriptor data using the interfaces in upb/reflection/def.h.
-2. Access message data using the interfaces in upb/reflection/message.h.
+1. Load and access descriptor data using the interfaces in upb/upb/reflection/def.h.
+2. Access message data using the interfaces in upb/upb/reflection/message.h.
### MiniTables
@@ -234,8 +234,8 @@
To use MiniTable-based access:
-1. Load and access MiniDescriptors data using the interfaces in upb/mini_descriptor/decode.h.
-2. Access message data using the interfaces in upb/message/accessors.h.
+1. Load and access MiniDescriptors data using the interfaces in upb/upb/mini_descriptor/decode.h.
+2. Access message data using the interfaces in upb/upb/message/accessors.h.
## Memory Management
diff --git a/upb/lua/BUILD.bazel b/upb/lua/BUILD.bazel
index 8febcde..ee90d96 100644
--- a/upb/lua/BUILD.bazel
+++ b/upb/lua/BUILD.bazel
@@ -6,12 +6,12 @@
# https://developers.google.com/open-source/licenses/bsd
load(
- "//bazel:build_defs.bzl",
+ "//upb/bazel:build_defs.bzl",
"UPB_DEFAULT_COPTS",
"UPB_DEFAULT_CPPOPTS",
)
load(
- "//lua:lua_proto_library.bzl",
+ "//upb/lua:lua_proto_library.bzl",
"lua_proto_library",
)
@@ -30,10 +30,10 @@
copts = UPB_DEFAULT_COPTS,
visibility = ["//visibility:public"],
deps = [
- "//:json",
- "//:message",
- "//:reflection",
- "//:text",
+ "//upb:json",
+ "//upb:message",
+ "//upb:reflection",
+ "//upb:text",
"@lua//:liblua",
],
)
@@ -44,8 +44,8 @@
copts = UPB_DEFAULT_CPPOPTS,
visibility = ["//visibility:public"],
deps = [
+ "//src/google/protobuf/compiler:code_generator",
"@com_google_absl//absl/strings",
- "@com_google_protobuf//src/google/protobuf/compiler:code_generator",
],
)
@@ -63,15 +63,15 @@
":test_messages_proto2_proto_lua",
":test_messages_proto3_proto_lua",
":test_proto_lua",
- "//:third_party/lunit/console.lua",
- "//:third_party/lunit/lunit.lua",
- "//lua:upb.lua",
- "@com_google_protobuf//:descriptor_proto",
- "@com_google_protobuf//conformance:conformance_proto",
+ "//:descriptor_proto",
+ "//conformance:conformance_proto",
+ "//upb:third_party/lunit/console.lua",
+ "//upb:third_party/lunit/lunit.lua",
+ "//upb/lua:upb.lua",
],
linkstatic = 1,
deps = [
- "//lua:lupb",
+ "//upb/lua:lupb",
"@lua//:liblua",
],
)
@@ -80,7 +80,7 @@
name = "test_proto",
testonly = 1,
srcs = ["test.proto"],
- deps = ["@com_google_protobuf//:timestamp_proto"],
+ deps = ["//:timestamp_proto"],
)
lua_proto_library(
@@ -91,22 +91,22 @@
lua_proto_library(
name = "descriptor_proto_lua",
- deps = ["@com_google_protobuf//:descriptor_proto"],
+ deps = ["//:descriptor_proto"],
)
lua_proto_library(
name = "empty_proto_lua",
- deps = ["@com_google_protobuf//:empty_proto"],
+ deps = ["//:empty_proto"],
)
lua_proto_library(
name = "test_messages_proto3_proto_lua",
testonly = 1,
- deps = ["@com_google_protobuf//src/google/protobuf:test_messages_proto3_proto"],
+ deps = ["//src/google/protobuf:test_messages_proto3_proto"],
)
lua_proto_library(
name = "test_messages_proto2_proto_lua",
testonly = 1,
- deps = ["@com_google_protobuf//src/google/protobuf:test_messages_proto2_proto"],
+ deps = ["//src/google/protobuf:test_messages_proto2_proto"],
)
diff --git a/upb/lua/def.c b/upb/lua/def.c
index 9affe52..22e0b9f 100644
--- a/upb/lua/def.c
+++ b/upb/lua/def.c
@@ -28,7 +28,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/reflection/def.h"
+#include "upb/upb/reflection/def.h"
#include <float.h>
#include <math.h>
@@ -36,8 +36,8 @@
#include <string.h>
#include "lauxlib.h"
-#include "lua/upb.h"
-#include "upb/reflection/message.h"
+#include "upb/lua/upb.h"
+#include "upb/upb/reflection/message.h"
#define LUPB_ENUMDEF "lupb.enumdef"
#define LUPB_ENUMVALDEF "lupb.enumvaldef"
diff --git a/upb/lua/lua_proto_library.bzl b/upb/lua/lua_proto_library.bzl
index a78371a..d7a741c 100644
--- a/upb/lua/lua_proto_library.bzl
+++ b/upb/lua/lua_proto_library.bzl
@@ -109,12 +109,12 @@
"_upbc": attr.label(
executable = True,
cfg = "exec",
- default = "//lua:protoc-gen-lua",
+ default = "//upb/lua:protoc-gen-lua",
),
"_protoc": attr.label(
executable = True,
cfg = "exec",
- default = "@com_google_protobuf//:protoc",
+ default = "//:protoc",
),
},
implementation = _lua_proto_library_aspect_impl,
diff --git a/upb/lua/main.c b/upb/lua/main.c
index 6d2b56d..de9e07c 100644
--- a/upb/lua/main.c
+++ b/upb/lua/main.c
@@ -33,7 +33,7 @@
#include <lualib.h>
#include <signal.h>
-#include "lua/upb.h"
+#include "upb/lua/upb.h"
lua_State* L;
@@ -53,13 +53,13 @@
"package.preload['lupb'] = ... "
"package.path = '"
"./?.lua;"
- "./third_party/lunit/?.lua;"
+ "./upb/third_party/lunit/?.lua;"
"external/com_google_protobuf/?.lua;"
"external/com_google_protobuf/src/?.lua;"
"bazel-bin/?.lua;"
"bazel-bin/external/com_google_protobuf/src/?.lua;"
"bazel-bin/external/com_google_protobuf/?.lua;"
- "lua/?.lua;"
+ "upb/lua/?.lua;"
// These additional paths handle the case where this test is invoked from
// the protobuf repo's Bazel workspace.
"external/upb/?.lua;"
diff --git a/upb/lua/msg.c b/upb/lua/msg.c
index bdec7a2..ab48739 100644
--- a/upb/lua/msg.c
+++ b/upb/lua/msg.c
@@ -39,14 +39,14 @@
#include <string.h>
#include "lauxlib.h"
-#include "lua/upb.h"
-#include "upb/collections/map.h"
-#include "upb/json/decode.h"
-#include "upb/json/encode.h"
-#include "upb/message/message.h"
-#include "upb/port/def.inc"
-#include "upb/reflection/message.h"
-#include "upb/text/encode.h"
+#include "upb/lua/upb.h"
+#include "upb/upb/collections/map.h"
+#include "upb/upb/json/decode.h"
+#include "upb/upb/json/encode.h"
+#include "upb/upb/message/message.h"
+#include "upb/upb/port/def.inc"
+#include "upb/upb/reflection/message.h"
+#include "upb/upb/text/encode.h"
/*
* Message/Map/Array objects. These objects form a directed graph: a message
diff --git a/upb/lua/test_upb.lua b/upb/lua/test_upb.lua
index f74d988..24f0151 100644
--- a/upb/lua/test_upb.lua
+++ b/upb/lua/test_upb.lua
@@ -34,7 +34,7 @@
local upb = require "lupb"
local lunit = require "lunit"
-local upb_test = require "lua.test_pb"
+local upb_test = require "upb.lua.test_pb"
local test_messages_proto3 = require "google.protobuf.test_messages_proto3_pb"
local test_messages_proto2 = require "google.protobuf.test_messages_proto2_pb"
local descriptor = require "google.protobuf.descriptor_pb"
diff --git a/upb/lua/upb.c b/upb/lua/upb.c
index 4500fb4..07dc3f3 100644
--- a/upb/lua/upb.c
+++ b/upb/lua/upb.c
@@ -50,7 +50,7 @@
* domain of [u]int64 values.
*/
-#include "lua/upb.h"
+#include "upb/lua/upb.h"
#include <float.h>
#include <math.h>
@@ -59,7 +59,7 @@
#include <string.h>
#include "lauxlib.h"
-#include "upb/message/message.h"
+#include "upb/upb/message/message.h"
/* Lua compatibility code *****************************************************/
diff --git a/upb/lua/upb.h b/upb/lua/upb.h
index 46ec911..59a4ffe 100644
--- a/upb/lua/upb.h
+++ b/upb/lua/upb.h
@@ -36,9 +36,9 @@
#define UPB_LUA_UPB_H_
#include "lauxlib.h"
-#include "upb/message/message.h"
-#include "upb/reflection/def.h"
-#include "upb/reflection/message.h"
+#include "upb/upb/message/message.h"
+#include "upb/upb/reflection/def.h"
+#include "upb/upb/reflection/message.h"
/* Lua changes its API in incompatible ways in every minor release.
* This is some shim code to paper over the differences. */
diff --git a/upb/protos/BUILD b/upb/protos/BUILD
index 29fb20e..88b7e31 100644
--- a/upb/protos/BUILD
+++ b/upb/protos/BUILD
@@ -6,16 +6,16 @@
# https://developers.google.com/open-source/licenses/bsd
load(
- "//bazel:build_defs.bzl",
+ "//upb/bazel:build_defs.bzl",
"UPB_DEFAULT_CPPOPTS",
)
load(
- "//protos/bazel:upb_cc_proto_library.bzl",
+ "//upb/protos/bazel:upb_cc_proto_library.bzl",
"upb_cc_proto_library_copts",
)
# begin:google_only
-# package(default_applicable_licenses = ["//:license"])
+# package(default_applicable_licenses = ["//upb:license"])
# end:google_only
licenses(["notice"])
@@ -31,13 +31,13 @@
deps = [
":protos",
":protos_traits",
- "//:base",
- "//:collections",
- "//:collections_internal",
- "//:mem",
- "//:message_copy",
- "//:message_types",
- "//:port",
+ "//upb:base",
+ "//upb:collections",
+ "//upb:collections_internal",
+ "//upb:mem",
+ "//upb:message_copy",
+ "//upb:message_types",
+ "//upb:port",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/strings",
],
@@ -55,16 +55,16 @@
visibility = ["//visibility:public"],
deps = [
":protos_extension_lock",
- "//:base",
- "//:mem",
- "//:message_accessors_internal",
- "//:message_copy",
- "//:message_internal",
- "//:message_promote",
- "//:message_types",
- "//:mini_table",
- "//:wire",
- "//:wire_types",
+ "//upb:base",
+ "//upb:mem",
+ "//upb:message_accessors_internal",
+ "//upb:message_copy",
+ "//upb:message_internal",
+ "//upb:message_promote",
+ "//upb:message_types",
+ "//upb:mini_table",
+ "//upb:wire",
+ "//upb:wire_types",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",
@@ -89,9 +89,9 @@
visibility = ["//visibility:public"],
deps = [
":protos",
- "//:mem",
- "//:message",
- "//:mini_table",
+ "//upb:mem",
+ "//upb:message",
+ "//upb:mini_table",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings:str_format",
@@ -105,7 +105,7 @@
copts = UPB_DEFAULT_CPPOPTS,
visibility = ["//visibility:public"],
deps = [
- "//:message",
+ "//upb:message",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/synchronization",
],
@@ -123,8 +123,8 @@
":protos",
":protos_internal",
":repeated_field",
- "//:mem",
- "//:message",
+ "//upb:mem",
+ "//upb:message",
],
)
@@ -134,9 +134,9 @@
copts = UPB_DEFAULT_CPPOPTS,
deps = [
":protos_internal",
- "//:mem",
- "//protos_generator/tests:test_model_upb_cc_proto",
- "//protos_generator/tests:test_model_upb_proto",
+ "//upb:mem",
+ "//upb/protos_generator/tests:test_model_upb_cc_proto",
+ "//upb/protos_generator/tests:test_model_upb_proto",
"@com_google_googletest//:gtest_main",
],
)
@@ -160,10 +160,10 @@
name = "protos_extension_lock_test",
srcs = ["protos_extension_lock_test.cc"],
deps = [
- "//:mem",
- "//protos",
- "//protos:protos_extension_lock",
- "//protos_generator/tests:test_model_upb_cc_proto",
+ "//upb:mem",
+ "//upb/protos",
+ "//upb/protos:protos_extension_lock",
+ "//upb/protos_generator/tests:test_model_upb_cc_proto",
"@com_google_absl//absl/hash",
"@com_google_absl//absl/log:absl_check",
"@com_google_googletest//:gtest_main",
diff --git a/upb/protos/bazel/BUILD b/upb/protos/bazel/BUILD
index b8c2665..83e2840 100644
--- a/upb/protos/bazel/BUILD
+++ b/upb/protos/bazel/BUILD
@@ -8,7 +8,7 @@
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
# begin:google_only
-# package(default_applicable_licenses = ["//:license"])
+# package(default_applicable_licenses = ["//upb:license"])
# end:google_only
licenses(["notice"])
@@ -18,7 +18,7 @@
srcs = ["upb_cc_proto_library.bzl"],
visibility = ["//visibility:public"],
deps = [
- "//bazel:upb_proto_library_bzl",
+ "//upb/bazel:upb_proto_library_bzl",
"@bazel_skylib//lib:paths",
"@bazel_tools//tools/cpp:toolchain_utils.bzl",
],
diff --git a/upb/protos/bazel/upb_cc_proto_library.bzl b/upb/protos/bazel/upb_cc_proto_library.bzl
index ad74017..859a0d8 100644
--- a/upb/protos/bazel/upb_cc_proto_library.bzl
+++ b/upb/protos/bazel/upb_cc_proto_library.bzl
@@ -10,7 +10,7 @@
"""
load("@bazel_skylib//lib:paths.bzl", "paths")
-load("//bazel:upb_proto_library.bzl", "GeneratedSrcsInfo", "UpbWrappedCcInfo", "upb_proto_library_aspect")
+load("//upb/bazel:upb_proto_library.bzl", "GeneratedSrcsInfo", "UpbWrappedCcInfo", "upb_proto_library_aspect")
# begin:google_only
# load("@bazel_tools//tools/cpp:toolchain_utils.bzl", "find_cpp_toolchain", "use_cpp_toolchain")
@@ -229,17 +229,17 @@
_upb_cc_proto_library_aspect = aspect(
attrs = {
"_ccopts": attr.label(
- default = "//protos:upb_cc_proto_library_copts__for_generated_code_only_do_not_use",
+ default = "//upb/protos:upb_cc_proto_library_copts__for_generated_code_only_do_not_use",
),
"_gen_upbprotos": attr.label(
executable = True,
cfg = "exec",
- default = "//protos_generator:protoc-gen-upb-protos",
+ default = "//upb/protos_generator:protoc-gen-upb-protos",
),
"_protoc": attr.label(
executable = True,
cfg = "exec",
- default = "@com_google_protobuf//:protoc",
+ default = "//:protoc",
),
"_cc_toolchain": attr.label(
default = "@bazel_tools//tools/cpp:current_cc_toolchain",
@@ -247,12 +247,12 @@
"_upbprotos": attr.label_list(
default = [
# TODO: Add dependencies for cc runtime (absl/string etc..)
- "//:generated_cpp_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me",
- "//protos:generated_protos_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me",
+ "//upb:generated_cpp_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me",
+ "//upb/protos:generated_protos_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/status:statusor",
- "//protos",
- "//protos:repeated_field",
+ "//upb/protos",
+ "//upb/protos:repeated_field",
],
),
},
@@ -283,7 +283,7 @@
providers = [ProtoInfo],
),
"_ccopts": attr.label(
- default = "//protos:upb_cc_proto_library_copts__for_generated_code_only_do_not_use",
+ default = "//upb/protos:upb_cc_proto_library_copts__for_generated_code_only_do_not_use",
),
},
)
diff --git a/upb/protos/protos.cc b/upb/protos/protos.cc
index 9e83d8c..b34f181 100644
--- a/upb/protos/protos.cc
+++ b/upb/protos/protos.cc
@@ -28,7 +28,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "protos/protos.h"
+#include "upb/protos/protos.h"
#include <atomic>
#include <cstddef>
@@ -37,18 +37,18 @@
#include "absl/status/statusor.h"
#include "absl/strings/str_format.h"
#include "absl/strings/string_view.h"
-#include "protos/protos_extension_lock.h"
-#include "upb/mem/arena.h"
-#include "upb/message/copy.h"
-#include "upb/message/internal/extension.h"
-#include "upb/message/promote.h"
-#include "upb/message/types.h"
-#include "upb/mini_table/extension.h"
-#include "upb/mini_table/extension_registry.h"
-#include "upb/mini_table/message.h"
-#include "upb/wire/decode.h"
-#include "upb/wire/encode.h"
-#include "upb/wire/types.h"
+#include "upb/protos/protos_extension_lock.h"
+#include "upb/upb/mem/arena.h"
+#include "upb/upb/message/copy.h"
+#include "upb/upb/message/internal/extension.h"
+#include "upb/upb/message/promote.h"
+#include "upb/upb/message/types.h"
+#include "upb/upb/mini_table/extension.h"
+#include "upb/upb/mini_table/extension_registry.h"
+#include "upb/upb/mini_table/message.h"
+#include "upb/upb/wire/decode.h"
+#include "upb/upb/wire/encode.h"
+#include "upb/upb/wire/types.h"
namespace protos {
diff --git a/upb/protos/protos.h b/upb/protos/protos.h
index 1c0faf2..d3692e3 100644
--- a/upb/protos/protos.h
+++ b/upb/protos/protos.h
@@ -36,13 +36,13 @@
#include "absl/status/status.h"
#include "absl/status/statusor.h"
-#include "upb/base/status.hpp"
-#include "upb/mem/arena.hpp"
-#include "upb/message/copy.h"
-#include "upb/message/internal/accessors.h"
-#include "upb/message/internal/extension.h"
-#include "upb/wire/decode.h"
-#include "upb/wire/encode.h"
+#include "upb/upb/base/status.hpp"
+#include "upb/upb/mem/arena.hpp"
+#include "upb/upb/message/copy.h"
+#include "upb/upb/message/internal/accessors.h"
+#include "upb/upb/message/internal/extension.h"
+#include "upb/upb/wire/decode.h"
+#include "upb/upb/wire/encode.h"
namespace protos {
diff --git a/upb/protos/protos_extension_lock.cc b/upb/protos/protos_extension_lock.cc
index dbb2fc2..bb0dc97 100644
--- a/upb/protos/protos_extension_lock.cc
+++ b/upb/protos/protos_extension_lock.cc
@@ -28,7 +28,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "protos/protos_extension_lock.h"
+#include "upb/protos/protos_extension_lock.h"
#include <atomic>
diff --git a/upb/protos/protos_extension_lock_test.cc b/upb/protos/protos_extension_lock_test.cc
index 326f270..bdc76cc 100644
--- a/upb/protos/protos_extension_lock_test.cc
+++ b/upb/protos/protos_extension_lock_test.cc
@@ -28,7 +28,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "protos/protos_extension_lock.h"
+#include "upb/protos/protos_extension_lock.h"
#include <atomic>
#include <mutex>
@@ -39,9 +39,9 @@
#include "gtest/gtest.h"
#include "absl/hash/hash.h"
#include "absl/log/absl_check.h"
-#include "protos/protos.h"
-#include "protos_generator/tests/test_model.upb.proto.h"
-#include "upb/mem/arena.hpp"
+#include "upb/protos/protos.h"
+#include "upb/protos_generator/tests/test_model.upb.proto.h"
+#include "upb/upb/mem/arena.hpp"
#ifndef ASSERT_OK
#define ASSERT_OK(x) ASSERT_TRUE(x.ok())
diff --git a/upb/protos/protos_internal.h b/upb/protos/protos_internal.h
index 0a1f194..c707ae5 100644
--- a/upb/protos/protos_internal.h
+++ b/upb/protos/protos_internal.h
@@ -31,8 +31,8 @@
#ifndef UPB_PROTOS_PROTOS_INTERNAL_H_
#define UPB_PROTOS_PROTOS_INTERNAL_H_
-#include "upb/mem/arena.h"
-#include "upb/message/message.h"
+#include "upb/upb/mem/arena.h"
+#include "upb/upb/message/message.h"
namespace protos::internal {
diff --git a/upb/protos/protos_internal_test.cc b/upb/protos/protos_internal_test.cc
index e73954a..a2f426b 100644
--- a/upb/protos/protos_internal_test.cc
+++ b/upb/protos/protos_internal_test.cc
@@ -28,13 +28,13 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "protos/protos_internal.h"
+#include "upb/protos/protos_internal.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
-#include "protos_generator/tests/test_model.upb.h"
-#include "protos_generator/tests/test_model.upb.proto.h"
-#include "upb/mem/arena.h"
+#include "upb/protos_generator/tests/test_model.upb.h"
+#include "upb/protos_generator/tests/test_model.upb.proto.h"
+#include "upb/upb/mem/arena.h"
namespace protos::testing {
namespace {
diff --git a/upb/protos/repeated_field.h b/upb/protos/repeated_field.h
index cc049ab..2ff77fd 100644
--- a/upb/protos/repeated_field.h
+++ b/upb/protos/repeated_field.h
@@ -37,17 +37,17 @@
#include "absl/base/attributes.h"
#include "absl/strings/string_view.h"
-#include "protos/protos.h"
-#include "protos/protos_traits.h"
-#include "protos/repeated_field_iterator.h"
-#include "upb/base/string_view.h"
-#include "upb/collections/array.h"
-#include "upb/collections/internal/array.h"
-#include "upb/mem/arena.h"
-#include "upb/message/copy.h"
+#include "upb/protos/protos.h"
+#include "upb/protos/protos_traits.h"
+#include "upb/protos/repeated_field_iterator.h"
+#include "upb/upb/base/string_view.h"
+#include "upb/upb/collections/array.h"
+#include "upb/upb/collections/internal/array.h"
+#include "upb/upb/mem/arena.h"
+#include "upb/upb/message/copy.h"
// Must be last:
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
namespace protos {
@@ -321,6 +321,6 @@
} // namespace protos
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif // UPB_PROTOS_REPEATED_FIELD_H_
diff --git a/upb/protos/repeated_field_iterator.h b/upb/protos/repeated_field_iterator.h
index cb6ab56..2129bc1 100644
--- a/upb/protos/repeated_field_iterator.h
+++ b/upb/protos/repeated_field_iterator.h
@@ -36,15 +36,15 @@
#include <type_traits>
#include "absl/strings/string_view.h"
-#include "protos/protos.h"
-#include "upb/base/string_view.h"
-#include "upb/collections/array.h"
-#include "upb/mem/arena.h"
-#include "upb/message/copy.h"
+#include "upb/protos/protos.h"
+#include "upb/upb/base/string_view.h"
+#include "upb/upb/collections/array.h"
+#include "upb/upb/mem/arena.h"
+#include "upb/upb/message/copy.h"
// Must be last:
-#include "upb/message/types.h"
-#include "upb/port/def.inc"
+#include "upb/upb/message/types.h"
+#include "upb/upb/port/def.inc"
namespace protos {
namespace internal {
diff --git a/upb/protos/repeated_field_iterator_test.cc b/upb/protos/repeated_field_iterator_test.cc
index c8e0a60..645efea 100644
--- a/upb/protos/repeated_field_iterator_test.cc
+++ b/upb/protos/repeated_field_iterator_test.cc
@@ -28,7 +28,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "protos/repeated_field_iterator.h"
+#include "upb/protos/repeated_field_iterator.h"
#include <algorithm>
#include <array>
diff --git a/upb/protos_generator/BUILD b/upb/protos_generator/BUILD
index 4bf4a07..3473450 100644
--- a/upb/protos_generator/BUILD
+++ b/upb/protos_generator/BUILD
@@ -6,12 +6,12 @@
# https://developers.google.com/open-source/licenses/bsd
load(
- "//bazel:build_defs.bzl",
+ "//upb/bazel:build_defs.bzl",
"UPB_DEFAULT_CPPOPTS",
)
# begin:google_only
-# package(default_applicable_licenses = ["//:license"])
+# package(default_applicable_licenses = ["//upb:license"])
# end:google_only
licenses(["notice"])
@@ -28,9 +28,9 @@
":generator",
":names",
":output",
- "//upbc:file_layout",
- "@com_google_protobuf//:protobuf",
- "@com_google_protobuf//src/google/protobuf/compiler:code_generator",
+ "//:protobuf",
+ "//src/google/protobuf/compiler:code_generator",
+ "//upb/upbc:file_layout",
],
)
@@ -55,13 +55,13 @@
":gen_utils",
":names",
":output",
- "//upbc:common",
- "//upbc:file_layout",
- "//upbc:keywords",
- "//upbc:names",
+ "//:protobuf",
+ "//upb/upbc:common",
+ "//upb/upbc:file_layout",
+ "//upb/upbc:keywords",
+ "//upb/upbc:names",
"@com_google_absl//absl/container:flat_hash_set",
"@com_google_absl//absl/strings",
- "@com_google_protobuf//:protobuf",
],
)
@@ -71,9 +71,9 @@
hdrs = ["output.h"],
visibility = ["//visibility:private"],
deps = [
+ "//:protobuf",
"@com_google_absl//absl/log:absl_log",
"@com_google_absl//absl/strings",
- "@com_google_protobuf//:protobuf",
],
)
@@ -83,9 +83,9 @@
hdrs = ["gen_utils.h"],
visibility = ["//visibility:public"],
deps = [
+ "//:protobuf",
+ "//src/google/protobuf/compiler:code_generator",
"@com_google_absl//absl/strings",
- "@com_google_protobuf//:protobuf",
- "@com_google_protobuf//src/google/protobuf/compiler:code_generator",
],
)
@@ -96,6 +96,6 @@
visibility = ["//visibility:private"],
deps = [
":output",
- "//upbc:keywords",
+ "//upb/upbc:keywords",
],
)
diff --git a/upb/protos_generator/gen_accessors.cc b/upb/protos_generator/gen_accessors.cc
index 9db49da..f2bfeab 100644
--- a/upb/protos_generator/gen_accessors.cc
+++ b/upb/protos_generator/gen_accessors.cc
@@ -28,7 +28,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "protos_generator/gen_accessors.h"
+#include "upb/protos_generator/gen_accessors.h"
#include <string>
@@ -37,13 +37,13 @@
#include "absl/strings/str_cat.h"
#include "absl/strings/string_view.h"
#include "google/protobuf/descriptor.h"
-#include "protos_generator/gen_repeated_fields.h"
-#include "protos_generator/gen_utils.h"
-#include "protos_generator/names.h"
-#include "protos_generator/output.h"
-#include "upbc/common.h"
-#include "upbc/keywords.h"
-#include "upbc/names.h"
+#include "upb/protos_generator/gen_repeated_fields.h"
+#include "upb/protos_generator/gen_utils.h"
+#include "upb/protos_generator/names.h"
+#include "upb/protos_generator/output.h"
+#include "upb/upbc/common.h"
+#include "upb/upbc/keywords.h"
+#include "upb/upbc/names.h"
namespace protos_generator {
diff --git a/upb/protos_generator/gen_accessors.h b/upb/protos_generator/gen_accessors.h
index 8372fc3..23e098f 100644
--- a/upb/protos_generator/gen_accessors.h
+++ b/upb/protos_generator/gen_accessors.h
@@ -32,8 +32,8 @@
#define UPB_PROTOS_GENERATOR_ACCESSORS_H_
#include "google/protobuf/descriptor.h"
-#include "protos_generator/gen_utils.h"
-#include "protos_generator/output.h"
+#include "upb/protos_generator/gen_utils.h"
+#include "upb/protos_generator/output.h"
namespace protos_generator {
diff --git a/upb/protos_generator/gen_enums.cc b/upb/protos_generator/gen_enums.cc
index 7c535a7..ceea05c 100644
--- a/upb/protos_generator/gen_enums.cc
+++ b/upb/protos_generator/gen_enums.cc
@@ -28,7 +28,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "protos_generator/gen_enums.h"
+#include "upb/protos_generator/gen_enums.h"
#include <algorithm>
#include <limits>
@@ -37,8 +37,8 @@
#include "google/protobuf/descriptor.pb.h"
#include "google/protobuf/descriptor.h"
-#include "protos_generator/gen_utils.h"
-#include "protos_generator/names.h"
+#include "upb/protos_generator/gen_utils.h"
+#include "upb/protos_generator/names.h"
namespace protos_generator {
diff --git a/upb/protos_generator/gen_enums.h b/upb/protos_generator/gen_enums.h
index 6078762..fa7cccd 100644
--- a/upb/protos_generator/gen_enums.h
+++ b/upb/protos_generator/gen_enums.h
@@ -32,7 +32,7 @@
#define UPB_PROTOS_GENERATOR_ENUMS_H_
#include "google/protobuf/descriptor.h"
-#include "protos_generator/output.h"
+#include "upb/protos_generator/output.h"
namespace protos_generator {
diff --git a/upb/protos_generator/gen_extensions.cc b/upb/protos_generator/gen_extensions.cc
index be0cbc5..ae4030c 100644
--- a/upb/protos_generator/gen_extensions.cc
+++ b/upb/protos_generator/gen_extensions.cc
@@ -28,11 +28,11 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "protos_generator/gen_extensions.h"
+#include "upb/protos_generator/gen_extensions.h"
#include "absl/strings/str_cat.h"
-#include "protos_generator/gen_utils.h"
-#include "protos_generator/names.h"
+#include "upb/protos_generator/gen_utils.h"
+#include "upb/protos_generator/names.h"
namespace protos_generator {
diff --git a/upb/protos_generator/gen_extensions.h b/upb/protos_generator/gen_extensions.h
index 8ec740a..85d1a9a 100644
--- a/upb/protos_generator/gen_extensions.h
+++ b/upb/protos_generator/gen_extensions.h
@@ -32,7 +32,7 @@
#define UPB_PROTOS_GENERATOR_GEN_EXTENSIONS_H_
#include "google/protobuf/descriptor.h"
-#include "protos_generator/output.h"
+#include "upb/protos_generator/output.h"
namespace protos_generator {
diff --git a/upb/protos_generator/gen_messages.cc b/upb/protos_generator/gen_messages.cc
index ca75ba7..716562c 100644
--- a/upb/protos_generator/gen_messages.cc
+++ b/upb/protos_generator/gen_messages.cc
@@ -28,7 +28,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "protos_generator/gen_messages.h"
+#include "upb/protos_generator/gen_messages.h"
#include <string>
#include <vector>
@@ -36,14 +36,14 @@
#include "google/protobuf/descriptor.pb.h"
#include "absl/strings/str_cat.h"
#include "google/protobuf/descriptor.h"
-#include "protos_generator/gen_accessors.h"
-#include "protos_generator/gen_enums.h"
-#include "protos_generator/gen_extensions.h"
-#include "protos_generator/gen_utils.h"
-#include "protos_generator/names.h"
-#include "protos_generator/output.h"
-#include "upbc/common.h"
-#include "upbc/file_layout.h"
+#include "upb/protos_generator/gen_accessors.h"
+#include "upb/protos_generator/gen_enums.h"
+#include "upb/protos_generator/gen_extensions.h"
+#include "upb/protos_generator/gen_utils.h"
+#include "upb/protos_generator/names.h"
+#include "upb/protos_generator/output.h"
+#include "upb/upbc/common.h"
+#include "upb/upbc/file_layout.h"
namespace protos_generator {
diff --git a/upb/protos_generator/gen_messages.h b/upb/protos_generator/gen_messages.h
index 3236964..97813cf 100644
--- a/upb/protos_generator/gen_messages.h
+++ b/upb/protos_generator/gen_messages.h
@@ -32,7 +32,7 @@
#define UPB_PROTOS_GENERATOR_GEN_MESSAGES_H_
#include "google/protobuf/descriptor.h"
-#include "protos_generator/output.h"
+#include "upb/protos_generator/output.h"
namespace protos_generator {
namespace protobuf = ::google::protobuf;
diff --git a/upb/protos_generator/gen_repeated_fields.cc b/upb/protos_generator/gen_repeated_fields.cc
index d5b4bab..3c962ac 100644
--- a/upb/protos_generator/gen_repeated_fields.cc
+++ b/upb/protos_generator/gen_repeated_fields.cc
@@ -27,7 +27,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "protos_generator/gen_repeated_fields.h"
+#include "upb/protos_generator/gen_repeated_fields.h"
#include <string>
#include <vector>
@@ -35,15 +35,15 @@
#include "google/protobuf/descriptor.pb.h"
#include "absl/strings/string_view.h"
#include "google/protobuf/descriptor.h"
-#include "protos_generator/gen_accessors.h"
-#include "protos_generator/gen_enums.h"
-#include "protos_generator/gen_extensions.h"
-#include "protos_generator/gen_utils.h"
-#include "protos_generator/names.h"
-#include "protos_generator/output.h"
-#include "upbc/common.h"
-#include "upbc/file_layout.h"
-#include "upbc/names.h"
+#include "upb/protos_generator/gen_accessors.h"
+#include "upb/protos_generator/gen_enums.h"
+#include "upb/protos_generator/gen_extensions.h"
+#include "upb/protos_generator/gen_utils.h"
+#include "upb/protos_generator/names.h"
+#include "upb/protos_generator/output.h"
+#include "upb/upbc/common.h"
+#include "upb/upbc/file_layout.h"
+#include "upb/upbc/names.h"
namespace protos_generator {
namespace protobuf = ::google::protobuf;
diff --git a/upb/protos_generator/gen_repeated_fields.h b/upb/protos_generator/gen_repeated_fields.h
index 1650eb0..5902a5d 100644
--- a/upb/protos_generator/gen_repeated_fields.h
+++ b/upb/protos_generator/gen_repeated_fields.h
@@ -33,7 +33,7 @@
#include "absl/strings/string_view.h"
#include "google/protobuf/descriptor.h"
-#include "protos_generator/output.h"
+#include "upb/protos_generator/output.h"
namespace protos_generator {
namespace protobuf = ::google::protobuf;
diff --git a/upb/protos_generator/gen_utils.cc b/upb/protos_generator/gen_utils.cc
index 79dd5a1..7c59d7f 100644
--- a/upb/protos_generator/gen_utils.cc
+++ b/upb/protos_generator/gen_utils.cc
@@ -28,7 +28,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "protos_generator/gen_utils.h"
+#include "upb/protos_generator/gen_utils.h"
#include <algorithm>
#include <string>
diff --git a/upb/protos_generator/names.cc b/upb/protos_generator/names.cc
index eb3fbee..c1c3d8e 100644
--- a/upb/protos_generator/names.cc
+++ b/upb/protos_generator/names.cc
@@ -28,11 +28,11 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "protos_generator/names.h"
+#include "upb/protos_generator/names.h"
#include <string>
-#include "upbc/keywords.h"
+#include "upb/upbc/keywords.h"
namespace protos_generator {
diff --git a/upb/protos_generator/names.h b/upb/protos_generator/names.h
index efa01ce..4578703 100644
--- a/upb/protos_generator/names.h
+++ b/upb/protos_generator/names.h
@@ -34,7 +34,7 @@
#include <string>
#include "google/protobuf/descriptor.pb.h"
-#include "protos_generator/output.h"
+#include "upb/protos_generator/output.h"
namespace protos_generator {
diff --git a/upb/protos_generator/output.cc b/upb/protos_generator/output.cc
index 72cd4e5..67a33b3 100644
--- a/upb/protos_generator/output.cc
+++ b/upb/protos_generator/output.cc
@@ -28,7 +28,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "protos_generator/output.h"
+#include "upb/protos_generator/output.h"
#include <string>
diff --git a/upb/protos_generator/protoc-gen-upb-protos.cc b/upb/protos_generator/protoc-gen-upb-protos.cc
index 58c3712..7907ed5 100644
--- a/upb/protos_generator/protoc-gen-upb-protos.cc
+++ b/upb/protos_generator/protoc-gen-upb-protos.cc
@@ -34,13 +34,13 @@
#include "google/protobuf/compiler/code_generator.h"
#include "google/protobuf/compiler/plugin.h"
#include "google/protobuf/descriptor.h"
-#include "protos_generator/gen_enums.h"
-#include "protos_generator/gen_extensions.h"
-#include "protos_generator/gen_messages.h"
-#include "protos_generator/gen_utils.h"
-#include "protos_generator/names.h"
-#include "protos_generator/output.h"
-#include "upbc/file_layout.h"
+#include "upb/protos_generator/gen_enums.h"
+#include "upb/protos_generator/gen_extensions.h"
+#include "upb/protos_generator/gen_messages.h"
+#include "upb/protos_generator/gen_utils.h"
+#include "upb/protos_generator/names.h"
+#include "upb/protos_generator/output.h"
+#include "upb/upbc/file_layout.h"
namespace protos_generator {
namespace {
@@ -138,9 +138,9 @@
#ifndef $0_UPB_PROTO_H_
#define $0_UPB_PROTO_H_
-#include "protos/protos.h"
-#include "protos/protos_internal.h"
-#include "protos/repeated_field.h"
+#include "upb/protos/protos.h"
+#include "upb/protos/protos_internal.h"
+#include "upb/protos/repeated_field.h"
#include "absl/strings/string_view.h"
#include "absl/status/statusor.h"
@@ -158,7 +158,7 @@
}
}
- output("#include \"upb/port/def.inc\"\n");
+ output("#include \"upb/upb/port/def.inc\"\n");
const std::vector<const protobuf::Descriptor*> this_file_messages =
SortedMessages(file);
@@ -190,7 +190,7 @@
WriteEndNamespace(file, output);
- output("\n#include \"upb/port/undef.inc\"\n\n");
+ output("\n#include \"upb/upb/port/undef.inc\"\n\n");
// End of "C" section.
output("#endif /* $0_UPB_PROTO_H_ */\n", ToPreproc(file->name()));
@@ -205,7 +205,7 @@
R"cc(
#include <stddef.h>
#include "absl/strings/string_view.h"
-#include "protos/protos.h"
+#include "upb/protos/protos.h"
#include "$0"
)cc",
CppHeaderFilename(file));
@@ -213,7 +213,7 @@
for (int i = 0; i < file->dependency_count(); i++) {
output("#include \"$0\"\n", CppHeaderFilename(file->dependency(i)));
}
- output("#include \"upb/port/def.inc\"\n");
+ output("#include \"upb/upb/port/def.inc\"\n");
WriteStartNamespace(file, output);
WriteMessageImplementations(file, output);
@@ -222,7 +222,7 @@
WriteExtensionIdentifiers(this_file_exts, output);
WriteEndNamespace(file, output);
- output("#include \"upb/port/undef.inc\"\n\n");
+ output("#include \"upb/upb/port/undef.inc\"\n\n");
}
void WriteMessageImplementations(const protobuf::FileDescriptor* file,
diff --git a/upb/protos_generator/tests/BUILD b/upb/protos_generator/tests/BUILD
index 33f95be..dfc80b4 100644
--- a/upb/protos_generator/tests/BUILD
+++ b/upb/protos_generator/tests/BUILD
@@ -6,15 +6,15 @@
# https://developers.google.com/open-source/licenses/bsd
load(
- "//bazel:build_defs.bzl",
+ "//upb/bazel:build_defs.bzl",
"UPB_DEFAULT_CPPOPTS",
)
load(
- "//bazel:upb_proto_library.bzl",
+ "//upb/bazel:upb_proto_library.bzl",
"upb_proto_library",
)
load(
- "//protos/bazel:upb_cc_proto_library.bzl",
+ "//upb/protos/bazel:upb_cc_proto_library.bzl",
"upb_cc_proto_library",
)
load(
@@ -23,7 +23,7 @@
)
# begin:google_only
-# package(default_applicable_licenses = ["//:license"])
+# package(default_applicable_licenses = ["//upb:license"])
# end:google_only
licenses(["notice"])
@@ -63,14 +63,14 @@
upb_proto_library(
name = "test_model_upb_proto",
visibility = [
- "//protos:__pkg__",
+ "//upb/protos:__pkg__",
],
deps = [":test_model_proto"],
)
upb_cc_proto_library(
name = "test_model_upb_cc_proto",
- visibility = ["//protos:__pkg__"],
+ visibility = ["//upb/protos:__pkg__"],
deps = [":test_model_proto"],
)
@@ -133,8 +133,8 @@
"@com_google_googletest//:gtest_main",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",
- "//protos",
- "//:mem",
- "//protos:repeated_field",
+ "//upb/protos",
+ "//upb:mem",
+ "//upb/protos:repeated_field",
],
)
diff --git a/upb/protos_generator/tests/child_model.proto b/upb/protos_generator/tests/child_model.proto
index c7af6f1..79589cc 100644
--- a/upb/protos_generator/tests/child_model.proto
+++ b/upb/protos_generator/tests/child_model.proto
@@ -32,7 +32,7 @@
package protos_generator.test;
-import public "protos_generator/tests/test_enum.proto";
+import public "upb/protos_generator/tests/test_enum.proto";
message ChildModel1 {
optional bool child_b1 = 44;
diff --git a/upb/protos_generator/tests/no_package_enum_user.proto b/upb/protos_generator/tests/no_package_enum_user.proto
index ebf8c67..e34c7fe 100644
--- a/upb/protos_generator/tests/no_package_enum_user.proto
+++ b/upb/protos_generator/tests/no_package_enum_user.proto
@@ -32,7 +32,7 @@
package protos_generator.tests;
-import "protos_generator/tests/no_package.proto";
+import "upb/protos_generator/tests/no_package.proto";
// option java_multiple_files = true;
diff --git a/upb/protos_generator/tests/test_extension.proto b/upb/protos_generator/tests/test_extension.proto
index 3a1a3c6..17f7131 100644
--- a/upb/protos_generator/tests/test_extension.proto
+++ b/upb/protos_generator/tests/test_extension.proto
@@ -32,7 +32,7 @@
package protos_generator.test.someotherpackage;
-import "protos_generator/tests/test_model.proto";
+import "upb/protos_generator/tests/test_model.proto";
// Define extension that is extending proto outside this package with a type
// defined in different file.
diff --git a/upb/protos_generator/tests/test_generated.cc b/upb/protos_generator/tests/test_generated.cc
index 96345c6..4bd3a7a 100644
--- a/upb/protos_generator/tests/test_generated.cc
+++ b/upb/protos_generator/tests/test_generated.cc
@@ -38,13 +38,13 @@
#include "gtest/gtest.h"
#include "absl/status/statusor.h"
#include "absl/strings/string_view.h"
-#include "protos/protos.h"
-#include "protos/repeated_field.h"
-#include "protos/repeated_field_iterator.h"
-#include "protos_generator/tests/child_model.upb.proto.h"
-#include "protos_generator/tests/no_package.upb.proto.h"
-#include "protos_generator/tests/test_model.upb.proto.h"
-#include "upb/mem/arena.h"
+#include "upb/protos/protos.h"
+#include "upb/protos/repeated_field.h"
+#include "upb/protos/repeated_field_iterator.h"
+#include "upb/protos_generator/tests/child_model.upb.proto.h"
+#include "upb/protos_generator/tests/no_package.upb.proto.h"
+#include "upb/protos_generator/tests/test_model.upb.proto.h"
+#include "upb/upb/mem/arena.h"
namespace {
diff --git a/upb/protos_generator/tests/test_model.proto b/upb/protos_generator/tests/test_model.proto
index e133624..89372f5 100644
--- a/upb/protos_generator/tests/test_model.proto
+++ b/upb/protos_generator/tests/test_model.proto
@@ -32,7 +32,7 @@
package protos_generator.test;
-import "protos_generator/tests/child_model.proto";
+import "upb/protos_generator/tests/child_model.proto";
message TestModelContainer {
repeated TestModel models = 1;
diff --git a/upb/python/BUILD b/upb/python/BUILD
index a050b6c..8987b0d 100644
--- a/upb/python/BUILD
+++ b/upb/python/BUILD
@@ -5,10 +5,10 @@
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
-load("//python:py_extension.bzl", "py_extension")
+load("//upb/python:py_extension.bzl", "py_extension")
load("@bazel_skylib//lib:selects.bzl", "selects")
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag", "string_flag")
-load("//bazel:build_defs.bzl", "UPB_DEFAULT_COPTS")
+load("//upb/bazel:build_defs.bzl", "UPB_DEFAULT_COPTS")
# begin:github_only
load("@rules_pkg//:mappings.bzl", "pkg_files")
@@ -18,9 +18,9 @@
package(
# begin:google_only
-# default_applicable_licenses = ["//:license"],
+# default_applicable_licenses = ["//upb:license"],
# end:google_only
- default_visibility = ["//python/dist:__pkg__"],
+ default_visibility = ["//upb/python/dist:__pkg__"],
)
LIMITED_API_FLAG_SELECT = {
@@ -214,18 +214,18 @@
],
target_compatible_with = select(_message_target_compatible_with),
deps = [
- "//:collections",
- "//:descriptor_upb_proto_reflection",
- "//:eps_copy_input_stream",
- "//:hash",
- "//:message_copy",
- "//:port",
- "//:reflection",
- "//:text",
- "//:wire_reader",
- "//:wire_types",
- "//upb/util:compare",
- "//upb/util:def_to_proto",
- "//upb/util:required_fields",
+ "//upb:collections",
+ "//upb:descriptor_upb_proto_reflection",
+ "//upb:eps_copy_input_stream",
+ "//upb:hash",
+ "//upb:message_copy",
+ "//upb:port",
+ "//upb:reflection",
+ "//upb:text",
+ "//upb:wire_reader",
+ "//upb:wire_types",
+ "//upb/upb/util:compare",
+ "//upb/upb/util:def_to_proto",
+ "//upb/upb/util:required_fields",
],
)
diff --git a/upb/python/convert.c b/upb/python/convert.c
index 98d9b75..f26324c 100644
--- a/upb/python/convert.c
+++ b/upb/python/convert.c
@@ -28,16 +28,16 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "python/convert.h"
+#include "upb/python/convert.h"
-#include "python/message.h"
-#include "python/protobuf.h"
-#include "upb/collections/map.h"
-#include "upb/reflection/message.h"
-#include "upb/util/compare.h"
+#include "upb/python/message.h"
+#include "upb/python/protobuf.h"
+#include "upb/upb/collections/map.h"
+#include "upb/upb/reflection/message.h"
+#include "upb/upb/util/compare.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
PyObject* PyUpb_UpbToPy(upb_MessageValue val, const upb_FieldDef* f,
PyObject* arena) {
@@ -443,4 +443,4 @@
kUpb_UnknownCompareResult_Equal;
}
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
diff --git a/upb/python/convert.h b/upb/python/convert.h
index 1c594d3..8233f7e 100644
--- a/upb/python/convert.h
+++ b/upb/python/convert.h
@@ -32,8 +32,8 @@
#define PYUPB_CONVERT_H__
#include "protobuf.h"
-#include "upb/reflection/def.h"
-#include "upb/reflection/message.h"
+#include "upb/upb/reflection/def.h"
+#include "upb/upb/reflection/message.h"
// Converts `val` to a Python object according to the type information in `f`.
// Any newly-created Python objects that reference non-primitive data from `val`
diff --git a/upb/python/descriptor.c b/upb/python/descriptor.c
index 6697199..85cd777 100644
--- a/upb/python/descriptor.c
+++ b/upb/python/descriptor.c
@@ -28,15 +28,15 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "python/descriptor.h"
+#include "upb/python/descriptor.h"
-#include "python/convert.h"
-#include "python/descriptor_containers.h"
-#include "python/descriptor_pool.h"
-#include "python/message.h"
-#include "python/protobuf.h"
-#include "upb/reflection/def.h"
-#include "upb/util/def_to_proto.h"
+#include "upb/python/convert.h"
+#include "upb/python/descriptor_containers.h"
+#include "upb/python/descriptor_pool.h"
+#include "upb/python/message.h"
+#include "upb/python/protobuf.h"
+#include "upb/upb/reflection/def.h"
+#include "upb/upb/util/def_to_proto.h"
// -----------------------------------------------------------------------------
// DescriptorBase
diff --git a/upb/python/descriptor.h b/upb/python/descriptor.h
index 7fa0164..14cdfad 100644
--- a/upb/python/descriptor.h
+++ b/upb/python/descriptor.h
@@ -33,8 +33,8 @@
#include <stdbool.h>
-#include "python/python_api.h"
-#include "upb/reflection/def.h"
+#include "upb/python/python_api.h"
+#include "upb/upb/reflection/def.h"
typedef enum {
kPyUpb_Descriptor = 0,
diff --git a/upb/python/descriptor_containers.c b/upb/python/descriptor_containers.c
index e1eacb2..7aeafc5 100644
--- a/upb/python/descriptor_containers.c
+++ b/upb/python/descriptor_containers.c
@@ -28,11 +28,11 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "python/descriptor_containers.h"
+#include "upb/python/descriptor_containers.h"
-#include "python/descriptor.h"
-#include "python/protobuf.h"
-#include "upb/reflection/def.h"
+#include "upb/python/descriptor.h"
+#include "upb/python/protobuf.h"
+#include "upb/upb/reflection/def.h"
// Implements __repr__ as str(dict(self)).
static PyObject* PyUpb_DescriptorMap_Repr(PyObject* _self) {
diff --git a/upb/python/descriptor_containers.h b/upb/python/descriptor_containers.h
index 5b2b1fa..004607b 100644
--- a/upb/python/descriptor_containers.h
+++ b/upb/python/descriptor_containers.h
@@ -46,7 +46,7 @@
#include <stdbool.h>
#include "protobuf.h"
-#include "upb/reflection/def.h"
+#include "upb/upb/reflection/def.h"
// -----------------------------------------------------------------------------
// PyUpb_GenericSequence
diff --git a/upb/python/descriptor_pool.c b/upb/python/descriptor_pool.c
index ee41677..db95259 100644
--- a/upb/python/descriptor_pool.c
+++ b/upb/python/descriptor_pool.c
@@ -28,15 +28,15 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "python/descriptor_pool.h"
+#include "upb/python/descriptor_pool.h"
#include "google/protobuf/descriptor.upbdefs.h"
-#include "python/convert.h"
-#include "python/descriptor.h"
-#include "python/message.h"
-#include "python/protobuf.h"
-#include "upb/reflection/def.h"
-#include "upb/util/def_to_proto.h"
+#include "upb/python/convert.h"
+#include "upb/python/descriptor.h"
+#include "upb/python/message.h"
+#include "upb/python/protobuf.h"
+#include "upb/upb/reflection/def.h"
+#include "upb/upb/util/def_to_proto.h"
// -----------------------------------------------------------------------------
// DescriptorPool
diff --git a/upb/python/dist/BUILD.bazel b/upb/python/dist/BUILD.bazel
index f946f3d..512594e 100644
--- a/upb/python/dist/BUILD.bazel
+++ b/upb/python/dist/BUILD.bazel
@@ -5,10 +5,10 @@
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
-load("//bazel:py_proto_library.bzl", "py_proto_library")
+load("//upb/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_PYTHON_VERSION")
+load("//:protobuf_version.bzl", "PROTOBUF_PYTHON_VERSION")
load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix")
load("@rules_pkg//:pkg.bzl", "pkg_tar")
load("@rules_python//python:packaging.bzl", "py_wheel")
@@ -18,36 +18,36 @@
py_dist_module(
name = "message_mod",
- extension = "//python:_message_binary",
+ extension = "//upb/python:_message_binary",
module_name = "google._upb._message",
)
py_proto_library(
name = "well_known_proto_py_pb2",
deps = [
- "@com_google_protobuf//:any_proto",
- "@com_google_protobuf//:api_proto",
- "@com_google_protobuf//:descriptor_proto",
- "@com_google_protobuf//:duration_proto",
- "@com_google_protobuf//:empty_proto",
- "@com_google_protobuf//:field_mask_proto",
- "@com_google_protobuf//:source_context_proto",
- "@com_google_protobuf//:struct_proto",
- "@com_google_protobuf//:timestamp_proto",
- "@com_google_protobuf//:type_proto",
- "@com_google_protobuf//:wrappers_proto",
+ "//:any_proto",
+ "//:api_proto",
+ "//:descriptor_proto",
+ "//:duration_proto",
+ "//:empty_proto",
+ "//:field_mask_proto",
+ "//:source_context_proto",
+ "//:struct_proto",
+ "//:timestamp_proto",
+ "//:type_proto",
+ "//:wrappers_proto",
],
)
py_proto_library(
name = "plugin_py_pb2",
- deps = ["@com_google_protobuf//:compiler_plugin_proto"],
+ deps = ["//:compiler_plugin_proto"],
)
config_setting(
name = "linux_aarch64_release",
flag_values = {
- "@com_google_protobuf//toolchain:release": "True",
+ "//toolchain:release": "True",
},
values = {"cpu": "linux-aarch_64"},
)
@@ -59,14 +59,14 @@
"@platforms//cpu:aarch64",
],
flag_values = {
- "@com_google_protobuf//toolchain:release": "False",
+ "//toolchain:release": "False",
},
)
config_setting(
name = "linux_x86_64_release",
flag_values = {
- "@com_google_protobuf//toolchain:release": "True",
+ "//toolchain:release": "True",
},
values = {"cpu": "linux-x86_64"},
)
@@ -78,14 +78,14 @@
"@platforms//cpu:x86_64",
],
flag_values = {
- "@com_google_protobuf//toolchain:release": "False",
+ "//toolchain:release": "False",
},
)
config_setting(
name = "osx_x86_64_release",
flag_values = {
- "@com_google_protobuf//toolchain:release": "True",
+ "//toolchain:release": "True",
},
values = {"cpu": "osx-x86_64"},
)
@@ -97,7 +97,7 @@
"@platforms//cpu:x86_64",
],
flag_values = {
- "@com_google_protobuf//toolchain:release": "False",
+ "//toolchain:release": "False",
},
)
@@ -112,7 +112,7 @@
config_setting(
name = "osx_aarch64_release",
flag_values = {
- "@com_google_protobuf//toolchain:release": "True",
+ "//toolchain:release": "True",
},
values = {"cpu": "osx-aarch_64"},
)
@@ -124,7 +124,7 @@
"@platforms//cpu:aarch64",
],
flag_values = {
- "@com_google_protobuf//toolchain:release": "False",
+ "//toolchain:release": "False",
},
)
@@ -144,7 +144,7 @@
config_setting(
name = "windows_x86_32_release",
flag_values = {
- "@com_google_protobuf//toolchain:release": "True",
+ "//toolchain:release": "True",
},
values = {"cpu": "win32"},
)
@@ -156,7 +156,7 @@
"@platforms//cpu:x86_32",
],
flag_values = {
- "@com_google_protobuf//toolchain:release": "False",
+ "//toolchain:release": "False",
},
)
@@ -171,7 +171,7 @@
config_setting(
name = "windows_x86_64_release",
flag_values = {
- "@com_google_protobuf//toolchain:release": "True",
+ "//toolchain:release": "True",
},
values = {"cpu": "win64"},
)
@@ -183,7 +183,7 @@
"@platforms//cpu:x86_64",
],
flag_values = {
- "@com_google_protobuf//toolchain:release": "False",
+ "//toolchain:release": "False",
},
)
@@ -199,8 +199,8 @@
name = "generated_wkt",
srcs = [
":well_known_proto_py_pb2",
- "//:descriptor_upb_proto",
- "//:descriptor_upb_proto_reflection",
+ "//upb:descriptor_upb_proto",
+ "//upb:descriptor_upb_proto_reflection",
],
prefix = "google/protobuf",
)
@@ -233,21 +233,21 @@
pkg_files(
name = "filegroup_source_files",
srcs = [
- "//:LICENSE",
- "//:source_files",
- "//python:message_srcs",
- "//upb/base:source_files",
- "//upb/collections:source_files",
- "//upb/hash:source_files",
- "//upb/lex:source_files",
- "//upb/mem:source_files",
- "//upb/message:source_files",
- "//upb/mini_descriptor:source_files",
- "//upb/mini_table:source_files",
- "//upb/port:source_files",
- "//upb/text:source_files",
- "//upb/util:source_files",
- "//upb/wire:source_files",
+ "//upb:LICENSE",
+ "//upb:source_files",
+ "//upb/python:message_srcs",
+ "//upb/upb/base:source_files",
+ "//upb/upb/collections:source_files",
+ "//upb/upb/hash:source_files",
+ "//upb/upb/lex:source_files",
+ "//upb/upb/mem:source_files",
+ "//upb/upb/message:source_files",
+ "//upb/upb/mini_descriptor:source_files",
+ "//upb/upb/mini_table:source_files",
+ "//upb/upb/port:source_files",
+ "//upb/upb/text:source_files",
+ "//upb/upb/util:source_files",
+ "//upb/upb/wire:source_files",
],
strip_prefix = strip_prefix.from_root(""),
)
@@ -262,7 +262,7 @@
":generated_wkt",
":generated_wkt_compiler",
":utf8_range_source_files",
- "@com_google_protobuf//python:python_source_files",
+ "//python:python_source_files",
],
extension = "tar.gz",
package_dir = "protobuf",
@@ -295,9 +295,9 @@
py_wheel(
name = "binary_wheel",
abi = select({
- "//python:full_api_3.7": "cp37m",
- "//python:full_api_3.8": "cp38",
- "//python:full_api_3.9": "cp39",
+ "//upb/python:full_api_3.7": "cp37m",
+ "//upb/python:full_api_3.8": "cp38",
+ "//upb/python:full_api_3.9": "cp39",
"//conditions:default": "abi3",
}),
author = "protobuf@googlegroups.com",
@@ -312,7 +312,7 @@
],
distribution = "protobuf",
extra_distinfo_files = {
- "//:LICENSE": "LICENSE",
+ "//upb:LICENSE": "LICENSE",
},
homepage = "https://developers.google.com/protocol-buffers/",
license = "3-Clause BSD License",
@@ -329,10 +329,10 @@
}),
python_requires = ">=3.7",
python_tag = selects.with_or({
- ("//python:limited_api_3.7", "//python:full_api_3.7"): "cp37",
- "//python:full_api_3.8": "cp38",
- "//python:full_api_3.9": "cp39",
- "//python:limited_api_3.10": "cp310",
+ ("//upb/python:limited_api_3.7", "//upb/python:full_api_3.7"): "cp37",
+ "//upb/python:full_api_3.8": "cp38",
+ "//upb/python:full_api_3.9": "cp39",
+ "//upb/python:limited_api_3.10": "cp310",
"//conditions:default": "cp" + SYSTEM_PYTHON_VERSION,
}),
strip_path_prefixes = [
@@ -349,7 +349,7 @@
":message_mod",
":plugin_py_pb2",
":well_known_proto_py_pb2",
- "@com_google_protobuf//:python_srcs",
+ "//:python_srcs",
],
)
@@ -368,7 +368,7 @@
],
distribution = "protobuf",
extra_distinfo_files = {
- "//:LICENSE": "LICENSE",
+ "//upb:LICENSE": "LICENSE",
},
homepage = "https://developers.google.com/protocol-buffers/",
license = "3-Clause BSD License",
@@ -387,7 +387,7 @@
deps = [
":plugin_py_pb2",
":well_known_proto_py_pb2",
- "@com_google_protobuf//:python_srcs",
+ "//:python_srcs",
],
)
@@ -397,7 +397,7 @@
abi = "none",
distribution = "protobuftests",
extra_distinfo_files = {
- "//:LICENSE": "LICENSE",
+ "//upb:LICENSE": "LICENSE",
},
platform = "any",
python_tag = "py3",
@@ -411,11 +411,11 @@
}),
version = PROTOBUF_PYTHON_VERSION,
deps = [
- "//python/pb_unit_tests:test_files",
- "@com_google_protobuf//:python_common_test_protos",
- "@com_google_protobuf//:python_specific_test_protos",
- "@com_google_protobuf//:python_test_srcs",
- "@com_google_protobuf//src/google/protobuf:testdata",
+ "//:python_common_test_protos",
+ "//:python_specific_test_protos",
+ "//:python_test_srcs",
+ "//src/google/protobuf:testdata",
+ "//upb/python/pb_unit_tests:test_files",
],
)
diff --git a/upb/python/dist/dist.bzl b/upb/python/dist/dist.bzl
index 75c21c3..3545fa9 100644
--- a/upb/python/dist/dist.bzl
+++ b/upb/python/dist/dist.bzl
@@ -121,8 +121,8 @@
mandatory = True,
cfg = _py_multiarch_transition,
),
- "_limited_api": attr.label(default = "//python:limited_api"),
- "_python_version": attr.label(default = "//python:python_version"),
+ "_limited_api": attr.label(default = "//upb/python:limited_api"),
+ "_python_version": attr.label(default = "//upb/python:python_version"),
"_allowlist_function_transition": attr.label(
default = "@bazel_tools//tools/allowlists/function_transition_allowlist",
),
@@ -142,16 +142,16 @@
for cpu, version in attr.limited_api_wheels.items():
transitions.append({
"//command_line_option:cpu": cpu,
- "//python:python_version": version,
- "//python:limited_api": True,
+ "//upb/python:python_version": version,
+ "//upb/python:limited_api": True,
})
for version in attr.full_api_versions:
for cpu in attr.full_api_cpus:
transitions.append({
"//command_line_option:cpu": cpu,
- "//python:python_version": version,
- "//python:limited_api": False,
+ "//upb/python:python_version": version,
+ "//upb/python:limited_api": False,
})
return transitions
@@ -161,8 +161,8 @@
inputs = [],
outputs = [
"//command_line_option:cpu",
- "//python:python_version",
- "//python:limited_api",
+ "//upb/python:python_version",
+ "//upb/python:limited_api",
],
)
diff --git a/upb/python/extension_dict.c b/upb/python/extension_dict.c
index d4b4dda..914957a 100644
--- a/upb/python/extension_dict.c
+++ b/upb/python/extension_dict.c
@@ -28,11 +28,11 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "python/extension_dict.h"
+#include "upb/python/extension_dict.h"
-#include "python/message.h"
-#include "python/protobuf.h"
-#include "upb/reflection/def.h"
+#include "upb/python/message.h"
+#include "upb/python/protobuf.h"
+#include "upb/upb/reflection/def.h"
// -----------------------------------------------------------------------------
// ExtensionDict
diff --git a/upb/python/extension_dict.h b/upb/python/extension_dict.h
index 99d2add..724054f 100644
--- a/upb/python/extension_dict.h
+++ b/upb/python/extension_dict.h
@@ -33,7 +33,7 @@
#include <stdbool.h>
-#include "python/python_api.h"
+#include "upb/python/python_api.h"
PyObject* PyUpb_ExtensionDict_New(PyObject* msg);
diff --git a/upb/python/map.c b/upb/python/map.c
index bd9022d..ec0133c 100644
--- a/upb/python/map.c
+++ b/upb/python/map.c
@@ -28,13 +28,13 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "python/map.h"
+#include "upb/python/map.h"
-#include "python/convert.h"
-#include "python/message.h"
-#include "python/protobuf.h"
-#include "upb/collections/map.h"
-#include "upb/reflection/def.h"
+#include "upb/python/convert.h"
+#include "upb/python/message.h"
+#include "upb/python/protobuf.h"
+#include "upb/upb/collections/map.h"
+#include "upb/upb/reflection/def.h"
// -----------------------------------------------------------------------------
// MapContainer
diff --git a/upb/python/map.h b/upb/python/map.h
index 6c2c47d..6a24068 100644
--- a/upb/python/map.h
+++ b/upb/python/map.h
@@ -33,8 +33,8 @@
#include <stdbool.h>
-#include "python/python_api.h"
-#include "upb/reflection/def.h"
+#include "upb/python/python_api.h"
+#include "upb/upb/reflection/def.h"
// Creates a new repeated field stub for field `f` of message object `parent`.
// Precondition: `parent` must be a stub.
diff --git a/upb/python/message.c b/upb/python/message.c
index 5a96980..7c4d1c6 100644
--- a/upb/python/message.c
+++ b/upb/python/message.c
@@ -28,18 +28,18 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "python/message.h"
+#include "upb/python/message.h"
-#include "python/convert.h"
-#include "python/descriptor.h"
-#include "python/extension_dict.h"
-#include "python/map.h"
-#include "python/repeated.h"
-#include "upb/message/copy.h"
-#include "upb/reflection/def.h"
-#include "upb/reflection/message.h"
-#include "upb/text/encode.h"
-#include "upb/util/required_fields.h"
+#include "upb/python/convert.h"
+#include "upb/python/descriptor.h"
+#include "upb/python/extension_dict.h"
+#include "upb/python/map.h"
+#include "upb/python/repeated.h"
+#include "upb/upb/message/copy.h"
+#include "upb/upb/reflection/def.h"
+#include "upb/upb/reflection/message.h"
+#include "upb/upb/text/encode.h"
+#include "upb/upb/util/required_fields.h"
static const upb_MessageDef* PyUpb_MessageMeta_GetMsgdef(PyObject* cls);
static PyObject* PyUpb_MessageMeta_GetAttr(PyObject* self, PyObject* name);
diff --git a/upb/python/message.h b/upb/python/message.h
index 885b5df..5773d9d 100644
--- a/upb/python/message.h
+++ b/upb/python/message.h
@@ -33,8 +33,8 @@
#include <stdbool.h>
-#include "python/protobuf.h"
-#include "upb/reflection/message.h"
+#include "upb/python/protobuf.h"
+#include "upb/upb/reflection/message.h"
// Removes the wrapper object for this field from the unset subobject cache.
void PyUpb_Message_CacheDelete(PyObject* _self, const upb_FieldDef* f);
diff --git a/upb/python/pb_unit_tests/BUILD b/upb/python/pb_unit_tests/BUILD
index 4c92a6b..8aecac9 100644
--- a/upb/python/pb_unit_tests/BUILD
+++ b/upb/python/pb_unit_tests/BUILD
@@ -11,7 +11,7 @@
# end:github_only
# begin:google_only
-# package(default_applicable_licenses = ["//:license"])
+# package(default_applicable_licenses = ["//upb:license"])
# end:google_only
licenses(["notice"])
@@ -41,8 +41,8 @@
main = "numpy_test_wrapper.py",
deps = [
requirement("numpy"),
- "@com_google_protobuf//python/google/protobuf/internal/numpy:numpy_test",
- "//python:_message",
+ "//python/google/protobuf/internal/numpy:numpy_test",
+ "//upb/python:_message",
],
target_compatible_with = select({
"@system_python//:supported": [],
@@ -79,6 +79,6 @@
name = "test_files",
srcs = glob(["*.py"]),
visibility = [
- "//python/dist:__pkg__", # Scheuklappen: keep
+ "//upb/python/dist:__pkg__", # Scheuklappen: keep
],
)
diff --git a/upb/python/pb_unit_tests/pyproto_test_wrapper.bzl b/upb/python/pb_unit_tests/pyproto_test_wrapper.bzl
index d5df8fc..a6a31b3 100644
--- a/upb/python/pb_unit_tests/pyproto_test_wrapper.bzl
+++ b/upb/python/pb_unit_tests/pyproto_test_wrapper.bzl
@@ -7,13 +7,13 @@
srcs = [src],
legacy_create_init = False,
main = src,
- data = ["@com_google_protobuf//src/google/protobuf:testdata"],
+ data = ["//src/google/protobuf:testdata"],
deps = [
- "//python:_message",
- "@com_google_protobuf//:python_common_test_protos",
- "@com_google_protobuf//:python_specific_test_protos",
- "@com_google_protobuf//:python_test_srcs",
- "@com_google_protobuf//:python_srcs",
+ "//upb/python:_message",
+ "//:python_common_test_protos",
+ "//:python_specific_test_protos",
+ "//:python_test_srcs",
+ "//:python_srcs",
] + deps,
target_compatible_with = select({
"@system_python//:supported": [],
diff --git a/upb/python/protobuf.c b/upb/python/protobuf.c
index 324b1ed..79b2e3f 100644
--- a/upb/python/protobuf.c
+++ b/upb/python/protobuf.c
@@ -28,16 +28,16 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "python/protobuf.h"
+#include "upb/python/protobuf.h"
-#include "python/descriptor.h"
-#include "python/descriptor_containers.h"
-#include "python/descriptor_pool.h"
-#include "python/extension_dict.h"
-#include "python/map.h"
-#include "python/message.h"
-#include "python/repeated.h"
-#include "python/unknown_fields.h"
+#include "upb/python/descriptor.h"
+#include "upb/python/descriptor_containers.h"
+#include "upb/python/descriptor_pool.h"
+#include "upb/python/extension_dict.h"
+#include "upb/python/map.h"
+#include "upb/python/message.h"
+#include "upb/python/repeated.h"
+#include "upb/python/unknown_fields.h"
static upb_Arena* PyUpb_NewArena(void);
diff --git a/upb/python/protobuf.h b/upb/python/protobuf.h
index 49f08b1..90e1dbd 100644
--- a/upb/python/protobuf.h
+++ b/upb/python/protobuf.h
@@ -33,9 +33,9 @@
#include <stdbool.h>
-#include "python/descriptor.h"
-#include "python/python_api.h"
-#include "upb/hash/int_table.h"
+#include "upb/python/descriptor.h"
+#include "upb/python/python_api.h"
+#include "upb/upb/hash/int_table.h"
// begin:github_only
#define PYUPB_PROTOBUF_PUBLIC_PACKAGE "google.protobuf"
diff --git a/upb/python/py_extension.bzl b/upb/python/py_extension.bzl
index 7b918bc..aafe846 100644
--- a/upb/python/py_extension.bzl
+++ b/upb/python/py_extension.bzl
@@ -18,24 +18,24 @@
copts = copts + ["-fvisibility=hidden"],
linkopts = selects.with_or({
(
- "//python/dist:osx_x86_64",
- "//python/dist:osx_aarch64",
+ "//upb/python/dist:osx_x86_64",
+ "//upb/python/dist:osx_aarch64",
): ["-undefined", "dynamic_lookup"],
- "//python/dist:windows_x86_32": ["-static-libgcc"],
+ "//upb/python/dist:windows_x86_32": ["-static-libgcc"],
"//conditions:default": [],
}),
linkshared = True,
linkstatic = True,
deps = deps + select({
- "//python:limited_api_3.7": ["@python-3.7.0//:python_headers"],
- "//python:full_api_3.7_win32": ["@nuget_python_i686_3.7.0//:python_full_api"],
- "//python:full_api_3.7_win64": ["@nuget_python_x86-64_3.7.0//:python_full_api"],
- "//python:full_api_3.8_win32": ["@nuget_python_i686_3.8.0//:python_full_api"],
- "//python:full_api_3.8_win64": ["@nuget_python_x86-64_3.8.0//:python_full_api"],
- "//python:full_api_3.9_win32": ["@nuget_python_i686_3.9.0//:python_full_api"],
- "//python:full_api_3.9_win64": ["@nuget_python_x86-64_3.9.0//:python_full_api"],
- "//python:limited_api_3.10_win32": ["@nuget_python_i686_3.10.0//:python_limited_api"],
- "//python:limited_api_3.10_win64": ["@nuget_python_x86-64_3.10.0//:python_limited_api"],
+ "//upb/python:limited_api_3.7": ["@python-3.7.0//:python_headers"],
+ "//upb/python:full_api_3.7_win32": ["@nuget_python_i686_3.7.0//:python_full_api"],
+ "//upb/python:full_api_3.7_win64": ["@nuget_python_x86-64_3.7.0//:python_full_api"],
+ "//upb/python:full_api_3.8_win32": ["@nuget_python_i686_3.8.0//:python_full_api"],
+ "//upb/python:full_api_3.8_win64": ["@nuget_python_x86-64_3.8.0//:python_full_api"],
+ "//upb/python:full_api_3.9_win32": ["@nuget_python_i686_3.9.0//:python_full_api"],
+ "//upb/python:full_api_3.9_win64": ["@nuget_python_x86-64_3.9.0//:python_full_api"],
+ "//upb/python:limited_api_3.10_win32": ["@nuget_python_i686_3.10.0//:python_limited_api"],
+ "//upb/python:limited_api_3.10_win64": ["@nuget_python_x86-64_3.10.0//:python_limited_api"],
"//conditions:default": ["@system_python//:python_headers"],
}),
**kwargs
@@ -49,12 +49,12 @@
srcs = [":" + name + "_binary"],
outs = [output_file],
cmd = "cp $< $@",
- visibility = ["//python:__subpackages__"],
+ visibility = ["//upb/python:__subpackages__"],
)
native.py_library(
name = name,
data = [output_file],
imports = ["."],
- visibility = ["//python:__subpackages__"],
+ visibility = ["//upb/python:__subpackages__"],
)
diff --git a/upb/python/repeated.c b/upb/python/repeated.c
index abb34e8..656b42c 100644
--- a/upb/python/repeated.c
+++ b/upb/python/repeated.c
@@ -28,11 +28,11 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "python/repeated.h"
+#include "upb/python/repeated.h"
-#include "python/convert.h"
-#include "python/message.h"
-#include "python/protobuf.h"
+#include "upb/python/convert.h"
+#include "upb/python/message.h"
+#include "upb/python/protobuf.h"
static PyObject* PyUpb_RepeatedCompositeContainer_Append(PyObject* _self,
PyObject* value);
diff --git a/upb/python/repeated.h b/upb/python/repeated.h
index 54670e7..413e4f1 100644
--- a/upb/python/repeated.h
+++ b/upb/python/repeated.h
@@ -33,8 +33,8 @@
#include <stdbool.h>
-#include "python/python_api.h"
-#include "upb/reflection/def.h"
+#include "upb/python/python_api.h"
+#include "upb/upb/reflection/def.h"
// Creates a new repeated field stub for field `f` of message object `parent`.
// Precondition: `parent` must be a stub.
diff --git a/upb/python/unknown_fields.c b/upb/python/unknown_fields.c
index f228f23..65a1383 100644
--- a/upb/python/unknown_fields.c
+++ b/upb/python/unknown_fields.c
@@ -28,13 +28,13 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "python/unknown_fields.h"
+#include "upb/python/unknown_fields.h"
-#include "python/message.h"
-#include "python/protobuf.h"
-#include "upb/wire/eps_copy_input_stream.h"
-#include "upb/wire/reader.h"
-#include "upb/wire/types.h"
+#include "upb/python/message.h"
+#include "upb/python/protobuf.h"
+#include "upb/upb/wire/eps_copy_input_stream.h"
+#include "upb/upb/wire/reader.h"
+#include "upb/upb/wire/types.h"
// -----------------------------------------------------------------------------
// UnknownFieldSet
diff --git a/upb/python/unknown_fields.h b/upb/python/unknown_fields.h
index 85ea40c..72bf2e9 100644
--- a/upb/python/unknown_fields.h
+++ b/upb/python/unknown_fields.h
@@ -33,7 +33,7 @@
#include <stdbool.h>
-#include "python/python_api.h"
+#include "upb/python/python_api.h"
PyObject* PyUpb_UnknownFields_New(PyObject* msg);
diff --git a/upb/upb/base/BUILD b/upb/upb/base/BUILD
index e345547..c64f9ad 100644
--- a/upb/upb/base/BUILD
+++ b/upb/upb/base/BUILD
@@ -5,7 +5,7 @@
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
-load("//bazel:build_defs.bzl", "UPB_DEFAULT_COPTS")
+load("//upb/bazel:build_defs.bzl", "UPB_DEFAULT_COPTS")
cc_library(
name = "base",
@@ -21,7 +21,7 @@
copts = UPB_DEFAULT_COPTS,
visibility = ["//visibility:public"],
deps = [
- "//:port",
+ "//upb:port",
],
)
@@ -32,7 +32,7 @@
],
copts = UPB_DEFAULT_COPTS,
visibility = ["//visibility:public"],
- deps = ["//:port"],
+ deps = ["//upb:port"],
)
# begin:github_only
@@ -46,8 +46,8 @@
],
),
visibility = [
- "//cmake:__pkg__",
- "//python/dist:__pkg__",
+ "//upb/cmake:__pkg__",
+ "//upb/python/dist:__pkg__",
]
)
# end:github_only
diff --git a/upb/upb/base/descriptor_constants.h b/upb/upb/base/descriptor_constants.h
index ee68d67..897bce5 100644
--- a/upb/upb/base/descriptor_constants.h
+++ b/upb/upb/base/descriptor_constants.h
@@ -32,7 +32,7 @@
#define UPB_BASE_DESCRIPTOR_CONSTANTS_H_
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
// The types a field can have. Note that this list is not identical to the
// types defined in descriptor.proto, which gives INT32 and SINT32 separate
@@ -102,6 +102,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_BASE_DESCRIPTOR_CONSTANTS_H_ */
diff --git a/upb/upb/base/internal/log2.h b/upb/upb/base/internal/log2.h
index 2f3256e..8a44150 100644
--- a/upb/upb/base/internal/log2.h
+++ b/upb/upb/base/internal/log2.h
@@ -32,7 +32,7 @@
#define UPB_BASE_LOG2_H_
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -55,6 +55,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_BASE_LOG2_H_ */
diff --git a/upb/upb/base/status.c b/upb/upb/base/status.c
index 576c957..716574e 100644
--- a/upb/upb/base/status.c
+++ b/upb/upb/base/status.c
@@ -28,7 +28,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/base/status.h"
+#include "upb/upb/base/status.h"
#include <errno.h>
#include <float.h>
@@ -37,7 +37,7 @@
#include <string.h>
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
void upb_Status_Clear(upb_Status* status) {
if (!status) return;
diff --git a/upb/upb/base/status.h b/upb/upb/base/status.h
index 9f38f4c..b0079a1 100644
--- a/upb/upb/base/status.h
+++ b/upb/upb/base/status.h
@@ -34,7 +34,7 @@
#include <stdarg.h>
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#define _kUpb_Status_MaxMessage 127
@@ -64,6 +64,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_BASE_STATUS_H_ */
diff --git a/upb/upb/base/status.hpp b/upb/upb/base/status.hpp
index 2dc4c8a..74bc69d 100644
--- a/upb/upb/base/status.hpp
+++ b/upb/upb/base/status.hpp
@@ -31,7 +31,7 @@
#ifndef UPB_BASE_STATUS_HPP_
#define UPB_BASE_STATUS_HPP_
-#include "upb/base/status.h"
+#include "upb/upb/base/status.h"
namespace upb {
diff --git a/upb/upb/base/string_view.h b/upb/upb/base/string_view.h
index c9454b3..b7c9427 100644
--- a/upb/upb/base/string_view.h
+++ b/upb/upb/base/string_view.h
@@ -34,7 +34,7 @@
#include <string.h>
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#define UPB_STRINGVIEW_INIT(ptr, len) \
{ ptr, len }
@@ -76,6 +76,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_BASE_STRING_VIEW_H_ */
diff --git a/upb/upb/collections/BUILD b/upb/upb/collections/BUILD
index 9647f1e..71046ef 100644
--- a/upb/upb/collections/BUILD
+++ b/upb/upb/collections/BUILD
@@ -5,7 +5,7 @@
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
-load("//bazel:build_defs.bzl", "UPB_DEFAULT_COPTS")
+load("//upb/bazel:build_defs.bzl", "UPB_DEFAULT_COPTS")
cc_library(
name = "collections",
@@ -17,9 +17,9 @@
visibility = ["//visibility:public"],
deps = [
":internal",
- "//:base",
- "//:mem",
- "//:port",
+ "//upb:base",
+ "//upb:mem",
+ "//upb:port",
],
)
@@ -43,15 +43,15 @@
copts = UPB_DEFAULT_COPTS,
visibility = ["//visibility:public"],
deps = [
- "//:base",
- "//:base_internal",
- "//:hash",
- "//:mem",
- "//:message_internal",
- "//:message_internal_types",
- "//:message_tagged_ptr",
- "//:mini_table",
- "//:port",
+ "//upb:base",
+ "//upb:base_internal",
+ "//upb:hash",
+ "//upb:mem",
+ "//upb:message_internal",
+ "//upb:message_internal_types",
+ "//upb:message_tagged_ptr",
+ "//upb:mini_table",
+ "//upb:port",
],
)
@@ -64,7 +64,7 @@
visibility = ["//visibility:public"],
deps = [
":collections",
- "//:port",
+ "//upb:port",
],
)
@@ -73,8 +73,8 @@
srcs = ["array_test.cc"],
deps = [
":collections",
- "//:base",
- "//:mem",
+ "//upb:base",
+ "//upb:mem",
"@com_google_googletest//:gtest_main",
],
)
@@ -84,8 +84,8 @@
srcs = ["map_test.cc"],
deps = [
":collections",
- "//:base",
- "//:mem",
+ "//upb:base",
+ "//upb:mem",
"@com_google_googletest//:gtest_main",
],
)
@@ -100,8 +100,8 @@
],
),
visibility = [
- "//cmake:__pkg__",
- "//python/dist:__pkg__",
+ "//upb/cmake:__pkg__",
+ "//upb/python/dist:__pkg__",
]
)
# end:github_only
diff --git a/upb/upb/collections/array.c b/upb/upb/collections/array.c
index f46fc3e..b51c586 100644
--- a/upb/upb/collections/array.c
+++ b/upb/upb/collections/array.c
@@ -28,12 +28,12 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/collections/internal/array.h"
+#include "upb/upb/collections/internal/array.h"
#include <string.h>
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
const char _upb_Array_CTypeSizeLg2Table[] = {
[kUpb_CType_Bool] = 0,
diff --git a/upb/upb/collections/array.h b/upb/upb/collections/array.h
index 7df2f0a..ef8af6d 100644
--- a/upb/upb/collections/array.h
+++ b/upb/upb/collections/array.h
@@ -31,12 +31,12 @@
#ifndef UPB_COLLECTIONS_ARRAY_H_
#define UPB_COLLECTIONS_ARRAY_H_
-#include "upb/base/descriptor_constants.h"
-#include "upb/collections/message_value.h"
-#include "upb/mem/arena.h"
+#include "upb/upb/base/descriptor_constants.h"
+#include "upb/upb/collections/message_value.h"
+#include "upb/upb/mem/arena.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -89,6 +89,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_COLLECTIONS_ARRAY_H_ */
diff --git a/upb/upb/collections/array_split64.h b/upb/upb/collections/array_split64.h
index 69ea579..9afd40e 100644
--- a/upb/upb/collections/array_split64.h
+++ b/upb/upb/collections/array_split64.h
@@ -31,10 +31,10 @@
#ifndef UPB_COLLECTIONS_ARRAY_SPLIT64_H_
#define UPB_COLLECTIONS_ARRAY_SPLIT64_H_
-#include "upb/collections/array.h"
+#include "upb/upb/collections/array.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -88,6 +88,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_COLLECTIONS_ARRAY_SPLIT64_H_ */
diff --git a/upb/upb/collections/array_test.cc b/upb/upb/collections/array_test.cc
index b84464b..87090b4 100644
--- a/upb/upb/collections/array_test.cc
+++ b/upb/upb/collections/array_test.cc
@@ -28,11 +28,11 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/collections/array.h"
+#include "upb/upb/collections/array.h"
#include "gtest/gtest.h"
-#include "upb/base/status.hpp"
-#include "upb/mem/arena.hpp"
+#include "upb/upb/base/status.hpp"
+#include "upb/upb/mem/arena.hpp"
TEST(ArrayTest, Resize) {
upb::Arena arena;
diff --git a/upb/upb/collections/internal/array.h b/upb/upb/collections/internal/array.h
index 1c2f3f5..8d1d322 100644
--- a/upb/upb/collections/internal/array.h
+++ b/upb/upb/collections/internal/array.h
@@ -33,10 +33,10 @@
#include <string.h>
-#include "upb/collections/array.h"
+#include "upb/upb/collections/array.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -133,6 +133,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_COLLECTIONS_INTERNAL_ARRAY_H_ */
diff --git a/upb/upb/collections/internal/map.h b/upb/upb/collections/internal/map.h
index 5900736..ce97ef4 100644
--- a/upb/upb/collections/internal/map.h
+++ b/upb/upb/collections/internal/map.h
@@ -33,13 +33,13 @@
#ifndef UPB_COLLECTIONS_INTERNAL_MAP_H_
#define UPB_COLLECTIONS_INTERNAL_MAP_H_
-#include "upb/base/string_view.h"
-#include "upb/collections/map.h"
-#include "upb/hash/str_table.h"
-#include "upb/mem/arena.h"
+#include "upb/upb/base/string_view.h"
+#include "upb/upb/collections/map.h"
+#include "upb/upb/hash/str_table.h"
+#include "upb/upb/mem/arena.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
struct upb_Map {
// Size of key and val, based on the map type.
@@ -168,6 +168,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_COLLECTIONS_INTERNAL_MAP_H_ */
diff --git a/upb/upb/collections/internal/map_entry.h b/upb/upb/collections/internal/map_entry.h
index 2718544..56bd44b 100644
--- a/upb/upb/collections/internal/map_entry.h
+++ b/upb/upb/collections/internal/map_entry.h
@@ -31,9 +31,9 @@
#ifndef UPB_COLLECTIONS_INTERNAL_MAP_ENTRY_H_
#define UPB_COLLECTIONS_INTERNAL_MAP_ENTRY_H_
-#include "upb/base/string_view.h"
-#include "upb/hash/common.h"
-#include "upb/message/internal/types.h"
+#include "upb/upb/base/string_view.h"
+#include "upb/upb/hash/common.h"
+#include "upb/upb/message/internal/types.h"
// Map entries aren't actually stored for map fields, they are only used during
// parsing. For parsing, it helps a lot if all map entry messages have the same
diff --git a/upb/upb/collections/internal/map_sorter.h b/upb/upb/collections/internal/map_sorter.h
index a464959..4e1ff51 100644
--- a/upb/upb/collections/internal/map_sorter.h
+++ b/upb/upb/collections/internal/map_sorter.h
@@ -35,12 +35,12 @@
#include <stdlib.h>
-#include "upb/collections/internal/map.h"
-#include "upb/collections/internal/map_entry.h"
-#include "upb/message/internal/extension.h"
+#include "upb/upb/collections/internal/map.h"
+#include "upb/upb/collections/internal/map_entry.h"
+#include "upb/upb/message/internal/extension.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -107,6 +107,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_COLLECTIONS_INTERNAL_MAP_SORTER_H_ */
diff --git a/upb/upb/collections/map.c b/upb/upb/collections/map.c
index a445e59..d6792eb 100644
--- a/upb/upb/collections/map.c
+++ b/upb/upb/collections/map.c
@@ -28,15 +28,15 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/collections/map.h"
+#include "upb/upb/collections/map.h"
#include <string.h>
-#include "upb/collections/internal/map.h"
-#include "upb/mem/arena.h"
+#include "upb/upb/collections/internal/map.h"
+#include "upb/upb/mem/arena.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
// Strings/bytes are special-cased in maps.
char _upb_Map_CTypeSizeTable[12] = {
diff --git a/upb/upb/collections/map.h b/upb/upb/collections/map.h
index 10b9c36..13c937b 100644
--- a/upb/upb/collections/map.h
+++ b/upb/upb/collections/map.h
@@ -31,12 +31,12 @@
#ifndef UPB_COLLECTIONS_MAP_H_
#define UPB_COLLECTIONS_MAP_H_
-#include "upb/base/descriptor_constants.h"
-#include "upb/collections/message_value.h"
-#include "upb/mem/arena.h"
+#include "upb/upb/base/descriptor_constants.h"
+#include "upb/upb/collections/message_value.h"
+#include "upb/upb/mem/arena.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -138,6 +138,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_COLLECTIONS_MAP_H_ */
diff --git a/upb/upb/collections/map_gencode_util.h b/upb/upb/collections/map_gencode_util.h
index c6df545..135ec62 100644
--- a/upb/upb/collections/map_gencode_util.h
+++ b/upb/upb/collections/map_gencode_util.h
@@ -33,10 +33,10 @@
#ifndef UPB_COLLECTIONS_MAP_GENCODE_UTIL_H_
#define UPB_COLLECTIONS_MAP_GENCODE_UTIL_H_
-#include "upb/collections/internal/map.h"
+#include "upb/upb/collections/internal/map.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -76,6 +76,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_COLLECTIONS_MAP_GENCODE_UTIL_H_ */
diff --git a/upb/upb/collections/map_sorter.c b/upb/upb/collections/map_sorter.c
index 9ad2a66..8725cd6 100644
--- a/upb/upb/collections/map_sorter.c
+++ b/upb/upb/collections/map_sorter.c
@@ -28,12 +28,12 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/collections/internal/map_sorter.h"
+#include "upb/upb/collections/internal/map_sorter.h"
-#include "upb/base/internal/log2.h"
+#include "upb/upb/base/internal/log2.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
static void _upb_mapsorter_getkeys(const void* _a, const void* _b, void* a_key,
void* b_key, size_t size) {
diff --git a/upb/upb/collections/map_test.cc b/upb/upb/collections/map_test.cc
index d584687..440d89c 100644
--- a/upb/upb/collections/map_test.cc
+++ b/upb/upb/collections/map_test.cc
@@ -28,11 +28,11 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/collections/map.h"
+#include "upb/upb/collections/map.h"
#include "gtest/gtest.h"
-#include "upb/base/string_view.h"
-#include "upb/mem/arena.hpp"
+#include "upb/upb/base/string_view.h"
+#include "upb/upb/mem/arena.hpp"
TEST(MapTest, DeleteRegression) {
upb::Arena arena;
diff --git a/upb/upb/collections/message_value.h b/upb/upb/collections/message_value.h
index f015024a..74058d0 100644
--- a/upb/upb/collections/message_value.h
+++ b/upb/upb/collections/message_value.h
@@ -29,17 +29,17 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Users should include array.h or map.h instead.
-// IWYU pragma: private, include "upb/collections/array.h"
+// IWYU pragma: private, include "upb/upb/collections/array.h"
#ifndef UPB_MESSAGE_VALUE_H_
#define UPB_MESSAGE_VALUE_H_
-#include "upb/base/string_view.h"
-#include "upb/message/tagged_ptr.h"
-#include "upb/mini_table/message.h"
+#include "upb/upb/base/string_view.h"
+#include "upb/upb/message/tagged_ptr.h"
+#include "upb/upb/mini_table/message.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
typedef struct upb_Array upb_Array;
typedef struct upb_Map upb_Map;
@@ -70,6 +70,6 @@
upb_Message* msg;
} upb_MutableMessageValue;
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_MESSAGE_VALUE_H_ */
diff --git a/upb/upb/conformance/BUILD b/upb/upb/conformance/BUILD
index 41bd40a..a8b63ab 100644
--- a/upb/upb/conformance/BUILD
+++ b/upb/upb/conformance/BUILD
@@ -6,18 +6,18 @@
# https://developers.google.com/open-source/licenses/bsd
load(
- "//bazel:build_defs.bzl",
+ "//upb/bazel:build_defs.bzl",
"UPB_DEFAULT_COPTS",
"make_shell_script",
)
load(
- "//bazel:upb_proto_library.bzl",
+ "//upb/bazel:upb_proto_library.bzl",
"upb_proto_library",
"upb_proto_reflection_library",
)
# begin:google_only
-# package(default_applicable_licenses = ["//:license"])
+# package(default_applicable_licenses = ["//upb:license"])
# end:google_only
licenses(["notice"])
@@ -31,13 +31,13 @@
upb_proto_library(
name = "conformance_upb_proto",
testonly = 1,
- deps = ["@com_google_protobuf//conformance:conformance_proto"],
+ deps = ["//conformance:conformance_proto"],
)
upb_proto_reflection_library(
name = "conformance_upb_proto_reflection",
testonly = 1,
- deps = ["@com_google_protobuf//conformance:conformance_proto"],
+ deps = ["//conformance:conformance_proto"],
)
upb_proto_reflection_library(
@@ -46,7 +46,7 @@
visibility = [
"//visibility:private", # Only private by automation, not intent. Owner may accept CLs adding visibility. See go/scheuklappen#explicit-private.
],
- deps = ["@com_google_protobuf//src/google/protobuf:test_messages_proto2_proto"],
+ deps = ["//src/google/protobuf:test_messages_proto2_proto"],
)
upb_proto_reflection_library(
@@ -55,7 +55,7 @@
visibility = [
"//visibility:private", # Only private by automation, not intent. Owner may accept CLs adding visibility. See go/scheuklappen#explicit-private.
],
- deps = ["@com_google_protobuf//src/google/protobuf:test_messages_proto3_proto"],
+ deps = ["//src/google/protobuf:test_messages_proto3_proto"],
)
cc_binary(
@@ -73,11 +73,11 @@
":conformance_upb_proto_reflection",
":test_messages_proto2_upbdefs",
":test_messages_proto3_upbdefs",
- "//:json",
- "//:port",
- "//:reflection",
- "//:text",
- "//:wire",
+ "//upb:json",
+ "//upb:port",
+ "//upb:reflection",
+ "//upb:text",
+ "//upb:wire",
],
)
@@ -91,14 +91,14 @@
name = "test_conformance_upb",
srcs = ["test_conformance_upb.sh"],
args = [
- "$(location @com_google_protobuf//conformance:conformance_test_runner)",
+ "$(location //conformance:conformance_test_runner)",
"$(location :conformance_upb_failures.txt)",
"$(location :conformance_upb)",
],
data = [
"conformance_upb_failures.txt",
":conformance_upb",
- "@com_google_protobuf//conformance:conformance_test_runner",
+ "//conformance:conformance_test_runner",
],
target_compatible_with = select({
"@platforms//os:windows": ["@platforms//:incompatible"],
@@ -124,11 +124,11 @@
":conformance_upb_proto_reflection",
":test_messages_proto2_upbdefs",
":test_messages_proto3_upbdefs",
- "//:json",
- "//:port",
- "//:reflection",
- "//:text",
- "//:wire",
+ "//upb:json",
+ "//upb:port",
+ "//upb:reflection",
+ "//upb:text",
+ "//upb:wire",
],
)
@@ -142,14 +142,14 @@
name = "test_conformance_upb_dynamic_minitable",
srcs = ["test_conformance_upb_dynamic_minitable.sh"],
args = [
- "$(location @com_google_protobuf//conformance:conformance_test_runner)",
+ "$(location //conformance:conformance_test_runner)",
"$(location :conformance_upb_failures.txt)",
"$(location :conformance_upb_dynamic_minitable)",
],
data = [
"conformance_upb_failures.txt",
":conformance_upb_dynamic_minitable",
- "@com_google_protobuf//conformance:conformance_test_runner",
+ "//conformance:conformance_test_runner",
],
deps = ["@bazel_tools//tools/bash/runfiles"],
)
diff --git a/upb/upb/conformance/conformance_upb.c b/upb/upb/conformance/conformance_upb.c
index 0a62201..258e031 100644
--- a/upb/upb/conformance/conformance_upb.c
+++ b/upb/upb/conformance/conformance_upb.c
@@ -41,15 +41,15 @@
#include "conformance/conformance.upbdefs.h"
#include "google/protobuf/test_messages_proto2.upbdefs.h"
#include "google/protobuf/test_messages_proto3.upbdefs.h"
-#include "upb/json/decode.h"
-#include "upb/json/encode.h"
-#include "upb/reflection/message.h"
-#include "upb/text/encode.h"
-#include "upb/wire/decode.h"
-#include "upb/wire/encode.h"
+#include "upb/upb/json/decode.h"
+#include "upb/upb/json/encode.h"
+#include "upb/upb/reflection/message.h"
+#include "upb/upb/text/encode.h"
+#include "upb/upb/wire/decode.h"
+#include "upb/upb/wire/encode.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
int test_count = 0;
bool verbose = false; /* Set to true to get req/resp printed on stderr. */
diff --git a/upb/upb/generated_code_support.h b/upb/upb/generated_code_support.h
index d589640..820bd66 100644
--- a/upb/upb/generated_code_support.h
+++ b/upb/upb/generated_code_support.h
@@ -32,26 +32,26 @@
#define UPB_GENERATED_CODE_SUPPORT_H_
// IWYU pragma: begin_exports
-#include "upb/collections/array.h"
-#include "upb/collections/internal/array.h"
-#include "upb/collections/map_gencode_util.h"
-#include "upb/collections/message_value.h"
-#include "upb/message/accessors.h"
-#include "upb/message/internal/accessors.h"
-#include "upb/message/internal/extension.h"
-#include "upb/message/internal/message.h"
-#include "upb/message/message.h"
-#include "upb/mini_descriptor/decode.h"
-#include "upb/mini_table/enum.h"
-#include "upb/mini_table/extension.h"
-#include "upb/mini_table/extension_registry.h"
-#include "upb/mini_table/field.h"
-#include "upb/mini_table/file.h"
-#include "upb/mini_table/message.h"
-#include "upb/mini_table/sub.h"
-#include "upb/wire/decode.h"
-#include "upb/wire/decode_fast.h"
-#include "upb/wire/encode.h"
+#include "upb/upb/collections/array.h"
+#include "upb/upb/collections/internal/array.h"
+#include "upb/upb/collections/map_gencode_util.h"
+#include "upb/upb/collections/message_value.h"
+#include "upb/upb/message/accessors.h"
+#include "upb/upb/message/internal/accessors.h"
+#include "upb/upb/message/internal/extension.h"
+#include "upb/upb/message/internal/message.h"
+#include "upb/upb/message/message.h"
+#include "upb/upb/mini_descriptor/decode.h"
+#include "upb/upb/mini_table/enum.h"
+#include "upb/upb/mini_table/extension.h"
+#include "upb/upb/mini_table/extension_registry.h"
+#include "upb/upb/mini_table/field.h"
+#include "upb/upb/mini_table/file.h"
+#include "upb/upb/mini_table/message.h"
+#include "upb/upb/mini_table/sub.h"
+#include "upb/upb/wire/decode.h"
+#include "upb/upb/wire/decode_fast.h"
+#include "upb/upb/wire/encode.h"
// IWYU pragma: end_exports
#endif // UPB_GENERATED_CODE_SUPPORT_H_
diff --git a/upb/upb/hash/BUILD b/upb/upb/hash/BUILD
index afe696a..a83ee68 100644
--- a/upb/upb/hash/BUILD
+++ b/upb/upb/hash/BUILD
@@ -5,7 +5,7 @@
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
-load("//bazel:build_defs.bzl", "UPB_DEFAULT_COPTS")
+load("//upb/bazel:build_defs.bzl", "UPB_DEFAULT_COPTS")
cc_library(
name = "hash",
@@ -20,10 +20,10 @@
copts = UPB_DEFAULT_COPTS,
visibility = ["//visibility:public"],
deps = [
- "//:base",
- "//:base_internal",
- "//:mem",
- "//:port",
+ "//upb:base",
+ "//upb:base_internal",
+ "//upb:mem",
+ "//upb:port",
],
)
@@ -32,8 +32,8 @@
srcs = ["test.cc"],
deps = [
":hash",
- "//:mem",
- "//:port",
+ "//upb:mem",
+ "//upb:port",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_googletest//:gtest_main",
],
@@ -49,8 +49,8 @@
],
),
visibility = [
- "//cmake:__pkg__",
- "//python/dist:__pkg__",
+ "//upb/cmake:__pkg__",
+ "//upb/python/dist:__pkg__",
]
)
# end:github_only
diff --git a/upb/upb/hash/common.c b/upb/upb/hash/common.c
index d8addce..7eecaa0 100644
--- a/upb/upb/hash/common.c
+++ b/upb/upb/hash/common.c
@@ -36,12 +36,12 @@
#include <string.h>
-#include "upb/base/internal/log2.h"
-#include "upb/hash/int_table.h"
-#include "upb/hash/str_table.h"
+#include "upb/upb/base/internal/log2.h"
+#include "upb/upb/hash/int_table.h"
+#include "upb/upb/hash/str_table.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#define UPB_MAXARRSIZE 16 // 2**16 = 64k.
diff --git a/upb/upb/hash/common.h b/upb/upb/hash/common.h
index 5280d34..44588b0 100644
--- a/upb/upb/hash/common.h
+++ b/upb/upb/hash/common.h
@@ -52,11 +52,11 @@
#include <string.h>
-#include "upb/base/string_view.h"
-#include "upb/mem/arena.h"
+#include "upb/upb/base/string_view.h"
+#include "upb/upb/mem/arena.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -198,6 +198,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_HASH_COMMON_H_ */
diff --git a/upb/upb/hash/int_table.h b/upb/upb/hash/int_table.h
index 367f1ac..99641c2 100644
--- a/upb/upb/hash/int_table.h
+++ b/upb/upb/hash/int_table.h
@@ -31,10 +31,10 @@
#ifndef UPB_HASH_INT_TABLE_H_
#define UPB_HASH_INT_TABLE_H_
-#include "upb/hash/common.h"
+#include "upb/upb/hash/common.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
typedef struct {
upb_table t; // For entries that don't fit in the array part.
@@ -100,6 +100,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_HASH_INT_TABLE_H_ */
diff --git a/upb/upb/hash/str_table.h b/upb/upb/hash/str_table.h
index 8522be9..0fe8ae9 100644
--- a/upb/upb/hash/str_table.h
+++ b/upb/upb/hash/str_table.h
@@ -31,10 +31,10 @@
#ifndef UPB_HASH_STR_TABLE_H_
#define UPB_HASH_STR_TABLE_H_
-#include "upb/hash/common.h"
+#include "upb/upb/hash/common.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
typedef struct {
upb_table t;
@@ -160,6 +160,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_HASH_STR_TABLE_H_ */
diff --git a/upb/upb/hash/test.cc b/upb/upb/hash/test.cc
index c9a4b8c..5bb79f6 100644
--- a/upb/upb/hash/test.cc
+++ b/upb/upb/hash/test.cc
@@ -41,12 +41,12 @@
#include "gtest/gtest.h"
#include "absl/container/flat_hash_map.h"
-#include "upb/hash/int_table.h"
-#include "upb/hash/str_table.h"
-#include "upb/mem/arena.hpp"
+#include "upb/upb/hash/int_table.h"
+#include "upb/upb/hash/str_table.h"
+#include "upb/upb/mem/arena.hpp"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
using std::vector;
diff --git a/upb/upb/io/BUILD b/upb/upb/io/BUILD
index 8201506..9874948 100644
--- a/upb/upb/io/BUILD
+++ b/upb/upb/io/BUILD
@@ -1,13 +1,13 @@
# begin:google_only
-# package(default_applicable_licenses = ["//:license"])
+# package(default_applicable_licenses = ["//upb:license"])
# end:google_only
cc_library(
name = "string",
hdrs = ["string.h"],
deps = [
- "//:mem",
- "//:port",
+ "//upb:mem",
+ "//upb:port",
],
)
@@ -18,10 +18,10 @@
deps = [
":string",
":zero_copy_stream",
- "//:base",
- "//:lex",
- "//:mem",
- "//:port",
+ "//upb:base",
+ "//upb:lex",
+ "//upb:mem",
+ "//upb:port",
],
)
@@ -32,9 +32,9 @@
"zero_copy_output_stream.h",
],
deps = [
- "//:base",
- "//:mem",
- "//:port",
+ "//upb:base",
+ "//upb:mem",
+ "//upb:port",
],
)
@@ -53,8 +53,8 @@
],
deps = [
":zero_copy_stream",
- "//:mem",
- "//:port",
+ "//upb:mem",
+ "//upb:port",
],
)
@@ -64,7 +64,7 @@
srcs = ["string_test.cc"],
deps = [
":string",
- "//:mem",
+ "//upb:mem",
"@com_google_googletest//:gtest_main",
],
)
@@ -78,9 +78,9 @@
":string",
":tokenizer",
":zero_copy_stream",
- "//:lex",
- "//:mem",
- "//:port",
+ "//upb:lex",
+ "//upb:mem",
+ "//upb:port",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:str_format",
"@com_google_googletest//:gtest_main",
@@ -96,8 +96,8 @@
deps = [
":chunked_stream",
":zero_copy_stream",
- "//:base",
- "//:mem",
+ "//upb:base",
+ "//upb:mem",
"@com_google_googletest//:gtest_main",
],
)
diff --git a/upb/upb/io/chunked_input_stream.c b/upb/upb/io/chunked_input_stream.c
index 58a1c95..d44b740 100644
--- a/upb/upb/io/chunked_input_stream.c
+++ b/upb/upb/io/chunked_input_stream.c
@@ -28,10 +28,10 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/io/chunked_input_stream.h"
+#include "upb/upb/io/chunked_input_stream.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
typedef struct {
upb_ZeroCopyInputStream base;
diff --git a/upb/upb/io/chunked_input_stream.h b/upb/upb/io/chunked_input_stream.h
index 4497266..117d89d 100644
--- a/upb/upb/io/chunked_input_stream.h
+++ b/upb/upb/io/chunked_input_stream.h
@@ -31,11 +31,11 @@
#ifndef UPB_IO_CHUNKED_INPUT_STREAM_H_
#define UPB_IO_CHUNKED_INPUT_STREAM_H_
-#include "upb/io/zero_copy_input_stream.h"
-#include "upb/mem/arena.h"
+#include "upb/upb/io/zero_copy_input_stream.h"
+#include "upb/upb/mem/arena.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -51,6 +51,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_IO_CHUNKED_INPUT_STREAM_H_ */
diff --git a/upb/upb/io/chunked_output_stream.c b/upb/upb/io/chunked_output_stream.c
index 6546124..b9cdc46 100644
--- a/upb/upb/io/chunked_output_stream.c
+++ b/upb/upb/io/chunked_output_stream.c
@@ -28,10 +28,10 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/io/chunked_output_stream.h"
+#include "upb/upb/io/chunked_output_stream.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
typedef struct {
upb_ZeroCopyOutputStream base;
diff --git a/upb/upb/io/chunked_output_stream.h b/upb/upb/io/chunked_output_stream.h
index f52b6ab..5205ce6 100644
--- a/upb/upb/io/chunked_output_stream.h
+++ b/upb/upb/io/chunked_output_stream.h
@@ -31,11 +31,11 @@
#ifndef UPB_IO_CHUNKED_OUTPUT_STREAM_H_
#define UPB_IO_CHUNKED_OUTPUT_STREAM_H_
-#include "upb/io/zero_copy_output_stream.h"
-#include "upb/mem/arena.h"
+#include "upb/upb/io/zero_copy_output_stream.h"
+#include "upb/upb/mem/arena.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -51,6 +51,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_IO_CHUNKED_OUTPUT_STREAM_H_ */
diff --git a/upb/upb/io/string.h b/upb/upb/io/string.h
index 7aa8bdf..007b15a 100644
--- a/upb/upb/io/string.h
+++ b/upb/upb/io/string.h
@@ -41,11 +41,11 @@
#include <stdlib.h>
#include <string.h>
-#include "upb/mem/arena.h"
-#include "upb/port/vsnprintf_compat.h"
+#include "upb/upb/mem/arena.h"
+#include "upb/upb/port/vsnprintf_compat.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -165,6 +165,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_IO_STRING_H_ */
diff --git a/upb/upb/io/string_test.cc b/upb/upb/io/string_test.cc
index f6c2b38..3d8067c 100644
--- a/upb/upb/io/string_test.cc
+++ b/upb/upb/io/string_test.cc
@@ -28,12 +28,12 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/io/string.h"
+#include "upb/upb/io/string.h"
#include <string.h>
#include "gtest/gtest.h"
-#include "upb/mem/arena.hpp"
+#include "upb/upb/mem/arena.hpp"
TEST(StringTest, Append) {
upb::Arena arena;
diff --git a/upb/upb/io/tokenizer.c b/upb/upb/io/tokenizer.c
index d82618a..357a651 100644
--- a/upb/upb/io/tokenizer.c
+++ b/upb/upb/io/tokenizer.c
@@ -28,14 +28,14 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/io/tokenizer.h"
+#include "upb/upb/io/tokenizer.h"
-#include "upb/io/string.h"
-#include "upb/lex/strtod.h"
-#include "upb/lex/unicode.h"
+#include "upb/upb/io/string.h"
+#include "upb/upb/lex/strtod.h"
+#include "upb/upb/lex/unicode.h"
// Must be included last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
typedef enum {
// Started a line comment.
diff --git a/upb/upb/io/tokenizer.h b/upb/upb/io/tokenizer.h
index ca86757..cd8c334 100644
--- a/upb/upb/io/tokenizer.h
+++ b/upb/upb/io/tokenizer.h
@@ -33,13 +33,13 @@
#ifndef UPB_IO_TOKENIZER_H_
#define UPB_IO_TOKENIZER_H_
-#include "upb/base/status.h"
-#include "upb/base/string_view.h"
-#include "upb/io/zero_copy_input_stream.h"
-#include "upb/mem/arena.h"
+#include "upb/upb/base/status.h"
+#include "upb/upb/base/string_view.h"
+#include "upb/upb/io/zero_copy_input_stream.h"
+#include "upb/upb/mem/arena.h"
// Must be included last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -151,6 +151,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif // UPB_IO_TOKENIZER_H_
diff --git a/upb/upb/io/tokenizer_test.cc b/upb/upb/io/tokenizer_test.cc
index 59cff71..86a0a60 100644
--- a/upb/upb/io/tokenizer_test.cc
+++ b/upb/upb/io/tokenizer_test.cc
@@ -28,18 +28,18 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/io/tokenizer.h"
+#include "upb/upb/io/tokenizer.h"
#include "gtest/gtest.h"
#include "absl/strings/escaping.h"
#include "absl/strings/str_format.h"
-#include "upb/io/chunked_input_stream.h"
-#include "upb/io/string.h"
-#include "upb/lex/unicode.h"
-#include "upb/mem/arena.hpp"
+#include "upb/upb/io/chunked_input_stream.h"
+#include "upb/upb/io/string.h"
+#include "upb/upb/lex/unicode.h"
+#include "upb/upb/mem/arena.hpp"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
namespace proto2 {
namespace io {
diff --git a/upb/upb/io/zero_copy_input_stream.h b/upb/upb/io/zero_copy_input_stream.h
index b5eef3e..1a93ca8 100644
--- a/upb/upb/io/zero_copy_input_stream.h
+++ b/upb/upb/io/zero_copy_input_stream.h
@@ -31,10 +31,10 @@
#ifndef UPB_IO_ZERO_COPY_INPUT_STREAM_H_
#define UPB_IO_ZERO_COPY_INPUT_STREAM_H_
-#include "upb/base/status.h"
+#include "upb/upb/base/status.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -127,6 +127,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_IO_ZERO_COPY_INPUT_STREAM_H_ */
diff --git a/upb/upb/io/zero_copy_output_stream.h b/upb/upb/io/zero_copy_output_stream.h
index 485a94f..bb2f0cd 100644
--- a/upb/upb/io/zero_copy_output_stream.h
+++ b/upb/upb/io/zero_copy_output_stream.h
@@ -31,10 +31,10 @@
#ifndef UPB_IO_ZERO_COPY_OUTPUT_STREAM_H_
#define UPB_IO_ZERO_COPY_OUTPUT_STREAM_H_
-#include "upb/base/status.h"
+#include "upb/upb/base/status.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -128,6 +128,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_IO_ZERO_COPY_OUTPUT_STREAM_H_ */
diff --git a/upb/upb/io/zero_copy_stream_test.cc b/upb/upb/io/zero_copy_stream_test.cc
index 475af83..c6b3ed7 100644
--- a/upb/upb/io/zero_copy_stream_test.cc
+++ b/upb/upb/io/zero_copy_stream_test.cc
@@ -38,10 +38,10 @@
// the output.
#include "gtest/gtest.h"
-#include "upb/base/status.hpp"
-#include "upb/io/chunked_input_stream.h"
-#include "upb/io/chunked_output_stream.h"
-#include "upb/mem/arena.hpp"
+#include "upb/upb/base/status.hpp"
+#include "upb/upb/io/chunked_input_stream.h"
+#include "upb/upb/io/chunked_output_stream.h"
+#include "upb/upb/mem/arena.hpp"
namespace upb {
namespace {
diff --git a/upb/upb/json/BUILD b/upb/upb/json/BUILD
index 538c2c8..4575a74 100644
--- a/upb/upb/json/BUILD
+++ b/upb/upb/json/BUILD
@@ -1,8 +1,8 @@
# TODO(haberman): describe this package.
-load("//bazel:build_defs.bzl", "UPB_DEFAULT_COPTS")
+load("//upb/bazel:build_defs.bzl", "UPB_DEFAULT_COPTS")
load(
- "//bazel:upb_proto_library.bzl",
+ "//upb/bazel:upb_proto_library.bzl",
"upb_proto_library",
"upb_proto_reflection_library",
)
@@ -20,11 +20,11 @@
copts = UPB_DEFAULT_COPTS,
visibility = ["//visibility:public"],
deps = [
- "//:collections",
- "//:lex",
- "//:port",
- "//:reflection",
- "//:wire",
+ "//upb:collections",
+ "//upb:lex",
+ "//upb:port",
+ "//upb:reflection",
+ "//upb:wire",
],
)
@@ -36,8 +36,8 @@
":struct_upb_proto",
":test_upb_proto",
":test_upb_proto_reflection",
- "//:mem",
- "//:reflection",
+ "//upb:mem",
+ "//upb:reflection",
"@com_google_googletest//:gtest_main",
],
)
@@ -50,9 +50,9 @@
":struct_upb_proto",
":test_upb_proto",
":test_upb_proto_reflection",
- "//:base",
- "//:mem",
- "//:reflection",
+ "//upb:base",
+ "//upb:mem",
+ "//upb:reflection",
"@com_google_googletest//:gtest_main",
],
)
@@ -61,7 +61,7 @@
name = "test_proto",
testonly = 1,
srcs = ["test.proto"],
- deps = ["@com_google_protobuf//:struct_proto"],
+ deps = ["//:struct_proto"],
)
upb_proto_library(
@@ -80,5 +80,5 @@
upb_proto_library(
name = "struct_upb_proto",
testonly = 1,
- deps = ["@com_google_protobuf//:struct_proto"],
+ deps = ["//:struct_proto"],
)
diff --git a/upb/upb/json/decode.c b/upb/upb/json/decode.c
index dea0c83..c99b756 100644
--- a/upb/upb/json/decode.c
+++ b/upb/upb/json/decode.c
@@ -28,7 +28,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/json/decode.h"
+#include "upb/upb/json/decode.h"
#include <errno.h>
#include <float.h>
@@ -38,14 +38,14 @@
#include <stdlib.h>
#include <string.h>
-#include "upb/collections/map.h"
-#include "upb/lex/atoi.h"
-#include "upb/lex/unicode.h"
-#include "upb/reflection/message.h"
-#include "upb/wire/encode.h"
+#include "upb/upb/collections/map.h"
+#include "upb/upb/lex/atoi.h"
+#include "upb/upb/lex/unicode.h"
+#include "upb/upb/reflection/message.h"
+#include "upb/upb/wire/encode.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
typedef struct {
const char *ptr, *end;
diff --git a/upb/upb/json/decode.h b/upb/upb/json/decode.h
index 8f58797..52882a9 100644
--- a/upb/upb/json/decode.h
+++ b/upb/upb/json/decode.h
@@ -31,10 +31,10 @@
#ifndef UPB_JSON_DECODE_H_
#define UPB_JSON_DECODE_H_
-#include "upb/reflection/def.h"
+#include "upb/upb/reflection/def.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -50,6 +50,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_JSONDECODE_H_ */
diff --git a/upb/upb/json/decode_test.cc b/upb/upb/json/decode_test.cc
index b1e6c96..481fed2 100644
--- a/upb/upb/json/decode_test.cc
+++ b/upb/upb/json/decode_test.cc
@@ -28,14 +28,14 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/json/decode.h"
+#include "upb/upb/json/decode.h"
#include "google/protobuf/struct.upb.h"
#include "gtest/gtest.h"
-#include "upb/json/test.upb.h"
-#include "upb/json/test.upbdefs.h"
-#include "upb/mem/arena.hpp"
-#include "upb/reflection/def.hpp"
+#include "upb/upb/json/test.upb.h"
+#include "upb/upb/json/test.upbdefs.h"
+#include "upb/upb/mem/arena.hpp"
+#include "upb/upb/reflection/def.hpp"
static upb_test_Box* JsonDecode(const char* json, upb_Arena* a) {
upb::Status status;
diff --git a/upb/upb/json/encode.c b/upb/upb/json/encode.c
index 28440b3..c95e95d 100644
--- a/upb/upb/json/encode.c
+++ b/upb/upb/json/encode.c
@@ -28,7 +28,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/json/encode.h"
+#include "upb/upb/json/encode.h"
#include <ctype.h>
#include <float.h>
@@ -37,14 +37,14 @@
#include <stdarg.h>
#include <string.h>
-#include "upb/collections/map.h"
-#include "upb/lex/round_trip.h"
-#include "upb/port/vsnprintf_compat.h"
-#include "upb/reflection/message.h"
-#include "upb/wire/decode.h"
+#include "upb/upb/collections/map.h"
+#include "upb/upb/lex/round_trip.h"
+#include "upb/upb/port/vsnprintf_compat.h"
+#include "upb/upb/reflection/message.h"
+#include "upb/upb/wire/decode.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
typedef struct {
char *buf, *ptr, *end;
diff --git a/upb/upb/json/encode.h b/upb/upb/json/encode.h
index 9b7d419..06d9fe5 100644
--- a/upb/upb/json/encode.h
+++ b/upb/upb/json/encode.h
@@ -31,10 +31,10 @@
#ifndef UPB_JSON_ENCODE_H_
#define UPB_JSON_ENCODE_H_
-#include "upb/reflection/def.h"
+#include "upb/upb/reflection/def.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -68,6 +68,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_JSONENCODE_H_ */
diff --git a/upb/upb/json/encode_test.cc b/upb/upb/json/encode_test.cc
index ab21400..7445560 100644
--- a/upb/upb/json/encode_test.cc
+++ b/upb/upb/json/encode_test.cc
@@ -28,15 +28,15 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/json/encode.h"
+#include "upb/upb/json/encode.h"
#include "google/protobuf/struct.upb.h"
#include "gtest/gtest.h"
-#include "upb/base/status.hpp"
-#include "upb/json/test.upb.h"
-#include "upb/json/test.upbdefs.h"
-#include "upb/mem/arena.hpp"
-#include "upb/reflection/def.hpp"
+#include "upb/upb/base/status.hpp"
+#include "upb/upb/json/test.upb.h"
+#include "upb/upb/json/test.upbdefs.h"
+#include "upb/upb/mem/arena.hpp"
+#include "upb/upb/reflection/def.hpp"
static std::string JsonEncode(const upb_test_Box* msg, int options) {
upb::Arena a;
diff --git a/upb/upb/lex/BUILD b/upb/upb/lex/BUILD
index c1f2718..c40c362 100644
--- a/upb/upb/lex/BUILD
+++ b/upb/upb/lex/BUILD
@@ -5,7 +5,7 @@
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
-load("//bazel:build_defs.bzl", "UPB_DEFAULT_COPTS")
+load("//upb/bazel:build_defs.bzl", "UPB_DEFAULT_COPTS")
cc_library(
name = "lex",
@@ -23,7 +23,7 @@
],
copts = UPB_DEFAULT_COPTS,
visibility = ["//visibility:public"],
- deps = ["//:port"],
+ deps = ["//upb:port"],
)
cc_test(
@@ -46,8 +46,8 @@
],
),
visibility = [
- "//cmake:__pkg__",
- "//python/dist:__pkg__",
+ "//upb/cmake:__pkg__",
+ "//upb/python/dist:__pkg__",
]
)
# end:github_only
diff --git a/upb/upb/lex/atoi.c b/upb/upb/lex/atoi.c
index aecb467..4a9da51 100644
--- a/upb/upb/lex/atoi.c
+++ b/upb/upb/lex/atoi.c
@@ -28,10 +28,10 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/lex/atoi.h"
+#include "upb/upb/lex/atoi.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
const char* upb_BufToUint64(const char* ptr, const char* end, uint64_t* val) {
uint64_t u64 = 0;
diff --git a/upb/upb/lex/atoi.h b/upb/upb/lex/atoi.h
index 808bca8..730c60c 100644
--- a/upb/upb/lex/atoi.h
+++ b/upb/upb/lex/atoi.h
@@ -34,7 +34,7 @@
#include <stdint.h>
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -53,6 +53,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_LEX_ATOI_H_ */
diff --git a/upb/upb/lex/atoi_test.cc b/upb/upb/lex/atoi_test.cc
index ed35219..810b5cb 100644
--- a/upb/upb/lex/atoi_test.cc
+++ b/upb/upb/lex/atoi_test.cc
@@ -28,7 +28,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/lex/atoi.h"
+#include "upb/upb/lex/atoi.h"
#include "gtest/gtest.h"
#include "absl/strings/str_cat.h"
diff --git a/upb/upb/lex/round_trip.c b/upb/upb/lex/round_trip.c
index 6402dc6..d15046a 100644
--- a/upb/upb/lex/round_trip.c
+++ b/upb/upb/lex/round_trip.c
@@ -28,13 +28,13 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/lex/round_trip.h"
+#include "upb/upb/lex/round_trip.h"
#include <float.h>
#include <stdlib.h>
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
/* Miscellaneous utilities ****************************************************/
diff --git a/upb/upb/lex/round_trip.h b/upb/upb/lex/round_trip.h
index d00a662..66e9e45 100644
--- a/upb/upb/lex/round_trip.h
+++ b/upb/upb/lex/round_trip.h
@@ -32,7 +32,7 @@
#define UPB_LEX_ROUND_TRIP_H_
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
// Encodes a float or double that is round-trippable, but as short as possible.
// These routines are not fully optimal (not guaranteed to be shortest), but are
@@ -53,6 +53,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_LEX_ROUND_TRIP_H_ */
diff --git a/upb/upb/lex/strtod.c b/upb/upb/lex/strtod.c
index 50a7c89..14b31a8 100644
--- a/upb/upb/lex/strtod.c
+++ b/upb/upb/lex/strtod.c
@@ -28,13 +28,13 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/lex/strtod.h"
+#include "upb/upb/lex/strtod.h"
#include <stdlib.h>
#include <string.h>
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
// Determine the locale-specific radix character by calling sprintf() to print
// the number 1.5, then stripping off the digits. As far as I can tell, this
diff --git a/upb/upb/lex/strtod.h b/upb/upb/lex/strtod.h
index c7b8777..a99a7a1 100644
--- a/upb/upb/lex/strtod.h
+++ b/upb/upb/lex/strtod.h
@@ -32,7 +32,7 @@
#define UPB_LEX_STRTOD_H_
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -44,6 +44,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_LEX_STRTOD_H_ */
diff --git a/upb/upb/lex/unicode.c b/upb/upb/lex/unicode.c
index 885a061..bc2f8ec 100644
--- a/upb/upb/lex/unicode.c
+++ b/upb/upb/lex/unicode.c
@@ -28,10 +28,10 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/lex/unicode.h"
+#include "upb/upb/lex/unicode.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
int upb_Unicode_ToUTF8(uint32_t cp, char* out) {
if (cp <= 0x7f) {
diff --git a/upb/upb/lex/unicode.h b/upb/upb/lex/unicode.h
index ed5615e..68fee84 100644
--- a/upb/upb/lex/unicode.h
+++ b/upb/upb/lex/unicode.h
@@ -34,7 +34,7 @@
#include <stdint.h>
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -77,6 +77,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_LEX_UNICODE_H_ */
diff --git a/upb/upb/mem/BUILD b/upb/upb/mem/BUILD
index 770b369..0584e6c 100644
--- a/upb/upb/mem/BUILD
+++ b/upb/upb/mem/BUILD
@@ -5,7 +5,7 @@
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
-load("//bazel:build_defs.bzl", "UPB_DEFAULT_COPTS")
+load("//upb/bazel:build_defs.bzl", "UPB_DEFAULT_COPTS")
cc_library(
name = "mem",
@@ -18,7 +18,7 @@
visibility = ["//visibility:public"],
deps = [
":internal",
- "//:port",
+ "//upb:port",
],
)
@@ -34,9 +34,9 @@
"internal/arena.h",
],
copts = UPB_DEFAULT_COPTS,
- visibility = ["//:__pkg__"],
+ visibility = ["//upb:__pkg__"],
deps = [
- "//:port",
+ "//upb:port",
],
)
@@ -44,8 +44,8 @@
name = "arena_test",
srcs = ["arena_test.cc"],
deps = [
- "//:mem",
- "//:port",
+ "//upb:mem",
+ "//upb:port",
"@com_google_absl//absl/random",
"@com_google_absl//absl/random:distributions",
"@com_google_absl//absl/synchronization",
@@ -64,8 +64,8 @@
],
),
visibility = [
- "//cmake:__pkg__",
- "//python/dist:__pkg__",
+ "//upb/cmake:__pkg__",
+ "//upb/python/dist:__pkg__",
]
)
# end:github_only
diff --git a/upb/upb/mem/alloc.c b/upb/upb/mem/alloc.c
index 1d10f10..c4185d7 100644
--- a/upb/upb/mem/alloc.c
+++ b/upb/upb/mem/alloc.c
@@ -28,12 +28,12 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/mem/alloc.h"
+#include "upb/upb/mem/alloc.h"
#include <stdlib.h>
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
static void* upb_global_allocfunc(upb_alloc* alloc, void* ptr, size_t oldsize,
size_t size) {
diff --git a/upb/upb/mem/alloc.h b/upb/upb/mem/alloc.h
index c278cbb..5a9d1b0 100644
--- a/upb/upb/mem/alloc.h
+++ b/upb/upb/mem/alloc.h
@@ -32,7 +32,7 @@
#define UPB_MEM_ALLOC_H_
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -96,6 +96,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_MEM_ALLOC_H_ */
diff --git a/upb/upb/mem/arena.c b/upb/upb/mem/arena.c
index 569986c..cee7ed7 100644
--- a/upb/upb/mem/arena.c
+++ b/upb/upb/mem/arena.c
@@ -28,12 +28,12 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/mem/internal/arena.h"
+#include "upb/upb/mem/internal/arena.h"
-#include "upb/port/atomic.h"
+#include "upb/upb/port/atomic.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
struct _upb_MemBlock {
// Atomic only for the benefit of SpaceAllocated().
diff --git a/upb/upb/mem/arena.h b/upb/upb/mem/arena.h
index 72e8ddb..2849ff1 100644
--- a/upb/upb/mem/arena.h
+++ b/upb/upb/mem/arena.h
@@ -47,10 +47,10 @@
#include <stdint.h>
#include <string.h>
-#include "upb/mem/alloc.h"
+#include "upb/upb/mem/alloc.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
typedef struct upb_Arena upb_Arena;
@@ -147,6 +147,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_MEM_ARENA_H_ */
diff --git a/upb/upb/mem/arena.hpp b/upb/upb/mem/arena.hpp
index cd86d0d..0fd1add 100644
--- a/upb/upb/mem/arena.hpp
+++ b/upb/upb/mem/arena.hpp
@@ -33,7 +33,7 @@
#include <memory>
-#include "upb/mem/arena.h"
+#include "upb/upb/mem/arena.h"
namespace upb {
diff --git a/upb/upb/mem/arena_test.cc b/upb/upb/mem/arena_test.cc
index 8bcf671..9d1ba07 100644
--- a/upb/upb/mem/arena_test.cc
+++ b/upb/upb/mem/arena_test.cc
@@ -28,7 +28,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/mem/arena.h"
+#include "upb/upb/mem/arena.h"
#include <array>
#include <atomic>
@@ -42,7 +42,7 @@
#include "absl/synchronization/notification.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
namespace {
diff --git a/upb/upb/mem/internal/arena.h b/upb/upb/mem/internal/arena.h
index 3fb434a..2bc0689 100644
--- a/upb/upb/mem/internal/arena.h
+++ b/upb/upb/mem/internal/arena.h
@@ -31,10 +31,10 @@
#ifndef UPB_MEM_INTERNAL_ARENA_H_
#define UPB_MEM_INTERNAL_ARENA_H_
-#include "upb/mem/arena.h"
+#include "upb/upb/mem/arena.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
typedef struct _upb_MemBlock _upb_MemBlock;
@@ -112,6 +112,6 @@
return arena->block_alloc & 0x1;
}
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_MEM_INTERNAL_ARENA_H_ */
diff --git a/upb/upb/message/BUILD b/upb/upb/message/BUILD
index 8e85d10..c123916 100644
--- a/upb/upb/message/BUILD
+++ b/upb/upb/message/BUILD
@@ -5,9 +5,9 @@
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
-load("//bazel:build_defs.bzl", "UPB_DEFAULT_COPTS")
+load("//upb/bazel:build_defs.bzl", "UPB_DEFAULT_COPTS")
load(
- "//bazel:upb_proto_library.bzl",
+ "//upb/bazel:upb_proto_library.bzl",
"upb_proto_library",
"upb_proto_reflection_library",
)
@@ -26,15 +26,15 @@
deps = [
":internal",
":message",
- "//:base",
- "//:collections",
- "//:collections_internal",
- "//:eps_copy_input_stream",
- "//:mini_table",
- "//:mini_table_internal",
- "//:port",
- "//:wire",
- "//:wire_reader",
+ "//upb:base",
+ "//upb:collections",
+ "//upb:collections_internal",
+ "//upb:eps_copy_input_stream",
+ "//upb:mini_table",
+ "//upb:mini_table_internal",
+ "//upb:port",
+ "//upb:wire",
+ "//upb:wire_reader",
],
)
@@ -47,9 +47,9 @@
visibility = ["//visibility:public"],
deps = [
":internal",
- "//:collections_internal",
- "//:mini_table_internal",
- "//:port",
+ "//upb:collections_internal",
+ "//upb:mini_table_internal",
+ "//upb:port",
],
)
@@ -68,12 +68,12 @@
":internal",
":message",
":types",
- "//:base",
- "//:collections_internal",
- "//:mem",
- "//:mini_table",
- "//:mini_table_internal",
- "//:port",
+ "//upb:base",
+ "//upb:collections_internal",
+ "//upb:mem",
+ "//upb:mini_table",
+ "//upb:mini_table_internal",
+ "//upb:port",
],
)
@@ -92,12 +92,12 @@
deps = [
":internal_types",
":types",
- "//:base",
- "//:base_internal",
- "//:hash",
- "//:mem",
- "//:mini_table",
- "//:port",
+ "//upb:base",
+ "//upb:base_internal",
+ "//upb:hash",
+ "//upb:mem",
+ "//upb:mini_table",
+ "//upb:port",
],
)
@@ -122,10 +122,10 @@
deps = [
":internal",
":types",
- "//:base",
- "//:mem",
- "//:mini_table",
- "//:port",
+ "//upb:base",
+ "//upb:mem",
+ "//upb:mini_table",
+ "//upb:port",
],
)
@@ -144,16 +144,16 @@
":internal",
":message",
":types",
- "//:base",
- "//:collections",
- "//:collections_internal",
- "//:eps_copy_input_stream",
- "//:hash",
- "//:mem",
- "//:mini_table",
- "//:port",
- "//:wire",
- "//:wire_reader",
+ "//upb:base",
+ "//upb:collections",
+ "//upb:collections_internal",
+ "//upb:eps_copy_input_stream",
+ "//upb:hash",
+ "//upb:mem",
+ "//upb:mini_table",
+ "//upb:port",
+ "//upb:wire",
+ "//upb:wire_reader",
],
)
@@ -166,7 +166,7 @@
visibility = ["//visibility:public"],
deps = [
":accessors",
- "//:port",
+ "//upb:port",
],
)
@@ -177,7 +177,7 @@
visibility = ["//visibility:public"],
deps = [
":types",
- "//:port",
+ "//upb:port",
],
)
@@ -197,7 +197,7 @@
name = "message_test_proto",
testonly = 1,
srcs = ["test.proto"],
- deps = ["@com_google_protobuf//src/google/protobuf:test_messages_proto3_proto"],
+ deps = ["//src/google/protobuf:test_messages_proto3_proto"],
)
upb_proto_library(
@@ -217,19 +217,19 @@
srcs = ["accessors_test.cc"],
deps = [
":accessors",
- "//:base",
- "//:collections",
- "//:mini_descriptor",
- "//:mini_descriptor_internal",
- "//:mini_table",
- "//:port",
- "//:wire",
- "//upb/test:test_messages_proto2_upb_proto",
- "//upb/test:test_messages_proto3_upb_proto",
- "//upb/test:test_upb_proto",
+ "//:protobuf",
+ "//upb:base",
+ "//upb:collections",
+ "//upb:mini_descriptor",
+ "//upb:mini_descriptor_internal",
+ "//upb:mini_table",
+ "//upb:port",
+ "//upb:wire",
+ "//upb/upb/test:test_messages_proto2_upb_proto",
+ "//upb/upb/test:test_messages_proto3_upb_proto",
+ "//upb/upb/test:test_upb_proto",
"@com_google_absl//absl/container:flat_hash_set",
"@com_google_googletest//:gtest_main",
- "@com_google_protobuf//:protobuf",
],
)
@@ -241,17 +241,17 @@
":copy",
":internal",
":message",
- "//:base",
- "//:collections",
- "//:mem",
- "//:mini_table",
- "//:wire",
- "//upb/test:test_messages_proto2_upb_proto",
- "//upb/test:test_messages_proto3_upb_proto",
- "//upb/test:test_upb_proto",
+ "//:protobuf",
+ "//upb:base",
+ "//upb:collections",
+ "//upb:mem",
+ "//upb:mini_table",
+ "//upb:wire",
+ "//upb/upb/test:test_messages_proto2_upb_proto",
+ "//upb/upb/test:test_messages_proto3_upb_proto",
+ "//upb/upb/test:test_upb_proto",
"@com_google_absl//absl/container:flat_hash_set",
"@com_google_googletest//:gtest_main",
- "@com_google_protobuf//:protobuf",
],
)
@@ -262,19 +262,19 @@
":accessors",
":copy",
":promote",
- "//:base",
- "//:collections",
- "//:mem",
- "//:mini_descriptor_internal",
- "//:mini_table",
- "//:port",
- "//:wire",
- "//upb/test:test_messages_proto2_upb_proto",
- "//upb/test:test_messages_proto3_upb_proto",
- "//upb/test:test_upb_proto",
+ "//:protobuf",
+ "//upb:base",
+ "//upb:collections",
+ "//upb:mem",
+ "//upb:mini_descriptor_internal",
+ "//upb:mini_table",
+ "//upb:port",
+ "//upb:wire",
+ "//upb/upb/test:test_messages_proto2_upb_proto",
+ "//upb/upb/test:test_messages_proto3_upb_proto",
+ "//upb/upb/test:test_upb_proto",
"@com_google_absl//absl/container:flat_hash_set",
"@com_google_googletest//:gtest_main",
- "@com_google_protobuf//:protobuf",
],
)
@@ -286,13 +286,13 @@
deps = [
":message_test_upb_proto",
":message_test_upb_proto_reflection",
- "//:base",
- "//:json",
- "//:mem",
- "//:reflection",
- "//:wire",
- "//upb/test:fuzz_util",
- "//upb/test:test_messages_proto3_upb_proto",
+ "//upb:base",
+ "//upb:json",
+ "//upb:mem",
+ "//upb:reflection",
+ "//upb:wire",
+ "//upb/upb/test:fuzz_util",
+ "//upb/upb/test:test_messages_proto3_upb_proto",
"@com_google_googletest//:gtest_main",
],
)
@@ -307,8 +307,8 @@
],
),
visibility = [
- "//cmake:__pkg__",
- "//python/dist:__pkg__",
+ "//upb/cmake:__pkg__",
+ "//upb/python/dist:__pkg__",
]
)
# end:github_only
diff --git a/upb/upb/message/accessors.c b/upb/upb/message/accessors.c
index 687259f..69b58e9 100644
--- a/upb/upb/message/accessors.c
+++ b/upb/upb/message/accessors.c
@@ -28,20 +28,20 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/message/accessors.h"
+#include "upb/upb/message/accessors.h"
-#include "upb/collections/array.h"
-#include "upb/collections/internal/array.h"
-#include "upb/collections/map.h"
-#include "upb/message/message.h"
-#include "upb/mini_table/field.h"
-#include "upb/wire/decode.h"
-#include "upb/wire/encode.h"
-#include "upb/wire/eps_copy_input_stream.h"
-#include "upb/wire/reader.h"
+#include "upb/upb/collections/array.h"
+#include "upb/upb/collections/internal/array.h"
+#include "upb/upb/collections/map.h"
+#include "upb/upb/message/message.h"
+#include "upb/upb/mini_table/field.h"
+#include "upb/upb/wire/decode.h"
+#include "upb/upb/wire/encode.h"
+#include "upb/upb/wire/eps_copy_input_stream.h"
+#include "upb/upb/wire/reader.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
upb_MapInsertStatus upb_Message_InsertMapEntry(upb_Map* map,
const upb_MiniTable* mini_table,
diff --git a/upb/upb/message/accessors.h b/upb/upb/message/accessors.h
index 0305977..2e00b02 100644
--- a/upb/upb/message/accessors.h
+++ b/upb/upb/message/accessors.h
@@ -31,18 +31,18 @@
#ifndef UPB_MESSAGE_ACCESSORS_H_
#define UPB_MESSAGE_ACCESSORS_H_
-#include "upb/base/descriptor_constants.h"
-#include "upb/collections/array.h"
-#include "upb/collections/internal/array.h"
-#include "upb/collections/internal/map.h"
-#include "upb/collections/map.h"
-#include "upb/message/internal/accessors.h"
-#include "upb/message/internal/message.h"
-#include "upb/mini_table/enum.h"
-#include "upb/mini_table/field.h"
+#include "upb/upb/base/descriptor_constants.h"
+#include "upb/upb/collections/array.h"
+#include "upb/upb/collections/internal/array.h"
+#include "upb/upb/collections/internal/map.h"
+#include "upb/upb/collections/map.h"
+#include "upb/upb/message/internal/accessors.h"
+#include "upb/upb/message/internal/message.h"
+#include "upb/upb/mini_table/enum.h"
+#include "upb/upb/mini_table/field.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -398,6 +398,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif // UPB_MESSAGE_ACCESSORS_H_
diff --git a/upb/upb/message/accessors_split64.h b/upb/upb/message/accessors_split64.h
index 4308c8c..548dbee 100644
--- a/upb/upb/message/accessors_split64.h
+++ b/upb/upb/message/accessors_split64.h
@@ -31,10 +31,10 @@
#ifndef UPB_MESSAGE_ACCESSORS_SPLIT64_H_
#define UPB_MESSAGE_ACCESSORS_SPLIT64_H_
-#include "upb/message/accessors.h"
+#include "upb/upb/message/accessors.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -84,6 +84,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif // UPB_MESSAGE_ACCESSORS_SPLIT64_H_
diff --git a/upb/upb/message/accessors_test.cc b/upb/upb/message/accessors_test.cc
index 8ac54dd..5791c9c 100644
--- a/upb/upb/message/accessors_test.cc
+++ b/upb/upb/message/accessors_test.cc
@@ -34,23 +34,23 @@
* accessed through reflective APIs exposed through mini table accessors.
*/
-#include "upb/message/accessors.h"
+#include "upb/upb/message/accessors.h"
#include <string>
#include "gtest/gtest.h"
#include "google/protobuf/test_messages_proto2.upb.h"
#include "google/protobuf/test_messages_proto3.upb.h"
-#include "upb/base/string_view.h"
-#include "upb/collections/array.h"
-#include "upb/mini_descriptor/decode.h"
-#include "upb/mini_descriptor/internal/encode.hpp"
-#include "upb/mini_descriptor/internal/modifiers.h"
-#include "upb/test/test.upb.h"
-#include "upb/wire/decode.h"
+#include "upb/upb/base/string_view.h"
+#include "upb/upb/collections/array.h"
+#include "upb/upb/mini_descriptor/decode.h"
+#include "upb/upb/mini_descriptor/internal/encode.hpp"
+#include "upb/upb/mini_descriptor/internal/modifiers.h"
+#include "upb/upb/test/test.upb.h"
+#include "upb/upb/wire/decode.h"
// Must be last
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
namespace {
diff --git a/upb/upb/message/copy.c b/upb/upb/message/copy.c
index de528c5..da546de 100644
--- a/upb/upb/message/copy.c
+++ b/upb/upb/message/copy.c
@@ -28,22 +28,22 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/message/copy.h"
+#include "upb/upb/message/copy.h"
#include <stdbool.h>
#include <string.h>
-#include "upb/base/descriptor_constants.h"
-#include "upb/base/string_view.h"
-#include "upb/mem/arena.h"
-#include "upb/message/accessors.h"
-#include "upb/message/internal/message.h"
-#include "upb/message/message.h"
-#include "upb/mini_table/field.h"
-#include "upb/mini_table/internal/field.h"
+#include "upb/upb/base/descriptor_constants.h"
+#include "upb/upb/base/string_view.h"
+#include "upb/upb/mem/arena.h"
+#include "upb/upb/message/accessors.h"
+#include "upb/upb/message/internal/message.h"
+#include "upb/upb/message/message.h"
+#include "upb/upb/mini_table/field.h"
+#include "upb/upb/mini_table/internal/field.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
static bool upb_MessageField_IsMap(const upb_MiniTableField* field) {
return upb_FieldMode_Get(field) == kUpb_FieldMode_Map;
diff --git a/upb/upb/message/copy.h b/upb/upb/message/copy.h
index dea292d..76ccf40 100644
--- a/upb/upb/message/copy.h
+++ b/upb/upb/message/copy.h
@@ -31,11 +31,11 @@
#ifndef UPB_MESSAGE_COPY_H_
#define UPB_MESSAGE_COPY_H_
-#include "upb/collections/message_value.h"
-#include "upb/message/internal/message.h"
+#include "upb/upb/collections/message_value.h"
+#include "upb/upb/message/internal/message.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -64,6 +64,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif // UPB_MESSAGE_COPY_H_
diff --git a/upb/upb/message/copy_test.cc b/upb/upb/message/copy_test.cc
index ff3a6f0..a5ae148 100644
--- a/upb/upb/message/copy_test.cc
+++ b/upb/upb/message/copy_test.cc
@@ -34,7 +34,7 @@
* accessed through reflective APIs exposed through mini table accessors.
*/
-#include "upb/message/copy.h"
+#include "upb/upb/message/copy.h"
#include <cstddef>
#include <cstdint>
@@ -44,14 +44,14 @@
#include "gtest/gtest.h"
#include "google/protobuf/test_messages_proto2.upb.h"
-#include "upb/base/string_view.h"
-#include "upb/collections/map.h"
-#include "upb/mem/arena.h"
-#include "upb/message/accessors.h"
-#include "upb/message/internal/message.h"
-#include "upb/message/message.h"
-#include "upb/mini_table/message.h"
-#include "upb/wire/encode.h"
+#include "upb/upb/base/string_view.h"
+#include "upb/upb/collections/map.h"
+#include "upb/upb/mem/arena.h"
+#include "upb/upb/message/accessors.h"
+#include "upb/upb/message/internal/message.h"
+#include "upb/upb/message/message.h"
+#include "upb/upb/mini_table/message.h"
+#include "upb/upb/wire/encode.h"
namespace {
diff --git a/upb/upb/message/internal/accessors.h b/upb/upb/message/internal/accessors.h
index 713e40e..42a1328 100644
--- a/upb/upb/message/internal/accessors.h
+++ b/upb/upb/message/internal/accessors.h
@@ -31,13 +31,13 @@
#ifndef UPB_MESSAGE_INTERNAL_ACCESSORS_H_
#define UPB_MESSAGE_INTERNAL_ACCESSORS_H_
-#include "upb/collections/internal/map.h"
-#include "upb/message/internal/extension.h"
-#include "upb/message/internal/message.h"
-#include "upb/mini_table/internal/field.h"
+#include "upb/upb/collections/internal/map.h"
+#include "upb/upb/message/internal/extension.h"
+#include "upb/upb/message/internal/message.h"
+#include "upb/upb/mini_table/internal/field.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#if defined(__GNUC__) && !defined(__clang__)
// GCC raises incorrect warnings in these functions. It thinks that we are
@@ -385,6 +385,6 @@
#pragma GCC diagnostic pop
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif // UPB_MESSAGE_INTERNAL_ACCESSORS_H_
diff --git a/upb/upb/message/internal/extension.h b/upb/upb/message/internal/extension.h
index 01329c1..a028290 100644
--- a/upb/upb/message/internal/extension.h
+++ b/upb/upb/message/internal/extension.h
@@ -31,14 +31,14 @@
#ifndef UPB_MESSAGE_INTERNAL_EXTENSION_H_
#define UPB_MESSAGE_INTERNAL_EXTENSION_H_
-#include "upb/base/descriptor_constants.h"
-#include "upb/base/string_view.h"
-#include "upb/mem/arena.h"
-#include "upb/message/message.h"
-#include "upb/mini_table/extension.h"
+#include "upb/upb/base/descriptor_constants.h"
+#include "upb/upb/base/string_view.h"
+#include "upb/upb/mem/arena.h"
+#include "upb/upb/message/message.h"
+#include "upb/upb/mini_table/extension.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
// The internal representation of an extension is self-describing: it contains
// enough information that we can serialize it to binary format without needing
@@ -81,6 +81,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_MESSAGE_INTERNAL_EXTENSION_H_ */
diff --git a/upb/upb/message/internal/message.h b/upb/upb/message/internal/message.h
index dd891de..e6e7633 100644
--- a/upb/upb/message/internal/message.h
+++ b/upb/upb/message/internal/message.h
@@ -41,16 +41,16 @@
#include <stdlib.h>
#include <string.h>
-#include "upb/hash/common.h"
-#include "upb/message/internal/extension.h"
-#include "upb/message/internal/types.h"
-#include "upb/message/message.h"
-#include "upb/mini_table/extension.h"
-#include "upb/mini_table/extension_registry.h"
-#include "upb/mini_table/message.h"
+#include "upb/upb/hash/common.h"
+#include "upb/upb/message/internal/extension.h"
+#include "upb/upb/message/internal/types.h"
+#include "upb/upb/message/message.h"
+#include "upb/upb/mini_table/extension.h"
+#include "upb/upb/mini_table/extension_registry.h"
+#include "upb/upb/mini_table/message.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -125,6 +125,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_MESSAGE_INTERNAL_H_ */
diff --git a/upb/upb/message/message.c b/upb/upb/message/message.c
index 30a16dc..ade0172 100644
--- a/upb/upb/message/message.c
+++ b/upb/upb/message/message.c
@@ -28,15 +28,15 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/message/message.h"
+#include "upb/upb/message/message.h"
#include <math.h>
-#include "upb/base/internal/log2.h"
-#include "upb/message/internal/message.h"
+#include "upb/upb/base/internal/log2.h"
+#include "upb/upb/message/internal/message.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
const float kUpb_FltInfinity = INFINITY;
const double kUpb_Infinity = INFINITY;
diff --git a/upb/upb/message/message.h b/upb/upb/message/message.h
index 5d65645..e699809 100644
--- a/upb/upb/message/message.h
+++ b/upb/upb/message/message.h
@@ -37,12 +37,12 @@
#include <stddef.h>
-#include "upb/mem/arena.h"
-#include "upb/message/types.h" // IWYU pragma: export
-#include "upb/mini_table/message.h"
+#include "upb/upb/mem/arena.h"
+#include "upb/upb/message/types.h" // IWYU pragma: export
+#include "upb/upb/mini_table/message.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -70,6 +70,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_MESSAGE_MESSAGE_H_ */
diff --git a/upb/upb/message/promote.c b/upb/upb/message/promote.c
index 99ec101..b63fd8d 100644
--- a/upb/upb/message/promote.c
+++ b/upb/upb/message/promote.c
@@ -28,21 +28,21 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/message/promote.h"
+#include "upb/upb/message/promote.h"
-#include "upb/collections/array.h"
-#include "upb/collections/internal/array.h"
-#include "upb/collections/map.h"
-#include "upb/message/accessors.h"
-#include "upb/message/message.h"
-#include "upb/mini_table/field.h"
-#include "upb/wire/decode.h"
-#include "upb/wire/encode.h"
-#include "upb/wire/eps_copy_input_stream.h"
-#include "upb/wire/reader.h"
+#include "upb/upb/collections/array.h"
+#include "upb/upb/collections/internal/array.h"
+#include "upb/upb/collections/map.h"
+#include "upb/upb/message/accessors.h"
+#include "upb/upb/message/message.h"
+#include "upb/upb/mini_table/field.h"
+#include "upb/upb/wire/decode.h"
+#include "upb/upb/wire/encode.h"
+#include "upb/upb/wire/eps_copy_input_stream.h"
+#include "upb/upb/wire/reader.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
// Parses unknown data by merging into existing base_message or creating a
// new message usingg mini_table.
diff --git a/upb/upb/message/promote.h b/upb/upb/message/promote.h
index 48737ee..6eb65cf 100644
--- a/upb/upb/message/promote.h
+++ b/upb/upb/message/promote.h
@@ -31,12 +31,12 @@
#ifndef UPB_MESSAGE_PROMOTE_H_
#define UPB_MESSAGE_PROMOTE_H_
-#include "upb/collections/array.h"
-#include "upb/message/internal/extension.h"
-#include "upb/wire/decode.h"
+#include "upb/upb/collections/array.h"
+#include "upb/upb/message/internal/extension.h"
+#include "upb/upb/wire/decode.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -177,6 +177,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif // UPB_MESSAGE_PROMOTE_H_
diff --git a/upb/upb/message/promote_test.cc b/upb/upb/message/promote_test.cc
index 225e1ce..0d53a8f 100644
--- a/upb/upb/message/promote_test.cc
+++ b/upb/upb/message/promote_test.cc
@@ -34,25 +34,25 @@
* accessed through reflective APIs exposed through mini table accessors.
*/
-#include "upb/message/promote.h"
+#include "upb/upb/message/promote.h"
#include <string>
#include "gtest/gtest.h"
#include "google/protobuf/test_messages_proto2.upb.h"
#include "google/protobuf/test_messages_proto3.upb.h"
-#include "upb/base/string_view.h"
-#include "upb/collections/array.h"
-#include "upb/mem/arena.hpp"
-#include "upb/message/accessors.h"
-#include "upb/message/copy.h"
-#include "upb/mini_descriptor/internal/encode.hpp"
-#include "upb/mini_descriptor/internal/modifiers.h"
-#include "upb/test/test.upb.h"
-#include "upb/wire/decode.h"
+#include "upb/upb/base/string_view.h"
+#include "upb/upb/collections/array.h"
+#include "upb/upb/mem/arena.hpp"
+#include "upb/upb/message/accessors.h"
+#include "upb/upb/message/copy.h"
+#include "upb/upb/mini_descriptor/internal/encode.hpp"
+#include "upb/upb/mini_descriptor/internal/modifiers.h"
+#include "upb/upb/test/test.upb.h"
+#include "upb/upb/wire/decode.h"
// Must be last
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
namespace {
diff --git a/upb/upb/message/tagged_ptr.h b/upb/upb/message/tagged_ptr.h
index ede7fee..5e05fc3 100644
--- a/upb/upb/message/tagged_ptr.h
+++ b/upb/upb/message/tagged_ptr.h
@@ -33,10 +33,10 @@
#include <stdint.h>
-#include "upb/message/types.h" // IWYU pragma: export
+#include "upb/upb/message/types.h" // IWYU pragma: export
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -87,6 +87,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_MINI_TABLE_TYPES_H_ */
diff --git a/upb/upb/message/test.cc b/upb/upb/message/test.cc
index c016b24..b247105 100644
--- a/upb/upb/message/test.cc
+++ b/upb/upb/message/test.cc
@@ -34,15 +34,15 @@
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "google/protobuf/test_messages_proto3.upb.h"
-#include "upb/base/status.hpp"
-#include "upb/json/decode.h"
-#include "upb/json/encode.h"
-#include "upb/mem/arena.hpp"
-#include "upb/message/test.upb.h"
-#include "upb/message/test.upbdefs.h"
-#include "upb/reflection/def.hpp"
-#include "upb/test/fuzz_util.h"
-#include "upb/wire/decode.h"
+#include "upb/upb/base/status.hpp"
+#include "upb/upb/json/decode.h"
+#include "upb/upb/json/encode.h"
+#include "upb/upb/mem/arena.hpp"
+#include "upb/upb/message/test.upb.h"
+#include "upb/upb/message/test.upbdefs.h"
+#include "upb/upb/reflection/def.hpp"
+#include "upb/upb/test/fuzz_util.h"
+#include "upb/upb/wire/decode.h"
// begin:google_only
// #include "testing/fuzzing/fuzztest.h"
diff --git a/upb/upb/mini_descriptor/BUILD b/upb/upb/mini_descriptor/BUILD
index db70056..5bdade7 100644
--- a/upb/upb/mini_descriptor/BUILD
+++ b/upb/upb/mini_descriptor/BUILD
@@ -1,5 +1,5 @@
load(
- "//bazel:build_defs.bzl",
+ "//upb/bazel:build_defs.bzl",
"UPB_DEFAULT_COPTS",
"UPB_DEFAULT_CPPOPTS",
)
@@ -20,11 +20,11 @@
visibility = ["//visibility:public"],
deps = [
":internal",
- "//:base",
- "//:mem",
- "//:mini_table",
- "//:mini_table_internal",
- "//:port",
+ "//upb:base",
+ "//upb:mem",
+ "//upb:mini_table",
+ "//upb:mini_table_internal",
+ "//upb:port",
],
)
@@ -45,9 +45,9 @@
copts = UPB_DEFAULT_COPTS,
visibility = ["//visibility:public"],
deps = [
- "//:base",
- "//:base_internal",
- "//:port",
+ "//upb:base",
+ "//upb:base_internal",
+ "//upb:port",
],
)
@@ -58,14 +58,14 @@
deps = [
":internal",
":mini_descriptor",
- "//:base",
- "//:mem",
- "//:message_accessors_internal",
- "//:mini_table",
- "//:wire",
+ "//:protobuf",
+ "//upb:base",
+ "//upb:mem",
+ "//upb:message_accessors_internal",
+ "//upb:mini_table",
+ "//upb:wire",
"@com_google_absl//absl/container:flat_hash_set",
"@com_google_googletest//:gtest_main",
- "@com_google_protobuf//:protobuf",
],
)
@@ -79,8 +79,8 @@
],
),
visibility = [
- "//cmake:__pkg__",
- "//python/dist:__pkg__",
+ "//upb/cmake:__pkg__",
+ "//upb/python/dist:__pkg__",
]
)
# end:github_only
diff --git a/upb/upb/mini_descriptor/build_enum.c b/upb/upb/mini_descriptor/build_enum.c
index 152a7ce..4bff47b 100644
--- a/upb/upb/mini_descriptor/build_enum.c
+++ b/upb/upb/mini_descriptor/build_enum.c
@@ -28,14 +28,14 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/mini_descriptor/build_enum.h"
+#include "upb/upb/mini_descriptor/build_enum.h"
-#include "upb/mini_descriptor/internal/decoder.h"
-#include "upb/mini_descriptor/internal/wire_constants.h"
-#include "upb/mini_table/internal/enum.h"
+#include "upb/upb/mini_descriptor/internal/decoder.h"
+#include "upb/upb/mini_descriptor/internal/wire_constants.h"
+#include "upb/upb/mini_table/internal/enum.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
typedef struct {
upb_MdDecoder base;
diff --git a/upb/upb/mini_descriptor/build_enum.h b/upb/upb/mini_descriptor/build_enum.h
index 8b6e567..d49e75e 100644
--- a/upb/upb/mini_descriptor/build_enum.h
+++ b/upb/upb/mini_descriptor/build_enum.h
@@ -31,12 +31,12 @@
#ifndef UPB_MINI_DESCRIPTOR_BUILD_ENUM_H_
#define UPB_MINI_DESCRIPTOR_BUILD_ENUM_H_
-#include "upb/base/status.h"
-#include "upb/mem/arena.h"
-#include "upb/mini_table/enum.h"
+#include "upb/upb/base/status.h"
+#include "upb/upb/mem/arena.h"
+#include "upb/upb/mini_table/enum.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -61,6 +61,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif // UPB_MINI_DESCRIPTOR_BUILD_ENUM_H_
diff --git a/upb/upb/mini_descriptor/decode.c b/upb/upb/mini_descriptor/decode.c
index 52019fe..d2bf549 100644
--- a/upb/upb/mini_descriptor/decode.c
+++ b/upb/upb/mini_descriptor/decode.c
@@ -28,20 +28,20 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/mini_descriptor/decode.h"
+#include "upb/upb/mini_descriptor/decode.h"
#include <inttypes.h>
#include <stdlib.h>
-#include "upb/base/string_view.h"
-#include "upb/mem/arena.h"
-#include "upb/mini_descriptor/internal/base92.h"
-#include "upb/mini_descriptor/internal/decoder.h"
-#include "upb/mini_descriptor/internal/modifiers.h"
-#include "upb/mini_descriptor/internal/wire_constants.h"
+#include "upb/upb/base/string_view.h"
+#include "upb/upb/mem/arena.h"
+#include "upb/upb/mini_descriptor/internal/base92.h"
+#include "upb/upb/mini_descriptor/internal/decoder.h"
+#include "upb/upb/mini_descriptor/internal/modifiers.h"
+#include "upb/upb/mini_descriptor/internal/wire_constants.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
// Note: we sort by this number when calculating layout order.
typedef enum {
diff --git a/upb/upb/mini_descriptor/decode.h b/upb/upb/mini_descriptor/decode.h
index 81e3a71..4ae8fa8 100644
--- a/upb/upb/mini_descriptor/decode.h
+++ b/upb/upb/mini_descriptor/decode.h
@@ -31,22 +31,22 @@
#ifndef UPB_MINI_TABLE_DECODE_H_
#define UPB_MINI_TABLE_DECODE_H_
-#include "upb/base/status.h"
-#include "upb/mem/arena.h"
-#include "upb/mini_table/extension.h"
-#include "upb/mini_table/field.h"
-#include "upb/mini_table/message.h"
-#include "upb/mini_table/sub.h"
+#include "upb/upb/base/status.h"
+#include "upb/upb/mem/arena.h"
+#include "upb/upb/mini_table/extension.h"
+#include "upb/upb/mini_table/field.h"
+#include "upb/upb/mini_table/message.h"
+#include "upb/upb/mini_table/sub.h"
// Export the newer headers, for legacy users. New users should include the
// more specific headers directly.
// IWYU pragma: begin_exports
-#include "upb/mini_descriptor/build_enum.h"
-#include "upb/mini_descriptor/link.h"
+#include "upb/upb/mini_descriptor/build_enum.h"
+#include "upb/upb/mini_descriptor/link.h"
// IWYU pragma: end_exports
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
typedef enum {
kUpb_MiniTablePlatform_32Bit,
@@ -138,6 +138,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_MINI_TABLE_DECODE_H_ */
diff --git a/upb/upb/mini_descriptor/internal/base92.c b/upb/upb/mini_descriptor/internal/base92.c
index 6890e50..b99b7b4 100644
--- a/upb/upb/mini_descriptor/internal/base92.c
+++ b/upb/upb/mini_descriptor/internal/base92.c
@@ -28,7 +28,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/mini_descriptor/internal/base92.h"
+#include "upb/upb/mini_descriptor/internal/base92.h"
const char _kUpb_ToBase92[] = {
' ', '!', '#', '$', '%', '&', '(', ')', '*', '+', ',', '-', '.', '/',
diff --git a/upb/upb/mini_descriptor/internal/base92.h b/upb/upb/mini_descriptor/internal/base92.h
index ff515e9..7d439ba 100644
--- a/upb/upb/mini_descriptor/internal/base92.h
+++ b/upb/upb/mini_descriptor/internal/base92.h
@@ -33,10 +33,10 @@
#include <stdint.h>
-#include "upb/base/internal/log2.h"
+#include "upb/upb/base/internal/log2.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -81,6 +81,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif // UPB_MINI_DESCRIPTOR_INTERNAL_BASE92_H_
diff --git a/upb/upb/mini_descriptor/internal/decoder.h b/upb/upb/mini_descriptor/internal/decoder.h
index cde5d1d..c783674 100644
--- a/upb/upb/mini_descriptor/internal/decoder.h
+++ b/upb/upb/mini_descriptor/internal/decoder.h
@@ -31,11 +31,11 @@
#ifndef UPB_MINI_DESCRIPTOR_INTERNAL_DECODER_H_
#define UPB_MINI_DESCRIPTOR_INTERNAL_DECODER_H_
-#include "upb/base/status.h"
-#include "upb/mini_descriptor/internal/base92.h"
+#include "upb/upb/base/status.h"
+#include "upb/upb/mini_descriptor/internal/base92.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
// upb_MdDecoder: used internally for decoding MiniDescriptors for messages,
// extensions, and enums.
@@ -71,6 +71,6 @@
return ptr;
}
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif // UPB_MINI_DESCRIPTOR_INTERNAL_DECODER_H_
diff --git a/upb/upb/mini_descriptor/internal/encode.c b/upb/upb/mini_descriptor/internal/encode.c
index 2570b16..57838c6 100644
--- a/upb/upb/mini_descriptor/internal/encode.c
+++ b/upb/upb/mini_descriptor/internal/encode.c
@@ -28,15 +28,15 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/mini_descriptor/internal/encode.h"
+#include "upb/upb/mini_descriptor/internal/encode.h"
-#include "upb/base/internal/log2.h"
-#include "upb/mini_descriptor/internal/base92.h"
-#include "upb/mini_descriptor/internal/modifiers.h"
-#include "upb/mini_descriptor/internal/wire_constants.h"
+#include "upb/upb/base/internal/log2.h"
+#include "upb/upb/mini_descriptor/internal/base92.h"
+#include "upb/upb/mini_descriptor/internal/modifiers.h"
+#include "upb/upb/mini_descriptor/internal/wire_constants.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
typedef struct {
uint64_t present_values_mask;
diff --git a/upb/upb/mini_descriptor/internal/encode.h b/upb/upb/mini_descriptor/internal/encode.h
index 104ae31..44fbf10 100644
--- a/upb/upb/mini_descriptor/internal/encode.h
+++ b/upb/upb/mini_descriptor/internal/encode.h
@@ -33,10 +33,10 @@
#include <stdint.h>
-#include "upb/base/descriptor_constants.h"
+#include "upb/upb/base/descriptor_constants.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
// If the input buffer has at least this many bytes available, the encoder call
// is guaranteed to succeed (as long as field number order is maintained).
@@ -110,6 +110,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_MINI_DESCRIPTOR_INTERNAL_ENCODE_H_ */
diff --git a/upb/upb/mini_descriptor/internal/encode.hpp b/upb/upb/mini_descriptor/internal/encode.hpp
index d8b3113..4b6657b 100644
--- a/upb/upb/mini_descriptor/internal/encode.hpp
+++ b/upb/upb/mini_descriptor/internal/encode.hpp
@@ -33,8 +33,8 @@
#include <string>
-#include "upb/base/internal/log2.h"
-#include "upb/mini_descriptor/internal/encode.h"
+#include "upb/upb/base/internal/log2.h"
+#include "upb/upb/mini_descriptor/internal/encode.h"
namespace upb {
diff --git a/upb/upb/mini_descriptor/internal/encode_test.cc b/upb/upb/mini_descriptor/internal/encode_test.cc
index d40401d..127fa90 100644
--- a/upb/upb/mini_descriptor/internal/encode_test.cc
+++ b/upb/upb/mini_descriptor/internal/encode_test.cc
@@ -28,7 +28,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/mini_descriptor/internal/encode.hpp"
+#include "upb/upb/mini_descriptor/internal/encode.hpp"
#include <string_view>
#include <vector>
@@ -37,14 +37,14 @@
#include "gtest/gtest.h"
#include "absl/container/flat_hash_set.h"
#include "google/protobuf/descriptor.h"
-#include "upb/base/status.hpp"
-#include "upb/mem/arena.hpp"
-#include "upb/message/internal/accessors.h"
-#include "upb/mini_descriptor/decode.h"
-#include "upb/mini_descriptor/internal/base92.h"
-#include "upb/mini_descriptor/internal/modifiers.h"
-#include "upb/mini_table/enum.h"
-#include "upb/wire/decode.h"
+#include "upb/upb/base/status.hpp"
+#include "upb/upb/mem/arena.hpp"
+#include "upb/upb/message/internal/accessors.h"
+#include "upb/upb/mini_descriptor/decode.h"
+#include "upb/upb/mini_descriptor/internal/base92.h"
+#include "upb/upb/mini_descriptor/internal/modifiers.h"
+#include "upb/upb/mini_table/enum.h"
+#include "upb/upb/wire/decode.h"
// begin:google_only
// #include "testing/fuzzing/fuzztest.h"
diff --git a/upb/upb/mini_descriptor/internal/modifiers.h b/upb/upb/mini_descriptor/internal/modifiers.h
index bd4ee21..314297c 100644
--- a/upb/upb/mini_descriptor/internal/modifiers.h
+++ b/upb/upb/mini_descriptor/internal/modifiers.h
@@ -32,7 +32,7 @@
#define UPB_MINI_DESCRIPTOR_INTERNAL_MODIFIERS_H_
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
typedef enum {
kUpb_FieldModifier_IsRepeated = 1 << 0,
@@ -48,6 +48,6 @@
kUpb_MessageModifier_IsExtendable = 1 << 2,
} kUpb_MessageModifier;
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif // UPB_MINI_DESCRIPTOR_INTERNAL_MODIFIERS_H_
diff --git a/upb/upb/mini_descriptor/internal/wire_constants.h b/upb/upb/mini_descriptor/internal/wire_constants.h
index f24306a..d947878 100644
--- a/upb/upb/mini_descriptor/internal/wire_constants.h
+++ b/upb/upb/mini_descriptor/internal/wire_constants.h
@@ -31,10 +31,10 @@
#ifndef UPB_MINI_DESCRIPTOR_INTERNAL_WIRE_CONSTANTS_H_
#define UPB_MINI_DESCRIPTOR_INTERNAL_WIRE_CONSTANTS_H_
-#include "upb/base/descriptor_constants.h"
+#include "upb/upb/base/descriptor_constants.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
typedef enum {
kUpb_EncodedType_Double = 0,
@@ -89,6 +89,6 @@
kUpb_EncodedVersion_MessageSetV1 = '&',
};
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif // UPB_MINI_DESCRIPTOR_INTERNAL_WIRE_CONSTANTS_H_
diff --git a/upb/upb/mini_descriptor/link.c b/upb/upb/mini_descriptor/link.c
index 82b0084..fbf3ef9 100644
--- a/upb/upb/mini_descriptor/link.c
+++ b/upb/upb/mini_descriptor/link.c
@@ -28,10 +28,10 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/mini_descriptor/link.h"
+#include "upb/upb/mini_descriptor/link.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
bool upb_MiniTable_SetSubMessage(upb_MiniTable* table,
upb_MiniTableField* field,
diff --git a/upb/upb/mini_descriptor/link.h b/upb/upb/mini_descriptor/link.h
index 65e728e..b9d62fa 100644
--- a/upb/upb/mini_descriptor/link.h
+++ b/upb/upb/mini_descriptor/link.h
@@ -39,15 +39,15 @@
#ifndef UPB_MINI_DESCRIPTOR_LINK_H_
#define UPB_MINI_DESCRIPTOR_LINK_H_
-#include "upb/base/status.h"
-#include "upb/mem/arena.h"
-#include "upb/mini_table/extension.h"
-#include "upb/mini_table/field.h"
-#include "upb/mini_table/message.h"
-#include "upb/mini_table/sub.h"
+#include "upb/upb/base/status.h"
+#include "upb/upb/mem/arena.h"
+#include "upb/upb/mini_table/extension.h"
+#include "upb/upb/mini_table/field.h"
+#include "upb/upb/mini_table/message.h"
+#include "upb/upb/mini_table/sub.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -102,6 +102,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif // UPB_MINI_DESCRIPTOR_LINK_H_
diff --git a/upb/upb/mini_table/BUILD b/upb/upb/mini_table/BUILD
index 264643e..315b9d9 100644
--- a/upb/upb/mini_table/BUILD
+++ b/upb/upb/mini_table/BUILD
@@ -6,7 +6,7 @@
# https://developers.google.com/open-source/licenses/bsd
load(
- "//bazel:build_defs.bzl",
+ "//upb/bazel:build_defs.bzl",
"UPB_DEFAULT_COPTS",
)
@@ -21,11 +21,11 @@
# ],
# compatible_with = ["//buildenv/target:non_prod"],
# copts = UPB_DEFAULT_COPTS,
-# visibility = ["//:__pkg__"],
+# visibility = ["//upb:__pkg__"],
# deps = [
# ":mini_table",
-# "//:base",
-# "//:port",
+# "//upb:base",
+# "//upb:port",
# ],
# )
# end:google_only
@@ -49,11 +49,11 @@
visibility = ["//visibility:public"],
deps = [
":internal",
- "//:base",
- "//:hash",
- "//:mem",
- "//:message_types",
- "//:port",
+ "//upb:base",
+ "//upb:hash",
+ "//upb:mem",
+ "//upb:message_types",
+ "//upb:port",
],
)
@@ -72,9 +72,9 @@
],
visibility = ["//visibility:public"],
deps = [
- "//:base",
- "//:message_types",
- "//:port",
+ "//upb:base",
+ "//upb:message_types",
+ "//upb:port",
],
)
@@ -88,8 +88,8 @@
],
),
visibility = [
- "//cmake:__pkg__",
- "//python/dist:__pkg__",
+ "//upb/cmake:__pkg__",
+ "//upb/python/dist:__pkg__",
]
)
# end:github_only
diff --git a/upb/upb/mini_table/compat.c b/upb/upb/mini_table/compat.c
index 26c69dd..89036bc 100644
--- a/upb/upb/mini_table/compat.c
+++ b/upb/upb/mini_table/compat.c
@@ -28,14 +28,14 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/mini_table/compat.h"
+#include "upb/upb/mini_table/compat.h"
-#include "upb/base/descriptor_constants.h"
-#include "upb/mini_table/field.h"
-#include "upb/mini_table/message.h"
+#include "upb/upb/base/descriptor_constants.h"
+#include "upb/upb/mini_table/field.h"
+#include "upb/upb/mini_table/message.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
static bool upb_deep_check(const upb_MiniTable* src, const upb_MiniTable* dst,
bool eq) {
diff --git a/upb/upb/mini_table/compat.h b/upb/upb/mini_table/compat.h
index d79f99a..042d529 100644
--- a/upb/upb/mini_table/compat.h
+++ b/upb/upb/mini_table/compat.h
@@ -31,10 +31,10 @@
#ifndef UPB_MINI_TABLE_COMPAT_H_
#define UPB_MINI_TABLE_COMPAT_H_
-#include "upb/mini_table/message.h"
+#include "upb/upb/mini_table/message.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
// upb does not support mixing minitables from different sources but these
// functions are still used by some existing users so for now we make them
@@ -56,6 +56,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_MINI_TABLE_COMPAT_H_ */
diff --git a/upb/upb/mini_table/enum.h b/upb/upb/mini_table/enum.h
index 3a439fa..9963673 100644
--- a/upb/upb/mini_table/enum.h
+++ b/upb/upb/mini_table/enum.h
@@ -31,10 +31,10 @@
#ifndef UPB_MINI_TABLE_ENUM_H_
#define UPB_MINI_TABLE_ENUM_H_
-#include "upb/mini_table/internal/enum.h"
+#include "upb/upb/mini_table/internal/enum.h"
// Must be last
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
typedef struct upb_MiniTableEnum upb_MiniTableEnum;
@@ -48,6 +48,6 @@
return status == _kUpb_FastEnumCheck_ValueIsInEnum ? true : false;
}
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_MINI_TABLE_ENUM_H_ */
diff --git a/upb/upb/mini_table/extension.h b/upb/upb/mini_table/extension.h
index 9589aa4..a400194 100644
--- a/upb/upb/mini_table/extension.h
+++ b/upb/upb/mini_table/extension.h
@@ -31,13 +31,13 @@
#ifndef UPB_MINI_TABLE_EXTENSION_H_
#define UPB_MINI_TABLE_EXTENSION_H_
-#include "upb/mini_table/internal/extension.h"
+#include "upb/upb/mini_table/internal/extension.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
typedef struct upb_MiniTableExtension upb_MiniTableExtension;
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_MINI_TABLE_EXTENSION_H_ */
diff --git a/upb/upb/mini_table/extension_registry.c b/upb/upb/mini_table/extension_registry.c
index 1483955..9fb1887 100644
--- a/upb/upb/mini_table/extension_registry.c
+++ b/upb/upb/mini_table/extension_registry.c
@@ -28,13 +28,13 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/mini_table/extension_registry.h"
+#include "upb/upb/mini_table/extension_registry.h"
-#include "upb/hash/str_table.h"
-#include "upb/mini_table/extension.h"
+#include "upb/upb/hash/str_table.h"
+#include "upb/upb/mini_table/extension.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#define EXTREG_KEY_SIZE (sizeof(upb_MiniTable*) + sizeof(uint32_t))
diff --git a/upb/upb/mini_table/extension_registry.h b/upb/upb/mini_table/extension_registry.h
index 973123a..8b0f28e 100644
--- a/upb/upb/mini_table/extension_registry.h
+++ b/upb/upb/mini_table/extension_registry.h
@@ -31,12 +31,12 @@
#ifndef UPB_MINI_TABLE_EXTENSION_REGISTRY_H_
#define UPB_MINI_TABLE_EXTENSION_REGISTRY_H_
-#include "upb/mem/arena.h"
-#include "upb/mini_table/extension.h"
-#include "upb/mini_table/message.h"
+#include "upb/upb/mem/arena.h"
+#include "upb/upb/mini_table/extension.h"
+#include "upb/upb/mini_table/message.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -103,6 +103,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_MINI_TABLE_EXTENSION_REGISTRY_H_ */
diff --git a/upb/upb/mini_table/field.h b/upb/upb/mini_table/field.h
index 17ea33b..329cecb 100644
--- a/upb/upb/mini_table/field.h
+++ b/upb/upb/mini_table/field.h
@@ -31,12 +31,12 @@
#ifndef UPB_MINI_TABLE_FIELD_H_
#define UPB_MINI_TABLE_FIELD_H_
-#include "upb/mini_table/internal/field.h"
-#include "upb/mini_table/internal/message.h"
-#include "upb/mini_table/internal/sub.h"
+#include "upb/upb/mini_table/internal/field.h"
+#include "upb/upb/mini_table/internal/message.h"
+#include "upb/upb/mini_table/internal/sub.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -116,6 +116,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_MINI_TABLE_FIELD_H_ */
diff --git a/upb/upb/mini_table/file.h b/upb/upb/mini_table/file.h
index 27f50b4..623c8e6 100644
--- a/upb/upb/mini_table/file.h
+++ b/upb/upb/mini_table/file.h
@@ -31,7 +31,7 @@
#ifndef UPB_MINI_TABLE_FILE_H_
#define UPB_MINI_TABLE_FILE_H_
-#include "upb/mini_table/internal/file.h"
+#include "upb/upb/mini_table/internal/file.h"
typedef struct upb_MiniTableFile upb_MiniTableFile;
diff --git a/upb/upb/mini_table/internal/enum.h b/upb/upb/mini_table/internal/enum.h
index 470326c..c9bc555 100644
--- a/upb/upb/mini_table/internal/enum.h
+++ b/upb/upb/mini_table/internal/enum.h
@@ -34,7 +34,7 @@
#include <stdint.h>
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
struct upb_MiniTableEnum {
uint32_t mask_limit; // Limit enum value that can be tested with mask.
@@ -76,6 +76,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_MINI_TABLE_INTERNAL_ENUM_H_ */
diff --git a/upb/upb/mini_table/internal/extension.h b/upb/upb/mini_table/internal/extension.h
index 3202caa..5fc148a 100644
--- a/upb/upb/mini_table/internal/extension.h
+++ b/upb/upb/mini_table/internal/extension.h
@@ -31,11 +31,11 @@
#ifndef UPB_MINI_TABLE_INTERNAL_EXTENSION_H_
#define UPB_MINI_TABLE_INTERNAL_EXTENSION_H_
-#include "upb/mini_table/internal/field.h"
-#include "upb/mini_table/internal/sub.h"
+#include "upb/upb/mini_table/internal/field.h"
+#include "upb/upb/mini_table/internal/sub.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
struct upb_MiniTableExtension {
// Do not move this field. We need to be able to alias pointers.
@@ -45,6 +45,6 @@
union upb_MiniTableSub sub; // NULL unless submessage or proto2 enum
};
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_MINI_TABLE_INTERNAL_EXTENSION_H_ */
diff --git a/upb/upb/mini_table/internal/field.h b/upb/upb/mini_table/internal/field.h
index 7a0ff51..e446a44 100644
--- a/upb/upb/mini_table/internal/field.h
+++ b/upb/upb/mini_table/internal/field.h
@@ -33,10 +33,10 @@
#include <stdint.h>
-#include "upb/base/descriptor_constants.h"
+#include "upb/upb/base/descriptor_constants.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
struct upb_MiniTableField {
uint32_t number;
@@ -132,6 +132,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_MINI_TABLE_INTERNAL_FIELD_H_ */
diff --git a/upb/upb/mini_table/internal/file.h b/upb/upb/mini_table/internal/file.h
index 9b8aa99..5935a16 100644
--- a/upb/upb/mini_table/internal/file.h
+++ b/upb/upb/mini_table/internal/file.h
@@ -31,12 +31,12 @@
#ifndef UPB_MINI_TABLE_INTERNAL_FILE_H_
#define UPB_MINI_TABLE_INTERNAL_FILE_H_
-#include "upb/mini_table/internal/enum.h"
-#include "upb/mini_table/internal/extension.h"
-#include "upb/mini_table/internal/message.h"
+#include "upb/upb/mini_table/internal/enum.h"
+#include "upb/upb/mini_table/internal/extension.h"
+#include "upb/upb/mini_table/internal/message.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
struct upb_MiniTableFile {
const struct upb_MiniTable** msgs;
@@ -47,6 +47,6 @@
int ext_count;
};
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_MINI_TABLE_INTERNAL_FILE_H_ */
diff --git a/upb/upb/mini_table/internal/message.c b/upb/upb/mini_table/internal/message.c
index 3704bae..3a2cfbf 100644
--- a/upb/upb/mini_table/internal/message.c
+++ b/upb/upb/mini_table/internal/message.c
@@ -28,7 +28,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/mini_table/internal/message.h"
+#include "upb/upb/mini_table/internal/message.h"
const struct upb_MiniTable _kUpb_MiniTable_Empty = {
.subs = NULL,
diff --git a/upb/upb/mini_table/internal/message.h b/upb/upb/mini_table/internal/message.h
index fc67203..00d67ee 100644
--- a/upb/upb/mini_table/internal/message.h
+++ b/upb/upb/mini_table/internal/message.h
@@ -31,11 +31,11 @@
#ifndef UPB_MINI_TABLE_INTERNAL_MESSAGE_H_
#define UPB_MINI_TABLE_INTERNAL_MESSAGE_H_
-#include "upb/message/types.h"
-#include "upb/mini_table/internal/field.h"
+#include "upb/upb/message/types.h"
+#include "upb/upb/mini_table/internal/field.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
struct upb_Decoder;
typedef const char* _upb_FieldParser(struct upb_Decoder* d, const char* ptr,
@@ -106,6 +106,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_MINI_TABLE_INTERNAL_MESSAGE_H_ */
diff --git a/upb/upb/mini_table/internal/sub.h b/upb/upb/mini_table/internal/sub.h
index b73639d..f0598f1 100644
--- a/upb/upb/mini_table/internal/sub.h
+++ b/upb/upb/mini_table/internal/sub.h
@@ -31,8 +31,8 @@
#ifndef UPB_MINI_TABLE_INTERNAL_SUB_H_
#define UPB_MINI_TABLE_INTERNAL_SUB_H_
-#include "upb/mini_table/internal/enum.h"
-#include "upb/mini_table/internal/message.h"
+#include "upb/upb/mini_table/internal/enum.h"
+#include "upb/upb/mini_table/internal/message.h"
union upb_MiniTableSub {
const struct upb_MiniTable* submsg;
diff --git a/upb/upb/mini_table/message.c b/upb/upb/mini_table/message.c
index f10934f..c568ae8 100644
--- a/upb/upb/mini_table/message.c
+++ b/upb/upb/mini_table/message.c
@@ -28,15 +28,15 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/mini_table/message.h"
+#include "upb/upb/mini_table/message.h"
#include <inttypes.h>
-#include "upb/mem/arena.h"
-#include "upb/mini_table/internal/message.h"
+#include "upb/upb/mem/arena.h"
+#include "upb/upb/mini_table/internal/message.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
const upb_MiniTableField* upb_MiniTable_FindFieldByNumber(
const upb_MiniTable* t, uint32_t number) {
diff --git a/upb/upb/mini_table/message.h b/upb/upb/mini_table/message.h
index cc5409f..19716b1 100644
--- a/upb/upb/mini_table/message.h
+++ b/upb/upb/mini_table/message.h
@@ -31,12 +31,12 @@
#ifndef UPB_MINI_TABLE_MESSAGE_H_
#define UPB_MINI_TABLE_MESSAGE_H_
-#include "upb/mini_table/enum.h"
-#include "upb/mini_table/field.h"
-#include "upb/mini_table/internal/message.h"
+#include "upb/upb/mini_table/enum.h"
+#include "upb/upb/mini_table/field.h"
+#include "upb/upb/mini_table/internal/message.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -103,6 +103,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_MINI_TABLE_MESSAGE_H_ */
diff --git a/upb/upb/mini_table/sub.h b/upb/upb/mini_table/sub.h
index 7f5d237..19890f2 100644
--- a/upb/upb/mini_table/sub.h
+++ b/upb/upb/mini_table/sub.h
@@ -31,7 +31,7 @@
#ifndef UPB_MINI_TABLE_SUB_H_
#define UPB_MINI_TABLE_SUB_H_
-#include "upb/mini_table/internal/sub.h"
+#include "upb/upb/mini_table/internal/sub.h"
typedef union upb_MiniTableSub upb_MiniTableSub;
diff --git a/upb/upb/port/BUILD b/upb/upb/port/BUILD
index b47c48e..2157ff0 100644
--- a/upb/upb/port/BUILD
+++ b/upb/upb/port/BUILD
@@ -5,7 +5,7 @@
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
-load("//bazel:build_defs.bzl", "UPB_DEFAULT_COPTS")
+load("//upb/bazel:build_defs.bzl", "UPB_DEFAULT_COPTS")
cc_library(
name = "port",
@@ -37,8 +37,8 @@
],
),
visibility = [
- "//cmake:__pkg__",
- "//python/dist:__pkg__",
+ "//upb/cmake:__pkg__",
+ "//upb/python/dist:__pkg__",
]
)
# end:github_only
diff --git a/upb/upb/port/atomic.h b/upb/upb/port/atomic.h
index 8c792bc..8c0d3b4 100644
--- a/upb/upb/port/atomic.h
+++ b/upb/upb/port/atomic.h
@@ -31,7 +31,7 @@
#ifndef UPB_PORT_ATOMIC_H_
#define UPB_PORT_ATOMIC_H_
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef UPB_USE_C11_ATOMICS
@@ -99,6 +99,6 @@
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif // UPB_PORT_ATOMIC_H_
diff --git a/upb/upb/port/def.inc b/upb/upb/port/def.inc
index b9798bf..c590edf 100644
--- a/upb/upb/port/def.inc
+++ b/upb/upb/port/def.inc
@@ -35,17 +35,17 @@
*
* The correct usage is:
*
- * #include "upb/foobar.h"
- * #include "upb/baz.h"
+ * #include "upb/upb/foobar.h"
+ * #include "upb/upb/baz.h"
*
* // MUST be last included header.
- * #include "upb/port/def.inc"
+ * #include "upb/upb/port/def.inc"
*
* // Code for this file.
* // <...>
*
* // Can be omitted for .c files, required for .h.
- * #include "upb/port/undef.inc"
+ * #include "upb/upb/port/undef.inc"
*
* This file is private and must not be included by users!
*/
diff --git a/upb/upb/port/vsnprintf_compat.h b/upb/upb/port/vsnprintf_compat.h
index 35c9697..3cea66a 100644
--- a/upb/upb/port/vsnprintf_compat.h
+++ b/upb/upb/port/vsnprintf_compat.h
@@ -32,7 +32,7 @@
#define UPB_PORT_VSNPRINTF_COMPAT_H_
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
UPB_INLINE int _upb_vsnprintf(char* buf, size_t size, const char* fmt,
va_list ap) {
@@ -48,6 +48,6 @@
#endif
}
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif // UPB_PORT_VSNPRINTF_COMPAT_H_
diff --git a/upb/upb/reflection/common.h b/upb/upb/reflection/common.h
index 0d60eed..d104df0 100644
--- a/upb/upb/reflection/common.h
+++ b/upb/upb/reflection/common.h
@@ -28,7 +28,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// IWYU pragma: private, include "upb/reflection/def.h"
+// IWYU pragma: private, include "upb/upb/reflection/def.h"
// Declarations common to all public def types.
diff --git a/upb/upb/reflection/def.h b/upb/upb/reflection/def.h
index 265fba9..dc5a958 100644
--- a/upb/upb/reflection/def.h
+++ b/upb/upb/reflection/def.h
@@ -32,16 +32,16 @@
#define UPB_REFLECTION_DEF_H_
// IWYU pragma: begin_exports
-#include "upb/reflection/def_pool.h"
-#include "upb/reflection/enum_def.h"
-#include "upb/reflection/enum_value_def.h"
-#include "upb/reflection/extension_range.h"
-#include "upb/reflection/field_def.h"
-#include "upb/reflection/file_def.h"
-#include "upb/reflection/message_def.h"
-#include "upb/reflection/method_def.h"
-#include "upb/reflection/oneof_def.h"
-#include "upb/reflection/service_def.h"
+#include "upb/upb/reflection/def_pool.h"
+#include "upb/upb/reflection/enum_def.h"
+#include "upb/upb/reflection/enum_value_def.h"
+#include "upb/upb/reflection/extension_range.h"
+#include "upb/upb/reflection/field_def.h"
+#include "upb/upb/reflection/file_def.h"
+#include "upb/upb/reflection/message_def.h"
+#include "upb/upb/reflection/method_def.h"
+#include "upb/upb/reflection/oneof_def.h"
+#include "upb/upb/reflection/service_def.h"
// IWYU pragma: end_exports
#endif /* UPB_REFLECTION_DEF_H_ */
diff --git a/upb/upb/reflection/def.hpp b/upb/upb/reflection/def.hpp
index 32264ae..c423c8e 100644
--- a/upb/upb/reflection/def.hpp
+++ b/upb/upb/reflection/def.hpp
@@ -36,15 +36,15 @@
#include <string>
#include <vector>
-#include "upb/base/status.hpp"
-#include "upb/mem/arena.hpp"
-#include "upb/reflection/def.h"
-#include "upb/reflection/internal/def_pool.h"
-#include "upb/reflection/internal/enum_def.h"
-#include "upb/reflection/message.h"
+#include "upb/upb/base/status.hpp"
+#include "upb/upb/mem/arena.hpp"
+#include "upb/upb/reflection/def.h"
+#include "upb/upb/reflection/internal/def_pool.h"
+#include "upb/upb/reflection/internal/enum_def.h"
+#include "upb/upb/reflection/message.h"
// Must be last
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
namespace upb {
@@ -623,6 +623,6 @@
} // namespace upb
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif // UPB_REFLECTION_DEF_HPP_
diff --git a/upb/upb/reflection/def_builder.c b/upb/upb/reflection/def_builder.c
index 93c4eb5..da502f3 100644
--- a/upb/upb/reflection/def_builder.c
+++ b/upb/upb/reflection/def_builder.c
@@ -28,16 +28,16 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/reflection/internal/def_builder.h"
+#include "upb/upb/reflection/internal/def_builder.h"
#include <string.h>
-#include "upb/reflection/def_pool.h"
-#include "upb/reflection/def_type.h"
-#include "upb/reflection/field_def.h"
+#include "upb/upb/reflection/def_pool.h"
+#include "upb/upb/reflection/def_type.h"
+#include "upb/upb/reflection/field_def.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
/* The upb core does not generally have a concept of default instances. However
* for descriptor options we make an exception since the max size is known and
diff --git a/upb/upb/reflection/def_builder_test.cc b/upb/upb/reflection/def_builder_test.cc
index 35d63a4..6e36584 100644
--- a/upb/upb/reflection/def_builder_test.cc
+++ b/upb/upb/reflection/def_builder_test.cc
@@ -28,14 +28,14 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/reflection/internal/def_builder.h"
+#include "upb/upb/reflection/internal/def_builder.h"
#include "gtest/gtest.h"
#include "absl/strings/string_view.h"
-#include "upb/mem/arena.hpp"
+#include "upb/upb/mem/arena.hpp"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
struct IdentTestData {
absl::string_view text;
diff --git a/upb/upb/reflection/def_pool.c b/upb/upb/reflection/def_pool.c
index 76733ff..fb7f074 100644
--- a/upb/upb/reflection/def_pool.c
+++ b/upb/upb/reflection/def_pool.c
@@ -28,21 +28,21 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/reflection/internal/def_pool.h"
+#include "upb/upb/reflection/internal/def_pool.h"
-#include "upb/hash/int_table.h"
-#include "upb/hash/str_table.h"
-#include "upb/reflection/def_type.h"
-#include "upb/reflection/internal/def_builder.h"
-#include "upb/reflection/internal/enum_def.h"
-#include "upb/reflection/internal/enum_value_def.h"
-#include "upb/reflection/internal/field_def.h"
-#include "upb/reflection/internal/file_def.h"
-#include "upb/reflection/internal/message_def.h"
-#include "upb/reflection/internal/service_def.h"
+#include "upb/upb/hash/int_table.h"
+#include "upb/upb/hash/str_table.h"
+#include "upb/upb/reflection/def_type.h"
+#include "upb/upb/reflection/internal/def_builder.h"
+#include "upb/upb/reflection/internal/enum_def.h"
+#include "upb/upb/reflection/internal/enum_value_def.h"
+#include "upb/upb/reflection/internal/field_def.h"
+#include "upb/upb/reflection/internal/file_def.h"
+#include "upb/upb/reflection/internal/message_def.h"
+#include "upb/upb/reflection/internal/service_def.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
struct upb_DefPool {
upb_Arena* arena;
diff --git a/upb/upb/reflection/def_pool.h b/upb/upb/reflection/def_pool.h
index 7ca3619..bd86199 100644
--- a/upb/upb/reflection/def_pool.h
+++ b/upb/upb/reflection/def_pool.h
@@ -28,18 +28,18 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// IWYU pragma: private, include "upb/reflection/def.h"
+// IWYU pragma: private, include "upb/upb/reflection/def.h"
#ifndef UPB_REFLECTION_DEF_POOL_H_
#define UPB_REFLECTION_DEF_POOL_H_
-#include "upb/base/status.h"
-#include "upb/base/string_view.h"
-#include "upb/reflection/common.h"
-#include "upb/reflection/def_type.h"
+#include "upb/upb/base/status.h"
+#include "upb/upb/base/string_view.h"
+#include "upb/upb/reflection/common.h"
+#include "upb/upb/reflection/def_type.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -105,6 +105,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_REFLECTION_DEF_POOL_H_ */
diff --git a/upb/upb/reflection/def_type.c b/upb/upb/reflection/def_type.c
index dee6b2c..fc7f7e9 100644
--- a/upb/upb/reflection/def_type.c
+++ b/upb/upb/reflection/def_type.c
@@ -28,10 +28,10 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/reflection/def_type.h"
+#include "upb/upb/reflection/def_type.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
upb_deftype_t _upb_DefType_Type(upb_value v) {
const uintptr_t num = (uintptr_t)upb_value_getconstptr(v);
diff --git a/upb/upb/reflection/def_type.h b/upb/upb/reflection/def_type.h
index 6e1b431..84c33d5 100644
--- a/upb/upb/reflection/def_type.h
+++ b/upb/upb/reflection/def_type.h
@@ -31,10 +31,10 @@
#ifndef UPB_REFLECTION_DEF_TYPE_H_
#define UPB_REFLECTION_DEF_TYPE_H_
-#include "upb/hash/common.h"
+#include "upb/upb/hash/common.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
// Inside a symtab we store tagged pointers to specific def types.
typedef enum {
@@ -79,6 +79,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_REFLECTION_DEF_TYPE_H_ */
diff --git a/upb/upb/reflection/desc_state.c b/upb/upb/reflection/desc_state.c
index 7868308..e110fba 100644
--- a/upb/upb/reflection/desc_state.c
+++ b/upb/upb/reflection/desc_state.c
@@ -28,10 +28,10 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/reflection/internal/desc_state.h"
+#include "upb/upb/reflection/internal/desc_state.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
bool _upb_DescState_Grow(upb_DescState* d, upb_Arena* a) {
const size_t oldbufsize = d->bufsize;
diff --git a/upb/upb/reflection/enum_def.c b/upb/upb/reflection/enum_def.c
index df384ba..5adf984 100644
--- a/upb/upb/reflection/enum_def.c
+++ b/upb/upb/reflection/enum_def.c
@@ -28,21 +28,21 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/reflection/internal/enum_def.h"
+#include "upb/upb/reflection/internal/enum_def.h"
-#include "upb/hash/int_table.h"
-#include "upb/hash/str_table.h"
-#include "upb/mini_descriptor/decode.h"
-#include "upb/reflection/def_type.h"
-#include "upb/reflection/internal/def_builder.h"
-#include "upb/reflection/internal/desc_state.h"
-#include "upb/reflection/internal/enum_reserved_range.h"
-#include "upb/reflection/internal/enum_value_def.h"
-#include "upb/reflection/internal/file_def.h"
-#include "upb/reflection/internal/message_def.h"
+#include "upb/upb/hash/int_table.h"
+#include "upb/upb/hash/str_table.h"
+#include "upb/upb/mini_descriptor/decode.h"
+#include "upb/upb/reflection/def_type.h"
+#include "upb/upb/reflection/internal/def_builder.h"
+#include "upb/upb/reflection/internal/desc_state.h"
+#include "upb/upb/reflection/internal/enum_reserved_range.h"
+#include "upb/upb/reflection/internal/enum_value_def.h"
+#include "upb/upb/reflection/internal/file_def.h"
+#include "upb/upb/reflection/internal/message_def.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
struct upb_EnumDef {
const UPB_DESC(EnumOptions) * opts;
diff --git a/upb/upb/reflection/enum_def.h b/upb/upb/reflection/enum_def.h
index 7ff0737..8953632 100644
--- a/upb/upb/reflection/enum_def.h
+++ b/upb/upb/reflection/enum_def.h
@@ -28,16 +28,16 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// IWYU pragma: private, include "upb/reflection/def.h"
+// IWYU pragma: private, include "upb/upb/reflection/def.h"
#ifndef UPB_REFLECTION_ENUM_DEF_H_
#define UPB_REFLECTION_ENUM_DEF_H_
-#include "upb/base/string_view.h"
-#include "upb/reflection/common.h"
+#include "upb/upb/base/string_view.h"
+#include "upb/upb/reflection/common.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -78,6 +78,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_REFLECTION_ENUM_DEF_H_ */
diff --git a/upb/upb/reflection/enum_reserved_range.c b/upb/upb/reflection/enum_reserved_range.c
index 906261c..da24d8e 100644
--- a/upb/upb/reflection/enum_reserved_range.c
+++ b/upb/upb/reflection/enum_reserved_range.c
@@ -28,14 +28,14 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/reflection/internal/enum_reserved_range.h"
+#include "upb/upb/reflection/internal/enum_reserved_range.h"
-#include "upb/reflection/enum_def.h"
-#include "upb/reflection/field_def.h"
-#include "upb/reflection/internal/def_builder.h"
+#include "upb/upb/reflection/enum_def.h"
+#include "upb/upb/reflection/field_def.h"
+#include "upb/upb/reflection/internal/def_builder.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
struct upb_EnumReservedRange {
int32_t start;
diff --git a/upb/upb/reflection/enum_reserved_range.h b/upb/upb/reflection/enum_reserved_range.h
index e1bf5ab..cb84ae5 100644
--- a/upb/upb/reflection/enum_reserved_range.h
+++ b/upb/upb/reflection/enum_reserved_range.h
@@ -28,15 +28,15 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// IWYU pragma: private, include "upb/reflection/def.h"
+// IWYU pragma: private, include "upb/upb/reflection/def.h"
#ifndef UPB_REFLECTION_ENUM_RESERVED_RANGE_H_
#define UPB_REFLECTION_ENUM_RESERVED_RANGE_H_
-#include "upb/reflection/common.h"
+#include "upb/upb/reflection/common.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -49,6 +49,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_REFLECTION_ENUM_RESERVED_RANGE_H_ */
diff --git a/upb/upb/reflection/enum_value_def.c b/upb/upb/reflection/enum_value_def.c
index 000697b..d12b550 100644
--- a/upb/upb/reflection/enum_value_def.c
+++ b/upb/upb/reflection/enum_value_def.c
@@ -28,15 +28,15 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/reflection/internal/enum_value_def.h"
+#include "upb/upb/reflection/internal/enum_value_def.h"
-#include "upb/reflection/def_type.h"
-#include "upb/reflection/internal/def_builder.h"
-#include "upb/reflection/internal/enum_def.h"
-#include "upb/reflection/internal/file_def.h"
+#include "upb/upb/reflection/def_type.h"
+#include "upb/upb/reflection/internal/def_builder.h"
+#include "upb/upb/reflection/internal/enum_def.h"
+#include "upb/upb/reflection/internal/file_def.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
struct upb_EnumValueDef {
const UPB_DESC(EnumValueOptions) * opts;
diff --git a/upb/upb/reflection/enum_value_def.h b/upb/upb/reflection/enum_value_def.h
index 6023103..efe0114 100644
--- a/upb/upb/reflection/enum_value_def.h
+++ b/upb/upb/reflection/enum_value_def.h
@@ -28,15 +28,15 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// IWYU pragma: private, include "upb/reflection/def.h"
+// IWYU pragma: private, include "upb/upb/reflection/def.h"
#ifndef UPB_REFLECTION_ENUM_VALUE_DEF_H_
#define UPB_REFLECTION_ENUM_VALUE_DEF_H_
-#include "upb/reflection/common.h"
+#include "upb/upb/reflection/common.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -55,6 +55,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_REFLECTION_ENUM_VALUE_DEF_H_ */
diff --git a/upb/upb/reflection/extension_range.c b/upb/upb/reflection/extension_range.c
index 43e723a..21c7dbb 100644
--- a/upb/upb/reflection/extension_range.c
+++ b/upb/upb/reflection/extension_range.c
@@ -28,14 +28,14 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/reflection/internal/extension_range.h"
+#include "upb/upb/reflection/internal/extension_range.h"
-#include "upb/reflection/field_def.h"
-#include "upb/reflection/internal/def_builder.h"
-#include "upb/reflection/message_def.h"
+#include "upb/upb/reflection/field_def.h"
+#include "upb/upb/reflection/internal/def_builder.h"
+#include "upb/upb/reflection/message_def.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
struct upb_ExtensionRange {
const UPB_DESC(ExtensionRangeOptions) * opts;
diff --git a/upb/upb/reflection/extension_range.h b/upb/upb/reflection/extension_range.h
index 9d87721..71f1e3d 100644
--- a/upb/upb/reflection/extension_range.h
+++ b/upb/upb/reflection/extension_range.h
@@ -28,15 +28,15 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// IWYU pragma: private, include "upb/reflection/def.h"
+// IWYU pragma: private, include "upb/upb/reflection/def.h"
#ifndef UPB_REFLECTION_EXTENSION_RANGE_H_
#define UPB_REFLECTION_EXTENSION_RANGE_H_
-#include "upb/reflection/common.h"
+#include "upb/upb/reflection/common.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -53,6 +53,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_REFLECTION_EXTENSION_RANGE_H_ */
diff --git a/upb/upb/reflection/field_def.c b/upb/upb/reflection/field_def.c
index 5789048..dc6ab1f 100644
--- a/upb/upb/reflection/field_def.c
+++ b/upb/upb/reflection/field_def.c
@@ -28,26 +28,26 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/reflection/internal/field_def.h"
+#include "upb/upb/reflection/internal/field_def.h"
#include <ctype.h>
#include <errno.h>
-#include "upb/mini_descriptor/decode.h"
-#include "upb/mini_descriptor/internal/modifiers.h"
-#include "upb/reflection/def.h"
-#include "upb/reflection/def_pool.h"
-#include "upb/reflection/def_type.h"
-#include "upb/reflection/internal/def_builder.h"
-#include "upb/reflection/internal/desc_state.h"
-#include "upb/reflection/internal/enum_def.h"
-#include "upb/reflection/internal/enum_value_def.h"
-#include "upb/reflection/internal/file_def.h"
-#include "upb/reflection/internal/message_def.h"
-#include "upb/reflection/internal/oneof_def.h"
+#include "upb/upb/mini_descriptor/decode.h"
+#include "upb/upb/mini_descriptor/internal/modifiers.h"
+#include "upb/upb/reflection/def.h"
+#include "upb/upb/reflection/def_pool.h"
+#include "upb/upb/reflection/def_type.h"
+#include "upb/upb/reflection/internal/def_builder.h"
+#include "upb/upb/reflection/internal/desc_state.h"
+#include "upb/upb/reflection/internal/enum_def.h"
+#include "upb/upb/reflection/internal/enum_value_def.h"
+#include "upb/upb/reflection/internal/file_def.h"
+#include "upb/upb/reflection/internal/message_def.h"
+#include "upb/upb/reflection/internal/oneof_def.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#define UPB_FIELD_TYPE_UNSPECIFIED 0
diff --git a/upb/upb/reflection/field_def.h b/upb/upb/reflection/field_def.h
index fb8b317..2e837bc 100644
--- a/upb/upb/reflection/field_def.h
+++ b/upb/upb/reflection/field_def.h
@@ -28,16 +28,16 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// IWYU pragma: private, include "upb/reflection/def.h"
+// IWYU pragma: private, include "upb/upb/reflection/def.h"
#ifndef UPB_REFLECTION_FIELD_DEF_H_
#define UPB_REFLECTION_FIELD_DEF_H_
-#include "upb/base/string_view.h"
-#include "upb/reflection/common.h"
+#include "upb/upb/base/string_view.h"
+#include "upb/upb/reflection/common.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
// Maximum field number allowed for FieldDefs.
// This is an inherent limit of the protobuf wire format.
@@ -91,6 +91,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_REFLECTION_FIELD_DEF_H_ */
diff --git a/upb/upb/reflection/file_def.c b/upb/upb/reflection/file_def.c
index 70109a7..5a4fab3 100644
--- a/upb/upb/reflection/file_def.c
+++ b/upb/upb/reflection/file_def.c
@@ -28,17 +28,17 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/reflection/internal/file_def.h"
+#include "upb/upb/reflection/internal/file_def.h"
-#include "upb/reflection/def_pool.h"
-#include "upb/reflection/internal/def_builder.h"
-#include "upb/reflection/internal/enum_def.h"
-#include "upb/reflection/internal/field_def.h"
-#include "upb/reflection/internal/message_def.h"
-#include "upb/reflection/internal/service_def.h"
+#include "upb/upb/reflection/def_pool.h"
+#include "upb/upb/reflection/internal/def_builder.h"
+#include "upb/upb/reflection/internal/enum_def.h"
+#include "upb/upb/reflection/internal/field_def.h"
+#include "upb/upb/reflection/internal/message_def.h"
+#include "upb/upb/reflection/internal/service_def.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
struct upb_FileDef {
const UPB_DESC(FileOptions) * opts;
diff --git a/upb/upb/reflection/file_def.h b/upb/upb/reflection/file_def.h
index 0860aae..9d8d64b 100644
--- a/upb/upb/reflection/file_def.h
+++ b/upb/upb/reflection/file_def.h
@@ -28,15 +28,15 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// IWYU pragma: private, include "upb/reflection/def.h"
+// IWYU pragma: private, include "upb/upb/reflection/def.h"
#ifndef UPB_REFLECTION_FILE_DEF_H_
#define UPB_REFLECTION_FILE_DEF_H_
-#include "upb/reflection/common.h"
+#include "upb/upb/reflection/common.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -75,6 +75,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_REFLECTION_FILE_DEF_H_ */
diff --git a/upb/upb/reflection/internal/def_builder.h b/upb/upb/reflection/internal/def_builder.h
index f32d98f..e19c0c2 100644
--- a/upb/upb/reflection/internal/def_builder.h
+++ b/upb/upb/reflection/internal/def_builder.h
@@ -31,12 +31,12 @@
#ifndef UPB_REFLECTION_DEF_BUILDER_INTERNAL_H_
#define UPB_REFLECTION_DEF_BUILDER_INTERNAL_H_
-#include "upb/reflection/common.h"
-#include "upb/reflection/def_type.h"
-#include "upb/reflection/internal/def_pool.h"
+#include "upb/upb/reflection/common.h"
+#include "upb/upb/reflection/def_type.h"
+#include "upb/upb/reflection/internal/def_pool.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
// We want to copy the options verbatim into the destination options proto.
// We use serialize+parse as our deep copy.
@@ -155,6 +155,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_REFLECTION_DEF_BUILDER_INTERNAL_H_ */
diff --git a/upb/upb/reflection/internal/def_pool.h b/upb/upb/reflection/internal/def_pool.h
index ce8f623..69bdf6f 100644
--- a/upb/upb/reflection/internal/def_pool.h
+++ b/upb/upb/reflection/internal/def_pool.h
@@ -31,11 +31,11 @@
#ifndef UPB_REFLECTION_DEF_POOL_INTERNAL_H_
#define UPB_REFLECTION_DEF_POOL_INTERNAL_H_
-#include "upb/mini_descriptor/decode.h"
-#include "upb/reflection/def_pool.h"
+#include "upb/upb/mini_descriptor/decode.h"
+#include "upb/upb/reflection/def_pool.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -75,6 +75,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_REFLECTION_DEF_POOL_INTERNAL_H_ */
diff --git a/upb/upb/reflection/internal/desc_state.h b/upb/upb/reflection/internal/desc_state.h
index eca7127..5356c2e 100644
--- a/upb/upb/reflection/internal/desc_state.h
+++ b/upb/upb/reflection/internal/desc_state.h
@@ -31,11 +31,11 @@
#ifndef UPB_REFLECTION_DESC_STATE_INTERNAL_H_
#define UPB_REFLECTION_DESC_STATE_INTERNAL_H_
-#include "upb/mem/arena.h"
-#include "upb/mini_descriptor/internal/encode.h"
+#include "upb/upb/mem/arena.h"
+#include "upb/upb/mini_descriptor/internal/encode.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
// Manages the storage for mini descriptor strings as they are being encoded.
// TODO(b/234740652): Move some of this state directly into the encoder, maybe.
@@ -62,6 +62,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_REFLECTION_DESC_STATE_INTERNAL_H_ */
diff --git a/upb/upb/reflection/internal/enum_def.h b/upb/upb/reflection/internal/enum_def.h
index 3e69280..9bfe5f9 100644
--- a/upb/upb/reflection/internal/enum_def.h
+++ b/upb/upb/reflection/internal/enum_def.h
@@ -31,10 +31,10 @@
#ifndef UPB_REFLECTION_ENUM_DEF_INTERNAL_H_
#define UPB_REFLECTION_ENUM_DEF_INTERNAL_H_
-#include "upb/reflection/enum_def.h"
+#include "upb/upb/reflection/enum_def.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -54,6 +54,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_REFLECTION_ENUM_DEF_INTERNAL_H_ */
diff --git a/upb/upb/reflection/internal/enum_reserved_range.h b/upb/upb/reflection/internal/enum_reserved_range.h
index 8c78399..6327714 100644
--- a/upb/upb/reflection/internal/enum_reserved_range.h
+++ b/upb/upb/reflection/internal/enum_reserved_range.h
@@ -31,10 +31,10 @@
#ifndef UPB_REFLECTION_ENUM_RESERVED_RANGE_INTERNAL_H_
#define UPB_REFLECTION_ENUM_RESERVED_RANGE_INTERNAL_H_
-#include "upb/reflection/enum_reserved_range.h"
+#include "upb/upb/reflection/enum_reserved_range.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -53,6 +53,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_REFLECTION_ENUM_RESERVED_RANGE_INTERNAL_H_ */
diff --git a/upb/upb/reflection/internal/enum_value_def.h b/upb/upb/reflection/internal/enum_value_def.h
index 164a092..93da425 100644
--- a/upb/upb/reflection/internal/enum_value_def.h
+++ b/upb/upb/reflection/internal/enum_value_def.h
@@ -31,10 +31,10 @@
#ifndef UPB_REFLECTION_ENUM_VALUE_DEF_INTERNAL_H_
#define UPB_REFLECTION_ENUM_VALUE_DEF_INTERNAL_H_
-#include "upb/reflection/enum_value_def.h"
+#include "upb/upb/reflection/enum_value_def.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -55,6 +55,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_REFLECTION_ENUM_VALUE_DEF_INTERNAL_H_ */
diff --git a/upb/upb/reflection/internal/extension_range.h b/upb/upb/reflection/internal/extension_range.h
index 972ffe5..b552d75 100644
--- a/upb/upb/reflection/internal/extension_range.h
+++ b/upb/upb/reflection/internal/extension_range.h
@@ -31,10 +31,10 @@
#ifndef UPB_REFLECTION_EXTENSION_RANGE_INTERNAL_H_
#define UPB_REFLECTION_EXTENSION_RANGE_INTERNAL_H_
-#include "upb/reflection/extension_range.h"
+#include "upb/upb/reflection/extension_range.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -52,6 +52,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_REFLECTION_EXTENSION_RANGE_INTERNAL_H_ */
diff --git a/upb/upb/reflection/internal/field_def.h b/upb/upb/reflection/internal/field_def.h
index 38f074d..4771175 100644
--- a/upb/upb/reflection/internal/field_def.h
+++ b/upb/upb/reflection/internal/field_def.h
@@ -31,10 +31,10 @@
#ifndef UPB_REFLECTION_FIELD_DEF_INTERNAL_H_
#define UPB_REFLECTION_FIELD_DEF_INTERNAL_H_
-#include "upb/reflection/field_def.h"
+#include "upb/upb/reflection/field_def.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -74,6 +74,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_REFLECTION_FIELD_DEF_INTERNAL_H_ */
diff --git a/upb/upb/reflection/internal/file_def.h b/upb/upb/reflection/internal/file_def.h
index 05a2f90..c6602e3 100644
--- a/upb/upb/reflection/internal/file_def.h
+++ b/upb/upb/reflection/internal/file_def.h
@@ -31,10 +31,10 @@
#ifndef UPB_REFLECTION_FILE_DEF_INTERNAL_H_
#define UPB_REFLECTION_FILE_DEF_INTERNAL_H_
-#include "upb/reflection/file_def.h"
+#include "upb/upb/reflection/file_def.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -55,6 +55,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_REFLECTION_FILE_DEF_INTERNAL_H_ */
diff --git a/upb/upb/reflection/internal/message_def.h b/upb/upb/reflection/internal/message_def.h
index 711ff27..894791b 100644
--- a/upb/upb/reflection/internal/message_def.h
+++ b/upb/upb/reflection/internal/message_def.h
@@ -31,10 +31,10 @@
#ifndef UPB_REFLECTION_MESSAGE_DEF_INTERNAL_H_
#define UPB_REFLECTION_MESSAGE_DEF_INTERNAL_H_
-#include "upb/reflection/message_def.h"
+#include "upb/upb/reflection/message_def.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -61,6 +61,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_REFLECTION_MESSAGE_DEF_INTERNAL_H_ */
diff --git a/upb/upb/reflection/internal/message_reserved_range.h b/upb/upb/reflection/internal/message_reserved_range.h
index fa0ed4a..5663f78 100644
--- a/upb/upb/reflection/internal/message_reserved_range.h
+++ b/upb/upb/reflection/internal/message_reserved_range.h
@@ -31,10 +31,10 @@
#ifndef UPB_REFLECTION_MESSAGE_RESERVED_RANGE_INTERNAL_H_
#define UPB_REFLECTION_MESSAGE_RESERVED_RANGE_INTERNAL_H_
-#include "upb/reflection/message_reserved_range.h"
+#include "upb/upb/reflection/message_reserved_range.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -53,6 +53,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_REFLECTION_MESSAGE_RESERVED_RANGE_INTERNAL_H_ */
diff --git a/upb/upb/reflection/internal/method_def.h b/upb/upb/reflection/internal/method_def.h
index b29b5fc..c7698fa 100644
--- a/upb/upb/reflection/internal/method_def.h
+++ b/upb/upb/reflection/internal/method_def.h
@@ -31,10 +31,10 @@
#ifndef UPB_REFLECTION_METHOD_DEF_INTERNAL_H_
#define UPB_REFLECTION_METHOD_DEF_INTERNAL_H_
-#include "upb/reflection/method_def.h"
+#include "upb/upb/reflection/method_def.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -51,6 +51,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_REFLECTION_METHOD_DEF_INTERNAL_H_ */
diff --git a/upb/upb/reflection/internal/oneof_def.h b/upb/upb/reflection/internal/oneof_def.h
index e4678ae..92b97b3 100644
--- a/upb/upb/reflection/internal/oneof_def.h
+++ b/upb/upb/reflection/internal/oneof_def.h
@@ -31,10 +31,10 @@
#ifndef UPB_REFLECTION_ONEOF_DEF_INTERNAL_H_
#define UPB_REFLECTION_ONEOF_DEF_INTERNAL_H_
-#include "upb/reflection/oneof_def.h"
+#include "upb/upb/reflection/oneof_def.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -55,6 +55,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_REFLECTION_ONEOF_DEF_INTERNAL_H_ */
diff --git a/upb/upb/reflection/internal/service_def.h b/upb/upb/reflection/internal/service_def.h
index 8cab160..d68953e 100644
--- a/upb/upb/reflection/internal/service_def.h
+++ b/upb/upb/reflection/internal/service_def.h
@@ -31,10 +31,10 @@
#ifndef UPB_REFLECTION_SERVICE_DEF_INTERNAL_H_
#define UPB_REFLECTION_SERVICE_DEF_INTERNAL_H_
-#include "upb/reflection/service_def.h"
+#include "upb/upb/reflection/service_def.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -51,6 +51,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_REFLECTION_SERVICE_DEF_INTERNAL_H_ */
diff --git a/upb/upb/reflection/message.c b/upb/upb/reflection/message.c
index 19944d8..7e73b30 100644
--- a/upb/upb/reflection/message.c
+++ b/upb/upb/reflection/message.c
@@ -28,24 +28,24 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/reflection/message.h"
+#include "upb/upb/reflection/message.h"
#include <string.h>
-#include "upb/collections/map.h"
-#include "upb/hash/common.h"
-#include "upb/message/accessors.h"
-#include "upb/message/message.h"
-#include "upb/mini_table/field.h"
-#include "upb/reflection/def.h"
-#include "upb/reflection/def_pool.h"
-#include "upb/reflection/def_type.h"
-#include "upb/reflection/internal/field_def.h"
-#include "upb/reflection/message_def.h"
-#include "upb/reflection/oneof_def.h"
+#include "upb/upb/collections/map.h"
+#include "upb/upb/hash/common.h"
+#include "upb/upb/message/accessors.h"
+#include "upb/upb/message/message.h"
+#include "upb/upb/mini_table/field.h"
+#include "upb/upb/reflection/def.h"
+#include "upb/upb/reflection/def_pool.h"
+#include "upb/upb/reflection/def_type.h"
+#include "upb/upb/reflection/internal/field_def.h"
+#include "upb/upb/reflection/message_def.h"
+#include "upb/upb/reflection/oneof_def.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
bool upb_Message_HasFieldByDef(const upb_Message* msg, const upb_FieldDef* f) {
UPB_ASSERT(upb_FieldDef_HasPresence(f));
diff --git a/upb/upb/reflection/message.h b/upb/upb/reflection/message.h
index 42abc34..f8ed7f7 100644
--- a/upb/upb/reflection/message.h
+++ b/upb/upb/reflection/message.h
@@ -31,11 +31,11 @@
#ifndef UPB_REFLECTION_MESSAGE_H_
#define UPB_REFLECTION_MESSAGE_H_
-#include "upb/collections/map.h"
-#include "upb/reflection/common.h"
+#include "upb/upb/collections/map.h"
+#include "upb/upb/reflection/common.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -102,6 +102,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_REFLECTION_MESSAGE_H_ */
diff --git a/upb/upb/reflection/message.hpp b/upb/upb/reflection/message.hpp
index e5ab2a8..106b806 100644
--- a/upb/upb/reflection/message.hpp
+++ b/upb/upb/reflection/message.hpp
@@ -31,7 +31,7 @@
#ifndef UPB_REFLECTION_MESSAGE_HPP_
#define UPB_REFLECTION_MESSAGE_HPP_
-#include "upb/reflection/message.h"
+#include "upb/upb/reflection/message.h"
namespace upb {
diff --git a/upb/upb/reflection/message_def.c b/upb/upb/reflection/message_def.c
index 211e597..0cde9a3 100644
--- a/upb/upb/reflection/message_def.c
+++ b/upb/upb/reflection/message_def.c
@@ -28,25 +28,25 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/reflection/internal/message_def.h"
+#include "upb/upb/reflection/internal/message_def.h"
-#include "upb/hash/int_table.h"
-#include "upb/hash/str_table.h"
-#include "upb/mini_descriptor/decode.h"
-#include "upb/mini_descriptor/internal/modifiers.h"
-#include "upb/reflection/def.h"
-#include "upb/reflection/def_type.h"
-#include "upb/reflection/internal/def_builder.h"
-#include "upb/reflection/internal/desc_state.h"
-#include "upb/reflection/internal/enum_def.h"
-#include "upb/reflection/internal/extension_range.h"
-#include "upb/reflection/internal/field_def.h"
-#include "upb/reflection/internal/file_def.h"
-#include "upb/reflection/internal/message_reserved_range.h"
-#include "upb/reflection/internal/oneof_def.h"
+#include "upb/upb/hash/int_table.h"
+#include "upb/upb/hash/str_table.h"
+#include "upb/upb/mini_descriptor/decode.h"
+#include "upb/upb/mini_descriptor/internal/modifiers.h"
+#include "upb/upb/reflection/def.h"
+#include "upb/upb/reflection/def_type.h"
+#include "upb/upb/reflection/internal/def_builder.h"
+#include "upb/upb/reflection/internal/desc_state.h"
+#include "upb/upb/reflection/internal/enum_def.h"
+#include "upb/upb/reflection/internal/extension_range.h"
+#include "upb/upb/reflection/internal/field_def.h"
+#include "upb/upb/reflection/internal/file_def.h"
+#include "upb/upb/reflection/internal/message_reserved_range.h"
+#include "upb/upb/reflection/internal/oneof_def.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
struct upb_MessageDef {
const UPB_DESC(MessageOptions) * opts;
diff --git a/upb/upb/reflection/message_def.h b/upb/upb/reflection/message_def.h
index deb6d87..1556df4 100644
--- a/upb/upb/reflection/message_def.h
+++ b/upb/upb/reflection/message_def.h
@@ -28,16 +28,16 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// IWYU pragma: private, include "upb/reflection/def.h"
+// IWYU pragma: private, include "upb/upb/reflection/def.h"
#ifndef UPB_REFLECTION_MESSAGE_DEF_H_
#define UPB_REFLECTION_MESSAGE_DEF_H_
-#include "upb/base/string_view.h"
-#include "upb/reflection/common.h"
+#include "upb/upb/base/string_view.h"
+#include "upb/upb/reflection/common.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
// Well-known field tag numbers for map-entry messages.
#define kUpb_MapEntry_KeyFieldNumber 1
@@ -174,6 +174,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_REFLECTION_MESSAGE_DEF_H_ */
diff --git a/upb/upb/reflection/message_reserved_range.c b/upb/upb/reflection/message_reserved_range.c
index c39d8b9..ec50be8 100644
--- a/upb/upb/reflection/message_reserved_range.c
+++ b/upb/upb/reflection/message_reserved_range.c
@@ -28,14 +28,14 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/reflection/enum_def.h"
-#include "upb/reflection/field_def.h"
-#include "upb/reflection/internal/def_builder.h"
-#include "upb/reflection/internal/extension_range.h"
-#include "upb/reflection/message_def.h"
+#include "upb/upb/reflection/enum_def.h"
+#include "upb/upb/reflection/field_def.h"
+#include "upb/upb/reflection/internal/def_builder.h"
+#include "upb/upb/reflection/internal/extension_range.h"
+#include "upb/upb/reflection/message_def.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
struct upb_MessageReservedRange {
int32_t start;
diff --git a/upb/upb/reflection/message_reserved_range.h b/upb/upb/reflection/message_reserved_range.h
index 6fa82d2..603dbd7 100644
--- a/upb/upb/reflection/message_reserved_range.h
+++ b/upb/upb/reflection/message_reserved_range.h
@@ -28,15 +28,15 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// IWYU pragma: private, include "upb/reflection/def.h"
+// IWYU pragma: private, include "upb/upb/reflection/def.h"
#ifndef UPB_REFLECTION_MESSAGE_RESERVED_RANGE_H_
#define UPB_REFLECTION_MESSAGE_RESERVED_RANGE_H_
-#include "upb/reflection/common.h"
+#include "upb/upb/reflection/common.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -49,6 +49,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_REFLECTION_MESSAGE_RESERVED_RANGE_H_ */
diff --git a/upb/upb/reflection/method_def.c b/upb/upb/reflection/method_def.c
index 9429c4b..c74498d 100644
--- a/upb/upb/reflection/method_def.c
+++ b/upb/upb/reflection/method_def.c
@@ -28,14 +28,14 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/reflection/internal/method_def.h"
+#include "upb/upb/reflection/internal/method_def.h"
-#include "upb/reflection/def_type.h"
-#include "upb/reflection/internal/def_builder.h"
-#include "upb/reflection/service_def.h"
+#include "upb/upb/reflection/def_type.h"
+#include "upb/upb/reflection/internal/def_builder.h"
+#include "upb/upb/reflection/service_def.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
struct upb_MethodDef {
const UPB_DESC(MethodOptions) * opts;
diff --git a/upb/upb/reflection/method_def.h b/upb/upb/reflection/method_def.h
index 34c5cff..785cac1 100644
--- a/upb/upb/reflection/method_def.h
+++ b/upb/upb/reflection/method_def.h
@@ -28,15 +28,15 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// IWYU pragma: private, include "upb/reflection/def.h"
+// IWYU pragma: private, include "upb/upb/reflection/def.h"
#ifndef UPB_REFLECTION_METHOD_DEF_H_
#define UPB_REFLECTION_METHOD_DEF_H_
-#include "upb/reflection/common.h"
+#include "upb/upb/reflection/common.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -57,6 +57,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_REFLECTION_METHOD_DEF_H_ */
diff --git a/upb/upb/reflection/oneof_def.c b/upb/upb/reflection/oneof_def.c
index 0468fa9..7cfa07e 100644
--- a/upb/upb/reflection/oneof_def.c
+++ b/upb/upb/reflection/oneof_def.c
@@ -28,21 +28,21 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/reflection/internal/oneof_def.h"
+#include "upb/upb/reflection/internal/oneof_def.h"
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
-#include "upb/hash/int_table.h"
-#include "upb/hash/str_table.h"
-#include "upb/reflection/def_type.h"
-#include "upb/reflection/internal/def_builder.h"
-#include "upb/reflection/internal/field_def.h"
-#include "upb/reflection/internal/message_def.h"
+#include "upb/upb/hash/int_table.h"
+#include "upb/upb/hash/str_table.h"
+#include "upb/upb/reflection/def_type.h"
+#include "upb/upb/reflection/internal/def_builder.h"
+#include "upb/upb/reflection/internal/field_def.h"
+#include "upb/upb/reflection/internal/message_def.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
struct upb_OneofDef {
const UPB_DESC(OneofOptions) * opts;
diff --git a/upb/upb/reflection/oneof_def.h b/upb/upb/reflection/oneof_def.h
index 9b570d3..25d161f 100644
--- a/upb/upb/reflection/oneof_def.h
+++ b/upb/upb/reflection/oneof_def.h
@@ -28,15 +28,15 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// IWYU pragma: private, include "upb/reflection/def.h"
+// IWYU pragma: private, include "upb/upb/reflection/def.h"
#ifndef UPB_REFLECTION_ONEOF_DEF_H_
#define UPB_REFLECTION_ONEOF_DEF_H_
-#include "upb/reflection/common.h"
+#include "upb/upb/reflection/common.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -65,6 +65,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_REFLECTION_ONEOF_DEF_H_ */
diff --git a/upb/upb/reflection/service_def.c b/upb/upb/reflection/service_def.c
index 658cf02..5307fb3 100644
--- a/upb/upb/reflection/service_def.c
+++ b/upb/upb/reflection/service_def.c
@@ -28,15 +28,15 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/reflection/internal/service_def.h"
+#include "upb/upb/reflection/internal/service_def.h"
-#include "upb/reflection/def_type.h"
-#include "upb/reflection/internal/def_builder.h"
-#include "upb/reflection/internal/file_def.h"
-#include "upb/reflection/internal/method_def.h"
+#include "upb/upb/reflection/def_type.h"
+#include "upb/upb/reflection/internal/def_builder.h"
+#include "upb/upb/reflection/internal/file_def.h"
+#include "upb/upb/reflection/internal/method_def.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
struct upb_ServiceDef {
const UPB_DESC(ServiceOptions) * opts;
diff --git a/upb/upb/reflection/service_def.h b/upb/upb/reflection/service_def.h
index 6674994..18e0daf 100644
--- a/upb/upb/reflection/service_def.h
+++ b/upb/upb/reflection/service_def.h
@@ -28,15 +28,15 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// IWYU pragma: private, include "upb/reflection/def.h"
+// IWYU pragma: private, include "upb/upb/reflection/def.h"
#ifndef UPB_REFLECTION_SERVICE_DEF_H_
#define UPB_REFLECTION_SERVICE_DEF_H_
-#include "upb/reflection/common.h"
+#include "upb/upb/reflection/common.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -58,6 +58,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_REFLECTION_SERVICE_DEF_H_ */
diff --git a/upb/upb/reflection/stage0/google/protobuf/descriptor.upb.c b/upb/upb/reflection/stage0/google/protobuf/descriptor.upb.c
index 69b75f2..3380070 100644
--- a/upb/upb/reflection/stage0/google/protobuf/descriptor.upb.c
+++ b/upb/upb/reflection/stage0/google/protobuf/descriptor.upb.c
@@ -1,5 +1,5 @@
#include <stddef.h>
-#include "upb/generated_code_support.h"
+#include "upb/upb/generated_code_support.h"
#include "google/protobuf/descriptor.upb.h"
static upb_Arena* upb_BootstrapArena() {
diff --git a/upb/upb/reflection/stage0/google/protobuf/descriptor.upb.h b/upb/upb/reflection/stage0/google/protobuf/descriptor.upb.h
index 510f54b..b593280 100644
--- a/upb/upb/reflection/stage0/google/protobuf/descriptor.upb.h
+++ b/upb/upb/reflection/stage0/google/protobuf/descriptor.upb.h
@@ -9,9 +9,9 @@
#ifndef GOOGLE_PROTOBUF_DESCRIPTOR_PROTO_UPB_H_
#define GOOGLE_PROTOBUF_DESCRIPTOR_PROTO_UPB_H_
-#include "upb/generated_code_support.h"
+#include "upb/upb/generated_code_support.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -6508,6 +6508,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* GOOGLE_PROTOBUF_DESCRIPTOR_PROTO_UPB_H_ */
diff --git a/upb/upb/test/BUILD b/upb/upb/test/BUILD
index bb95ba0..59afb4e 100644
--- a/upb/upb/test/BUILD
+++ b/upb/upb/test/BUILD
@@ -6,27 +6,27 @@
# https://developers.google.com/open-source/licenses/bsd
load(
- "//bazel:build_defs.bzl",
+ "//upb/bazel:build_defs.bzl",
"UPB_DEFAULT_CPPOPTS",
)
load(
- "//bazel:upb_proto_library.bzl",
+ "//upb/bazel:upb_proto_library.bzl",
"upb_proto_library",
"upb_proto_reflection_library",
)
# begin:google_only
-# package(default_applicable_licenses = ["//:license"])
+# package(default_applicable_licenses = ["//upb:license"])
# end:google_only
cc_library(
name = "parse_text_proto",
testonly = 1,
hdrs = ["parse_text_proto.h"],
- visibility = ["//:__subpackages__"],
+ visibility = ["//upb:__subpackages__"],
deps = [
+ "//:protobuf",
"@com_google_googletest//:gtest",
- "@com_google_protobuf//:protobuf",
],
)
@@ -45,7 +45,7 @@
name = "proto3_test_proto",
testonly = 1,
srcs = ["proto3_test.proto"],
- deps = ["@com_google_protobuf//:descriptor_proto"],
+ deps = ["//:descriptor_proto"],
)
upb_proto_library(
@@ -69,14 +69,14 @@
upb_proto_library(
name = "test_upb_proto",
testonly = 1,
- visibility = ["//:__subpackages__"],
+ visibility = ["//upb:__subpackages__"],
deps = [":test_proto"],
)
proto_library(
name = "test_cpp_proto",
srcs = ["test_cpp.proto"],
- deps = ["@com_google_protobuf//:timestamp_proto"],
+ deps = ["//:timestamp_proto"],
)
upb_proto_library(
@@ -92,25 +92,25 @@
upb_proto_library(
name = "test_messages_proto2_upb_proto",
testonly = 1,
- visibility = ["//:__subpackages__"],
- deps = ["@com_google_protobuf//src/google/protobuf:test_messages_proto2_proto"],
+ visibility = ["//upb:__subpackages__"],
+ deps = ["//src/google/protobuf:test_messages_proto2_proto"],
)
upb_proto_library(
name = "test_messages_proto3_upb_proto",
testonly = 1,
- visibility = ["//:__subpackages__"],
- deps = ["@com_google_protobuf//src/google/protobuf:test_messages_proto3_proto"],
+ visibility = ["//upb:__subpackages__"],
+ deps = ["//src/google/protobuf:test_messages_proto3_proto"],
)
upb_proto_library(
name = "timestamp_upb_proto",
- deps = ["@com_google_protobuf//:timestamp_proto"],
+ deps = ["//:timestamp_proto"],
)
upb_proto_reflection_library(
name = "timestamp_upb_proto_reflection",
- deps = ["@com_google_protobuf//:timestamp_proto"],
+ deps = ["//:timestamp_proto"],
)
cc_library(
@@ -118,14 +118,14 @@
testonly = 1,
srcs = ["fuzz_util.cc"],
hdrs = ["fuzz_util.h"],
- visibility = ["//:__subpackages__"],
+ visibility = ["//upb:__subpackages__"],
deps = [
- "//:base",
- "//:message",
- "//:mini_descriptor",
- "//:mini_table",
- "//:mini_table_internal",
- "//:port",
+ "//upb:base",
+ "//upb:message",
+ "//upb:mini_descriptor",
+ "//upb:mini_table",
+ "//upb:mini_table_internal",
+ "//upb:port",
],
)
@@ -136,7 +136,7 @@
deps = [
":proto3_test_upb_proto",
":proto3_test_upb_proto_reflection",
- "//:reflection",
+ "//upb:reflection",
"@com_google_googletest//:gtest_main",
],
)
@@ -150,9 +150,9 @@
":test_cpp_upb_proto_reflection",
":timestamp_upb_proto",
":timestamp_upb_proto_reflection",
- "//:json",
- "//:port",
- "//:reflection",
+ "//upb:json",
+ "//upb:port",
+ "//upb:reflection",
"@com_google_googletest//:gtest_main",
],
)
@@ -167,10 +167,10 @@
":test_messages_proto2_upb_proto",
":test_messages_proto3_upb_proto",
":test_upb_proto",
- "//:base",
- "//:collections",
- "//:mem",
- "//:port",
+ "//upb:base",
+ "//upb:collections",
+ "//upb:mem",
+ "//upb:port",
"@com_google_googletest//:gtest_main",
],
)
@@ -185,9 +185,9 @@
":test_messages_proto2_upb_proto",
":test_messages_proto3_upb_proto",
":test_upb_proto",
- "//:mini_table",
- "//:mini_table_internal",
- "//:port",
+ "//upb:mini_table",
+ "//upb:mini_table_internal",
+ "//upb:port",
"@com_google_googletest//:gtest_main",
],
)
diff --git a/upb/upb/test/fuzz_util.cc b/upb/upb/test/fuzz_util.cc
index f29aa7f..fa3e083 100644
--- a/upb/upb/test/fuzz_util.cc
+++ b/upb/upb/test/fuzz_util.cc
@@ -28,16 +28,16 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/test/fuzz_util.h"
+#include "upb/upb/test/fuzz_util.h"
-#include "upb/base/status.hpp"
-#include "upb/message/message.h"
-#include "upb/mini_descriptor/decode.h"
-#include "upb/mini_table/extension.h"
-#include "upb/mini_table/extension_registry.h"
+#include "upb/upb/base/status.hpp"
+#include "upb/upb/message/message.h"
+#include "upb/upb/mini_descriptor/decode.h"
+#include "upb/upb/mini_table/extension.h"
+#include "upb/upb/mini_table/extension_registry.h"
// Must be last
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
namespace upb {
namespace fuzz {
diff --git a/upb/upb/test/fuzz_util.h b/upb/upb/test/fuzz_util.h
index c03d376..8c8b32a 100644
--- a/upb/upb/test/fuzz_util.h
+++ b/upb/upb/test/fuzz_util.h
@@ -34,8 +34,8 @@
#include <string>
#include <vector>
-#include "upb/mini_table/extension_registry.h"
-// #include "upb/mini_table/types.h"
+#include "upb/upb/mini_table/extension_registry.h"
+// #include "upb/upb/mini_table/types.h"
namespace upb {
namespace fuzz {
diff --git a/upb/upb/test/proto3_test.cc b/upb/upb/test/proto3_test.cc
index 663da70..4f84229 100644
--- a/upb/upb/test/proto3_test.cc
+++ b/upb/upb/test/proto3_test.cc
@@ -29,9 +29,9 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "gtest/gtest.h"
-#include "upb/reflection/def.hpp"
-#include "upb/test/proto3_test.upb.h"
-#include "upb/test/proto3_test.upbdefs.h"
+#include "upb/upb/reflection/def.hpp"
+#include "upb/upb/test/proto3_test.upb.h"
+#include "upb/upb/test/proto3_test.upbdefs.h"
TEST(Proto3Test, SyntheticOneofExtension) {
upb::DefPool defpool;
diff --git a/upb/upb/test/test_cpp.cc b/upb/upb/test/test_cpp.cc
index 2b7d939..498e418 100644
--- a/upb/upb/test/test_cpp.cc
+++ b/upb/upb/test/test_cpp.cc
@@ -40,15 +40,15 @@
#include "google/protobuf/timestamp.upb.h"
#include "google/protobuf/timestamp.upbdefs.h"
#include "gtest/gtest.h"
-#include "upb/json/decode.h"
-#include "upb/json/encode.h"
-#include "upb/reflection/def.h"
-#include "upb/reflection/def.hpp"
-#include "upb/test/test_cpp.upb.h"
-#include "upb/test/test_cpp.upbdefs.h"
+#include "upb/upb/json/decode.h"
+#include "upb/upb/json/encode.h"
+#include "upb/upb/reflection/def.h"
+#include "upb/upb/reflection/def.hpp"
+#include "upb/upb/test/test_cpp.upb.h"
+#include "upb/upb/test/test_cpp.upbdefs.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
TEST(Cpp, Iteration) {
upb::DefPool defpool;
diff --git a/upb/upb/test/test_generated_code.cc b/upb/upb/test/test_generated_code.cc
index 98c1825..5c6bc2f 100644
--- a/upb/upb/test/test_generated_code.cc
+++ b/upb/upb/test/test_generated_code.cc
@@ -39,14 +39,14 @@
#include "gtest/gtest.h"
#include "google/protobuf/test_messages_proto2.upb.h"
#include "google/protobuf/test_messages_proto3.upb.h"
-#include "upb/base/status.h"
-#include "upb/base/string_view.h"
-#include "upb/collections/array.h"
-#include "upb/mem/arena.hpp"
-#include "upb/test/test.upb.h"
+#include "upb/upb/base/status.h"
+#include "upb/upb/base/string_view.h"
+#include "upb/upb/collections/array.h"
+#include "upb/upb/mem/arena.hpp"
+#include "upb/upb/test/test.upb.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#if !defined(MIN)
#define MIN(x, y) ((x) < (y) ? (x) : (y))
diff --git a/upb/upb/test/test_import_empty_srcs.cc b/upb/upb/test/test_import_empty_srcs.cc
index 941e8d0..d4a2a2a 100644
--- a/upb/upb/test/test_import_empty_srcs.cc
+++ b/upb/upb/test/test_import_empty_srcs.cc
@@ -29,7 +29,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "gtest/gtest.h"
-#include "upb/test/test_import_empty_srcs.upb.h"
+#include "upb/upb/test/test_import_empty_srcs.upb.h"
TEST(Test, Reexport) {
// This test really just ensures that compilation succeeds.
diff --git a/upb/upb/test/test_import_empty_srcs.proto b/upb/upb/test/test_import_empty_srcs.proto
index 78794e9..40cd82e 100644
--- a/upb/upb/test/test_import_empty_srcs.proto
+++ b/upb/upb/test/test_import_empty_srcs.proto
@@ -32,8 +32,8 @@
package upb_test;
-import "upb/test/test.proto";
-import "upb/test/test_cpp.proto";
+import "upb/upb/test/test.proto";
+import "upb/upb/test/test_cpp.proto";
message ContainsImported {
optional MessageName message_name = 1;
diff --git a/upb/upb/test/test_mini_table_oneof.cc b/upb/upb/test/test_mini_table_oneof.cc
index f741d62..cb0be60 100644
--- a/upb/upb/test/test_mini_table_oneof.cc
+++ b/upb/upb/test/test_mini_table_oneof.cc
@@ -31,12 +31,12 @@
#include "gtest/gtest.h"
#include "google/protobuf/test_messages_proto2.upb.h"
#include "google/protobuf/test_messages_proto3.upb.h"
-#include "upb/mini_table/field.h"
-#include "upb/mini_table/message.h"
-#include "upb/test/test.upb.h"
+#include "upb/upb/mini_table/field.h"
+#include "upb/upb/mini_table/message.h"
+#include "upb/upb/test/test.upb.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
TEST(MiniTableOneofTest, OneOfIteratorProto2) {
constexpr int oneof_first_field_number = 111;
diff --git a/upb/upb/text/BUILD b/upb/upb/text/BUILD
index 50539ea..81ce078 100644
--- a/upb/upb/text/BUILD
+++ b/upb/upb/text/BUILD
@@ -5,7 +5,7 @@
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
-load("//bazel:build_defs.bzl", "UPB_DEFAULT_COPTS")
+load("//upb/bazel:build_defs.bzl", "UPB_DEFAULT_COPTS")
cc_library(
name = "text",
@@ -18,15 +18,15 @@
copts = UPB_DEFAULT_COPTS,
visibility = ["//visibility:public"],
deps = [
- "//:collections",
- "//:collections_internal",
- "//:eps_copy_input_stream",
- "//:lex",
- "//:port",
- "//:reflection",
- "//:wire",
- "//:wire_reader",
- "//:wire_types",
+ "//upb:collections",
+ "//upb:collections_internal",
+ "//upb:eps_copy_input_stream",
+ "//upb:lex",
+ "//upb:port",
+ "//upb:reflection",
+ "//upb:wire",
+ "//upb:wire_reader",
+ "//upb:wire_types",
],
)
@@ -40,8 +40,8 @@
],
),
visibility = [
- "//cmake:__pkg__",
- "//python/dist:__pkg__",
+ "//upb/cmake:__pkg__",
+ "//upb/python/dist:__pkg__",
]
)
# end:github_only
diff --git a/upb/upb/text/encode.c b/upb/upb/text/encode.c
index 0e9fee7..cbdb94e 100644
--- a/upb/upb/text/encode.c
+++ b/upb/upb/text/encode.c
@@ -28,7 +28,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/text/encode.h"
+#include "upb/upb/text/encode.h"
#include <ctype.h>
#include <float.h>
@@ -36,17 +36,17 @@
#include <stdarg.h>
#include <string.h>
-#include "upb/collections/internal/map_sorter.h"
-#include "upb/collections/map.h"
-#include "upb/lex/round_trip.h"
-#include "upb/port/vsnprintf_compat.h"
-#include "upb/reflection/message.h"
-#include "upb/wire/eps_copy_input_stream.h"
-#include "upb/wire/reader.h"
-#include "upb/wire/types.h"
+#include "upb/upb/collections/internal/map_sorter.h"
+#include "upb/upb/collections/map.h"
+#include "upb/upb/lex/round_trip.h"
+#include "upb/upb/port/vsnprintf_compat.h"
+#include "upb/upb/reflection/message.h"
+#include "upb/upb/wire/eps_copy_input_stream.h"
+#include "upb/upb/wire/reader.h"
+#include "upb/upb/wire/types.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
typedef struct {
char *buf, *ptr, *end;
diff --git a/upb/upb/text/encode.h b/upb/upb/text/encode.h
index 2c0bcd7..b18d803 100644
--- a/upb/upb/text/encode.h
+++ b/upb/upb/text/encode.h
@@ -31,10 +31,10 @@
#ifndef UPB_TEXT_ENCODE_H_
#define UPB_TEXT_ENCODE_H_
-#include "upb/reflection/def.h"
+#include "upb/upb/reflection/def.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -67,6 +67,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_TEXT_ENCODE_H_ */
diff --git a/upb/upb/upb.hpp b/upb/upb/upb.hpp
index 3ee4b63..0f3ea9a 100644
--- a/upb/upb/upb.hpp
+++ b/upb/upb/upb.hpp
@@ -34,8 +34,8 @@
#define UPB_HPP_
// IWYU pragma: begin_exports
-#include "upb/base/status.hpp"
-#include "upb/mem/arena.hpp"
+#include "upb/upb/base/status.hpp"
+#include "upb/upb/mem/arena.hpp"
// IWYU pragma: end_exports
#endif // UPB_HPP_
diff --git a/upb/upb/upb_so.c b/upb/upb/upb_so.c
index fd7fb87..a751ba7 100644
--- a/upb/upb/upb_so.c
+++ b/upb/upb/upb_so.c
@@ -30,8 +30,8 @@
// These headers form a spanning tree for the upb defs needed by FFI layers.
-#include "upb/collections/array_split64.h"
-#include "upb/collections/map.h"
-#include "upb/message/accessors_split64.h"
-#include "upb/message/message.h"
-#include "upb/mini_descriptor/decode.h"
+#include "upb/upb/collections/array_split64.h"
+#include "upb/upb/collections/map.h"
+#include "upb/upb/message/accessors_split64.h"
+#include "upb/upb/message/message.h"
+#include "upb/upb/mini_descriptor/decode.h"
diff --git a/upb/upb/util/BUILD b/upb/upb/util/BUILD
index 201a035..dc9f4ec 100644
--- a/upb/upb/util/BUILD
+++ b/upb/upb/util/BUILD
@@ -1,11 +1,11 @@
load(
- "//bazel:upb_proto_library.bzl",
+ "//upb/bazel:upb_proto_library.bzl",
"upb_proto_library",
"upb_proto_reflection_library",
)
# begin:google_only
-# package(default_applicable_licenses = ["//:license"])
+# package(default_applicable_licenses = ["//upb:license"])
# end:google_only
licenses(["notice"])
@@ -18,9 +18,9 @@
hdrs = ["def_to_proto.h"],
visibility = ["//visibility:public"],
deps = [
- "//:port",
- "//:reflection",
- "//:reflection_internal",
+ "//upb:port",
+ "//upb:reflection",
+ "//upb:reflection_internal",
],
)
@@ -49,12 +49,12 @@
hdrs = ["def_to_proto_test.h"],
deps = [
":def_to_proto",
- "//:base",
- "//:descriptor_upb_proto",
- "//:mem",
- "//:reflection_internal",
+ "//:protobuf",
+ "//upb:base",
+ "//upb:descriptor_upb_proto",
+ "//upb:mem",
+ "//upb:reflection_internal",
"@com_google_googletest//:gtest",
- "@com_google_protobuf//:protobuf",
],
)
@@ -66,13 +66,13 @@
":def_to_proto_test_lib",
":def_to_proto_test_upb_proto",
":def_to_proto_test_upb_proto_reflection",
- "//:descriptor_upb_proto_reflection",
- "//:mem",
- "//:reflection",
- "//upb/test:parse_text_proto",
+ "//:protobuf",
+ "//upb:descriptor_upb_proto_reflection",
+ "//upb:mem",
+ "//upb:reflection",
+ "//upb/upb/test:parse_text_proto",
"@com_google_absl//absl/strings",
"@com_google_googletest//:gtest_main",
- "@com_google_protobuf//:protobuf",
],
)
@@ -97,9 +97,9 @@
hdrs = ["required_fields.h"],
visibility = ["//visibility:public"],
deps = [
- "//:collections",
- "//:port",
- "//:reflection",
+ "//upb:collections",
+ "//upb:port",
+ "//upb:reflection",
],
)
@@ -125,10 +125,10 @@
":required_fields",
":required_fields_test_upb_proto",
":required_fields_test_upb_proto_reflection",
- "//:base",
- "//:json",
- "//:mem",
- "//:reflection",
+ "//upb:base",
+ "//upb:json",
+ "//upb:mem",
+ "//upb:reflection",
"@com_google_absl//absl/strings",
"@com_google_googletest//:gtest_main",
],
@@ -142,11 +142,11 @@
hdrs = ["compare.h"],
visibility = ["//visibility:public"],
deps = [
- "//:base",
- "//:eps_copy_input_stream",
- "//:port",
- "//:wire_reader",
- "//:wire_types",
+ "//upb:base",
+ "//upb:eps_copy_input_stream",
+ "//upb:port",
+ "//upb:wire_reader",
+ "//upb:wire_types",
],
)
@@ -155,8 +155,8 @@
srcs = ["compare_test.cc"],
deps = [
":compare",
- "//:wire_internal",
- "//:wire_types",
+ "//upb:wire_internal",
+ "//upb:wire_types",
"@com_google_absl//absl/strings",
"@com_google_googletest//:gtest_main",
],
@@ -173,6 +173,6 @@
"required_fields.c",
"required_fields.h",
],
- visibility = ["//python/dist:__pkg__"],
+ visibility = ["//upb/python/dist:__pkg__"],
)
# end:github_only
diff --git a/upb/upb/util/compare.c b/upb/upb/util/compare.c
index b96b94d..b11874d 100644
--- a/upb/upb/util/compare.c
+++ b/upb/upb/util/compare.c
@@ -28,16 +28,16 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/util/compare.h"
+#include "upb/upb/util/compare.h"
#include <stdlib.h>
-#include "upb/base/string_view.h"
-#include "upb/wire/eps_copy_input_stream.h"
-#include "upb/wire/reader.h"
-#include "upb/wire/types.h"
+#include "upb/upb/base/string_view.h"
+#include "upb/upb/wire/eps_copy_input_stream.h"
+#include "upb/upb/wire/reader.h"
+#include "upb/upb/wire/types.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
struct upb_UnknownFields;
typedef struct upb_UnknownFields upb_UnknownFields;
diff --git a/upb/upb/util/compare_test.cc b/upb/upb/util/compare_test.cc
index 4a37412..57ed02c 100644
--- a/upb/upb/util/compare_test.cc
+++ b/upb/upb/util/compare_test.cc
@@ -28,7 +28,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/util/compare.h"
+#include "upb/upb/util/compare.h"
#include <stdint.h>
@@ -38,8 +38,8 @@
#include <vector>
#include "gtest/gtest.h"
-#include "upb/wire/internal/swap.h"
-#include "upb/wire/types.h"
+#include "upb/upb/wire/internal/swap.h"
+#include "upb/upb/wire/types.h"
struct UnknownField;
diff --git a/upb/upb/util/def_to_proto.c b/upb/upb/util/def_to_proto.c
index d564325..842a9c8 100644
--- a/upb/upb/util/def_to_proto.c
+++ b/upb/upb/util/def_to_proto.c
@@ -28,21 +28,21 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/util/def_to_proto.h"
+#include "upb/upb/util/def_to_proto.h"
#include <inttypes.h>
#include <math.h>
-#include "upb/port/vsnprintf_compat.h"
-#include "upb/reflection/enum_reserved_range.h"
-#include "upb/reflection/extension_range.h"
-#include "upb/reflection/internal/field_def.h"
-#include "upb/reflection/internal/file_def.h"
-#include "upb/reflection/message.h"
-#include "upb/reflection/message_reserved_range.h"
+#include "upb/upb/port/vsnprintf_compat.h"
+#include "upb/upb/reflection/enum_reserved_range.h"
+#include "upb/upb/reflection/extension_range.h"
+#include "upb/upb/reflection/internal/field_def.h"
+#include "upb/upb/reflection/internal/file_def.h"
+#include "upb/upb/reflection/message.h"
+#include "upb/upb/reflection/message_reserved_range.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
typedef struct {
upb_Arena* arena;
diff --git a/upb/upb/util/def_to_proto.h b/upb/upb/util/def_to_proto.h
index ba41db5..c5a54ca 100644
--- a/upb/upb/util/def_to_proto.h
+++ b/upb/upb/util/def_to_proto.h
@@ -31,7 +31,7 @@
#ifndef UPB_UTIL_DEF_TO_PROTO_H_
#define UPB_UTIL_DEF_TO_PROTO_H_
-#include "upb/reflection/def.h"
+#include "upb/upb/reflection/def.h"
#ifdef __cplusplus
extern "C" {
diff --git a/upb/upb/util/def_to_proto_fuzz_test.cc b/upb/upb/util/def_to_proto_fuzz_test.cc
index 833bcc6..0c5c9ed 100644
--- a/upb/upb/util/def_to_proto_fuzz_test.cc
+++ b/upb/upb/util/def_to_proto_fuzz_test.cc
@@ -33,7 +33,7 @@
#include "google/protobuf/descriptor.proto.h"
#include "gtest/gtest.h"
#include "testing/fuzzing/fuzztest.h"
-#include "upb/util/def_to_proto_test.h"
+#include "upb/upb/util/def_to_proto_test.h"
namespace upb_test {
diff --git a/upb/upb/util/def_to_proto_test.cc b/upb/upb/util/def_to_proto_test.cc
index 57287ce..ee2df3a 100644
--- a/upb/upb/util/def_to_proto_test.cc
+++ b/upb/upb/util/def_to_proto_test.cc
@@ -28,7 +28,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/util/def_to_proto.h"
+#include "upb/upb/util/def_to_proto.h"
#include <memory>
#include <string>
@@ -39,11 +39,11 @@
#include "gtest/gtest.h"
#include "google/protobuf/dynamic_message.h"
#include "google/protobuf/util/message_differencer.h"
-#include "upb/mem/arena.hpp"
-#include "upb/reflection/def.hpp"
-#include "upb/test/parse_text_proto.h"
-#include "upb/util/def_to_proto_test.h"
-#include "upb/util/def_to_proto_test.upbdefs.h"
+#include "upb/upb/mem/arena.hpp"
+#include "upb/upb/reflection/def.hpp"
+#include "upb/upb/test/parse_text_proto.h"
+#include "upb/upb/util/def_to_proto_test.h"
+#include "upb/upb/util/def_to_proto_test.upbdefs.h"
namespace upb_test {
@@ -129,7 +129,7 @@
upb::Arena arena;
upb::DefPool defpool;
upb_StringView test_file_desc =
- upb_util_def_to_proto_test_proto_upbdefinit.descriptor;
+ upb_upb_util_def_to_proto_test_proto_upbdefinit.descriptor;
const auto* file_desc = google_protobuf_FileDescriptorProto_parse(
test_file_desc.data, test_file_desc.size, arena.ptr());
@@ -143,15 +143,15 @@
upb::Arena arena;
upb::DefPool defpool;
upb_StringView test_file_desc =
- upb_util_def_to_proto_test_proto_upbdefinit.descriptor;
+ upb_upb_util_def_to_proto_test_proto_upbdefinit.descriptor;
const auto* file_desc = google_protobuf_FileDescriptorProto_parse(
test_file_desc.data, test_file_desc.size, arena.ptr());
_upb_DefPool_LoadDefInitEx(
defpool.ptr(),
- &upb_util_def_to_proto_test_proto_upbdefinit, true);
+ &upb_upb_util_def_to_proto_test_proto_upbdefinit, true);
upb::FileDefPtr file = defpool.FindFileByName(
- upb_util_def_to_proto_test_proto_upbdefinit.filename);
+ upb_upb_util_def_to_proto_test_proto_upbdefinit.filename);
CheckFile(file, file_desc);
}
diff --git a/upb/upb/util/def_to_proto_test.h b/upb/upb/util/def_to_proto_test.h
index b006336..f1f90e8 100644
--- a/upb/upb/util/def_to_proto_test.h
+++ b/upb/upb/util/def_to_proto_test.h
@@ -40,10 +40,10 @@
#include "google/protobuf/descriptor.h"
#include "google/protobuf/dynamic_message.h"
#include "google/protobuf/util/field_comparator.h"
-#include "upb/base/status.hpp"
-#include "upb/mem/arena.hpp"
-#include "upb/reflection/def.hpp"
-#include "upb/util/def_to_proto.h"
+#include "upb/upb/base/status.hpp"
+#include "upb/upb/mem/arena.hpp"
+#include "upb/upb/reflection/def.hpp"
+#include "upb/upb/util/def_to_proto.h"
namespace upb_test {
diff --git a/upb/upb/util/def_to_proto_test.proto b/upb/upb/util/def_to_proto_test.proto
index 65a76b0..bbecafa 100644
--- a/upb/upb/util/def_to_proto_test.proto
+++ b/upb/upb/util/def_to_proto_test.proto
@@ -32,9 +32,9 @@
package pkg;
-import public "upb/util/def_to_proto_public_import_test.proto";
+import public "upb/upb/util/def_to_proto_public_import_test.proto";
-import "upb/util/def_to_proto_regular_import_test.proto";
+import "upb/upb/util/def_to_proto_regular_import_test.proto";
option optimize_for = CODE_SIZE;
option go_package = "foo_go_package";
diff --git a/upb/upb/util/required_fields.c b/upb/upb/util/required_fields.c
index 3a6e037..15815e1 100644
--- a/upb/upb/util/required_fields.c
+++ b/upb/upb/util/required_fields.c
@@ -28,17 +28,17 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/util/required_fields.h"
+#include "upb/upb/util/required_fields.h"
#include <inttypes.h>
#include <stdarg.h>
-#include "upb/collections/map.h"
-#include "upb/port/vsnprintf_compat.h"
-#include "upb/reflection/message.h"
+#include "upb/upb/collections/map.h"
+#include "upb/upb/port/vsnprintf_compat.h"
+#include "upb/upb/reflection/message.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
////////////////////////////////////////////////////////////////////////////////
// upb_FieldPath_ToText()
diff --git a/upb/upb/util/required_fields.h b/upb/upb/util/required_fields.h
index 68e4fcb..c7aa5d5 100644
--- a/upb/upb/util/required_fields.h
+++ b/upb/upb/util/required_fields.h
@@ -31,11 +31,11 @@
#ifndef UPB_UTIL_REQUIRED_FIELDS_H_
#define UPB_UTIL_REQUIRED_FIELDS_H_
-#include "upb/reflection/def.h"
-#include "upb/reflection/message.h"
+#include "upb/upb/reflection/def.h"
+#include "upb/upb/reflection/message.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -92,6 +92,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_UTIL_REQUIRED_FIELDS_H_ */
diff --git a/upb/upb/util/required_fields_test.cc b/upb/upb/util/required_fields_test.cc
index 6bdd094..39555bd 100644
--- a/upb/upb/util/required_fields_test.cc
+++ b/upb/upb/util/required_fields_test.cc
@@ -28,19 +28,19 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/util/required_fields.h"
+#include "upb/upb/util/required_fields.h"
#include <stdlib.h>
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "absl/strings/string_view.h"
-#include "upb/base/status.hpp"
-#include "upb/json/decode.h"
-#include "upb/mem/arena.hpp"
-#include "upb/reflection/def.hpp"
-#include "upb/util/required_fields_test.upb.h"
-#include "upb/util/required_fields_test.upbdefs.h"
+#include "upb/upb/base/status.hpp"
+#include "upb/upb/json/decode.h"
+#include "upb/upb/mem/arena.hpp"
+#include "upb/upb/reflection/def.hpp"
+#include "upb/upb/util/required_fields_test.upb.h"
+#include "upb/upb/util/required_fields_test.upbdefs.h"
std::vector<std::string> PathsToText(upb_FieldPathEntry* entry) {
std::vector<std::string> ret;
diff --git a/upb/upb/wire/BUILD b/upb/upb/wire/BUILD
index 3e88ba0..cfa1fd6 100644
--- a/upb/upb/wire/BUILD
+++ b/upb/upb/wire/BUILD
@@ -5,7 +5,7 @@
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
-load("//bazel:build_defs.bzl", "UPB_DEFAULT_COPTS")
+load("//upb/bazel:build_defs.bzl", "UPB_DEFAULT_COPTS")
cc_library(
name = "wire",
@@ -20,10 +20,10 @@
deps = [
":internal",
":types",
- "//:mem",
- "//:message",
- "//:mini_table",
- "//:port",
+ "//upb:mem",
+ "//upb:message",
+ "//upb:mini_table",
+ "//upb:port",
],
)
@@ -48,16 +48,16 @@
":eps_copy_input_stream",
":reader",
":types",
- "//:base",
- "//:collections_internal",
- "//:mem",
- "//:mem_internal",
- "//:message",
- "//:message_accessors_internal",
- "//:message_internal",
- "//:message_internal_types",
- "//:mini_table",
- "//:port",
+ "//upb:base",
+ "//upb:collections_internal",
+ "//upb:mem",
+ "//upb:mem_internal",
+ "//upb:message",
+ "//upb:message_accessors_internal",
+ "//upb:message_internal",
+ "//upb:message_internal_types",
+ "//upb:mini_table",
+ "//upb:port",
"@utf8_range",
],
)
@@ -73,7 +73,7 @@
deps = [
":eps_copy_input_stream",
":types",
- "//:port",
+ "//upb:port",
],
)
@@ -89,8 +89,8 @@
hdrs = ["eps_copy_input_stream.h"],
visibility = ["//visibility:public"],
deps = [
- "//:mem",
- "//:port",
+ "//upb:mem",
+ "//upb:port",
],
)
@@ -99,7 +99,7 @@
srcs = ["eps_copy_input_stream_test.cc"],
deps = [
":eps_copy_input_stream",
- "//:mem",
+ "//upb:mem",
"@com_google_googletest//:gtest_main",
],
)
@@ -114,8 +114,8 @@
],
),
visibility = [
- "//cmake:__pkg__",
- "//python/dist:__pkg__",
+ "//upb/cmake:__pkg__",
+ "//upb/python/dist:__pkg__",
]
)
# end:github_only
diff --git a/upb/upb/wire/decode.c b/upb/upb/wire/decode.c
index 91a0ff9..9ff0ed4 100644
--- a/upb/upb/wire/decode.c
+++ b/upb/upb/wire/decode.c
@@ -28,7 +28,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/wire/decode.h"
+#include "upb/upb/wire/decode.h"
#include <assert.h>
#include <stdbool.h>
@@ -36,23 +36,23 @@
#include <stdint.h>
#include <string.h>
-#include "upb/base/descriptor_constants.h"
-#include "upb/collections/internal/array.h"
-#include "upb/collections/internal/map.h"
-#include "upb/collections/internal/map_entry.h"
-#include "upb/mem/internal/arena.h"
-#include "upb/message/internal/accessors.h"
-#include "upb/mini_table/sub.h"
-#include "upb/port/atomic.h"
-#include "upb/wire/encode.h"
-#include "upb/wire/eps_copy_input_stream.h"
-#include "upb/wire/internal/common.h"
-#include "upb/wire/internal/decode.h"
-#include "upb/wire/internal/swap.h"
-#include "upb/wire/reader.h"
+#include "upb/upb/base/descriptor_constants.h"
+#include "upb/upb/collections/internal/array.h"
+#include "upb/upb/collections/internal/map.h"
+#include "upb/upb/collections/internal/map_entry.h"
+#include "upb/upb/mem/internal/arena.h"
+#include "upb/upb/message/internal/accessors.h"
+#include "upb/upb/mini_table/sub.h"
+#include "upb/upb/port/atomic.h"
+#include "upb/upb/wire/encode.h"
+#include "upb/upb/wire/eps_copy_input_stream.h"
+#include "upb/upb/wire/internal/common.h"
+#include "upb/upb/wire/internal/decode.h"
+#include "upb/upb/wire/internal/swap.h"
+#include "upb/upb/wire/reader.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
// A few fake field types for our tables.
enum {
diff --git a/upb/upb/wire/decode.h b/upb/upb/wire/decode.h
index 4bd6eb8..e261ab5 100644
--- a/upb/upb/wire/decode.h
+++ b/upb/upb/wire/decode.h
@@ -33,13 +33,13 @@
#ifndef UPB_WIRE_DECODE_H_
#define UPB_WIRE_DECODE_H_
-#include "upb/mem/arena.h"
-#include "upb/message/message.h"
-#include "upb/mini_table/extension_registry.h"
-#include "upb/wire/types.h"
+#include "upb/upb/mem/arena.h"
+#include "upb/upb/message/message.h"
+#include "upb/upb/mini_table/extension_registry.h"
+#include "upb/upb/wire/types.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -147,6 +147,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_WIRE_DECODE_H_ */
diff --git a/upb/upb/wire/decode_fast.c b/upb/upb/wire/decode_fast.c
index 663b053..0889aec 100644
--- a/upb/upb/wire/decode_fast.c
+++ b/upb/upb/wire/decode_fast.c
@@ -38,14 +38,14 @@
// field type (eg. oneof boolean field with a 1 byte tag) and then dispatch
// to the specialized function as quickly as possible.
-#include "upb/wire/decode_fast.h"
+#include "upb/upb/wire/decode_fast.h"
-#include "upb/collections/internal/array.h"
-#include "upb/message/internal/types.h"
-#include "upb/wire/internal/decode.h"
+#include "upb/upb/collections/internal/array.h"
+#include "upb/upb/message/internal/types.h"
+#include "upb/upb/wire/internal/decode.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#if UPB_FASTTABLE
diff --git a/upb/upb/wire/decode_fast.h b/upb/upb/wire/decode_fast.h
index cc494d4..aef839a 100644
--- a/upb/upb/wire/decode_fast.h
+++ b/upb/upb/wire/decode_fast.h
@@ -65,10 +65,10 @@
#ifndef UPB_WIRE_DECODE_FAST_H_
#define UPB_WIRE_DECODE_FAST_H_
-#include "upb/message/message.h"
+#include "upb/upb/message/message.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -165,6 +165,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_WIRE_DECODE_FAST_H_ */
diff --git a/upb/upb/wire/encode.c b/upb/upb/wire/encode.c
index 82429dd..982a549 100644
--- a/upb/upb/wire/encode.c
+++ b/upb/upb/wire/encode.c
@@ -30,20 +30,20 @@
// We encode backwards, to avoid pre-computing lengths (one-pass encode).
-#include "upb/wire/encode.h"
+#include "upb/upb/wire/encode.h"
#include <string.h>
-#include "upb/collections/internal/array.h"
-#include "upb/collections/internal/map_sorter.h"
-#include "upb/message/internal/accessors.h"
-#include "upb/message/internal/extension.h"
-#include "upb/mini_table/sub.h"
-#include "upb/wire/internal/common.h"
-#include "upb/wire/internal/swap.h"
+#include "upb/upb/collections/internal/array.h"
+#include "upb/upb/collections/internal/map_sorter.h"
+#include "upb/upb/message/internal/accessors.h"
+#include "upb/upb/message/internal/extension.h"
+#include "upb/upb/mini_table/sub.h"
+#include "upb/upb/wire/internal/common.h"
+#include "upb/upb/wire/internal/swap.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#define UPB_PB_VARINT_MAX_LEN 10
diff --git a/upb/upb/wire/encode.h b/upb/upb/wire/encode.h
index 8212b87..41a2617 100644
--- a/upb/upb/wire/encode.h
+++ b/upb/upb/wire/encode.h
@@ -33,11 +33,11 @@
#ifndef UPB_WIRE_ENCODE_H_
#define UPB_WIRE_ENCODE_H_
-#include "upb/message/message.h"
-#include "upb/wire/types.h"
+#include "upb/upb/message/message.h"
+#include "upb/upb/wire/types.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -91,6 +91,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_WIRE_ENCODE_H_ */
diff --git a/upb/upb/wire/eps_copy_input_stream.c b/upb/upb/wire/eps_copy_input_stream.c
index b46a50d..053c663 100644
--- a/upb/upb/wire/eps_copy_input_stream.c
+++ b/upb/upb/wire/eps_copy_input_stream.c
@@ -28,7 +28,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/wire/eps_copy_input_stream.h"
+#include "upb/upb/wire/eps_copy_input_stream.h"
static const char* _upb_EpsCopyInputStream_NoOpCallback(
upb_EpsCopyInputStream* e, const char* old_end, const char* new_start) {
diff --git a/upb/upb/wire/eps_copy_input_stream.h b/upb/upb/wire/eps_copy_input_stream.h
index 515b9bb..b42c101 100644
--- a/upb/upb/wire/eps_copy_input_stream.h
+++ b/upb/upb/wire/eps_copy_input_stream.h
@@ -33,10 +33,10 @@
#include <string.h>
-#include "upb/mem/arena.h"
+#include "upb/upb/mem/arena.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -423,6 +423,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif // UPB_WIRE_EPS_COPY_INPUT_STREAM_H_
diff --git a/upb/upb/wire/eps_copy_input_stream_test.cc b/upb/upb/wire/eps_copy_input_stream_test.cc
index 688e076..9ca757c 100644
--- a/upb/upb/wire/eps_copy_input_stream_test.cc
+++ b/upb/upb/wire/eps_copy_input_stream_test.cc
@@ -28,14 +28,14 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/wire/eps_copy_input_stream.h"
+#include "upb/upb/wire/eps_copy_input_stream.h"
#include <string.h>
#include <string>
#include "gtest/gtest.h"
-#include "upb/mem/arena.hpp"
+#include "upb/upb/mem/arena.hpp"
// begin:google_only
// #include "testing/fuzzing/fuzztest.h"
// end:google_only
diff --git a/upb/upb/wire/internal/common.h b/upb/upb/wire/internal/common.h
index bb9cf42..5deb0fe 100644
--- a/upb/upb/wire/internal/common.h
+++ b/upb/upb/wire/internal/common.h
@@ -32,7 +32,7 @@
#define UPB_WIRE_INTERNAL_COMMON_H_
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
// MessageSet wire format is:
// message MessageSet {
@@ -48,6 +48,6 @@
kUpb_MsgSet_Message = 3,
};
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_WIRE_INTERNAL_COMMON_H_ */
diff --git a/upb/upb/wire/internal/decode.h b/upb/upb/wire/internal/decode.h
index aa3d1b3..bf842f0 100644
--- a/upb/upb/wire/internal/decode.h
+++ b/upb/upb/wire/internal/decode.h
@@ -36,14 +36,14 @@
#ifndef UPB_WIRE_INTERNAL_DECODE_H_
#define UPB_WIRE_INTERNAL_DECODE_H_
-#include "upb/mem/internal/arena.h"
-#include "upb/message/internal/message.h"
-#include "upb/wire/decode.h"
-#include "upb/wire/eps_copy_input_stream.h"
+#include "upb/upb/mem/internal/arena.h"
+#include "upb/upb/message/internal/message.h"
+#include "upb/upb/wire/decode.h"
+#include "upb/upb/wire/eps_copy_input_stream.h"
#include "utf8_range.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#define DECODE_NOGROUP (uint32_t) - 1
@@ -161,6 +161,6 @@
return tag;
}
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_WIRE_INTERNAL_DECODE_H_ */
diff --git a/upb/upb/wire/internal/swap.h b/upb/upb/wire/internal/swap.h
index 9d9e780..d25eed5 100644
--- a/upb/upb/wire/internal/swap.h
+++ b/upb/upb/wire/internal/swap.h
@@ -34,7 +34,7 @@
#include <stdint.h>
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -63,6 +63,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPB_WIRE_INTERNAL_SWAP_H_ */
diff --git a/upb/upb/wire/reader.c b/upb/upb/wire/reader.c
index 92a7b5b..e2f1402 100644
--- a/upb/upb/wire/reader.c
+++ b/upb/upb/wire/reader.c
@@ -28,13 +28,13 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upb/wire/reader.h"
+#include "upb/upb/wire/reader.h"
-#include "upb/wire/eps_copy_input_stream.h"
-#include "upb/wire/types.h"
+#include "upb/upb/wire/eps_copy_input_stream.h"
+#include "upb/upb/wire/types.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
UPB_NOINLINE _upb_WireReader_ReadLongVarintRet
_upb_WireReader_ReadLongVarint(const char* ptr, uint64_t val) {
diff --git a/upb/upb/wire/reader.h b/upb/upb/wire/reader.h
index e5663db..862fed2 100644
--- a/upb/upb/wire/reader.h
+++ b/upb/upb/wire/reader.h
@@ -31,12 +31,12 @@
#ifndef UPB_WIRE_READER_H_
#define UPB_WIRE_READER_H_
-#include "upb/wire/eps_copy_input_stream.h"
-#include "upb/wire/internal/swap.h"
-#include "upb/wire/types.h"
+#include "upb/upb/wire/eps_copy_input_stream.h"
+#include "upb/upb/wire/internal/swap.h"
+#include "upb/upb/wire/types.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -225,6 +225,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif // UPB_WIRE_READER_H_
diff --git a/upb/upbc/BUILD b/upb/upbc/BUILD
index ea9d9c0..da2e4df 100644
--- a/upb/upbc/BUILD
+++ b/upb/upbc/BUILD
@@ -6,24 +6,24 @@
# https://developers.google.com/open-source/licenses/bsd
load(
- "//bazel:build_defs.bzl",
+ "//upb/bazel:build_defs.bzl",
"UPB_DEFAULT_COPTS",
"UPB_DEFAULT_CPPOPTS",
)
load(
- "//bazel:upb_proto_library.bzl",
+ "//upb/bazel:upb_proto_library.bzl",
"upb_proto_library",
"upb_proto_reflection_library",
)
load(
- "//upbc:bootstrap_compiler.bzl",
+ "//upb/upbc:bootstrap_compiler.bzl",
"bootstrap_cc_binary",
"bootstrap_cc_library",
"bootstrap_upb_proto_library",
)
# begin:google_only
-# package(default_applicable_licenses = ["//:license"])
+# package(default_applicable_licenses = ["//upb:license"])
# end:google_only
licenses(["notice"])
@@ -31,19 +31,19 @@
proto_library(
name = "code_generator_request",
srcs = ["code_generator_request.proto"],
- visibility = ["//:friends"],
- deps = ["@com_google_protobuf//:compiler_plugin_proto"],
+ visibility = ["//upb:friends"],
+ deps = ["//:compiler_plugin_proto"],
)
upb_proto_library(
name = "code_generator_request_upb_proto",
- visibility = ["//:friends"],
+ visibility = ["//upb:friends"],
deps = [":code_generator_request"],
)
upb_proto_reflection_library(
name = "code_generator_request_upb_proto_reflection",
- visibility = ["//:friends"],
+ visibility = ["//upb:friends"],
deps = [":code_generator_request"],
)
@@ -63,19 +63,19 @@
],
oss_src_files = ["google/protobuf/compiler/plugin.proto"],
oss_src_rules = [
- "@com_google_protobuf//:descriptor_proto_srcs",
- "@com_google_protobuf//src/google/protobuf/compiler:plugin_proto_src",
+ "//:descriptor_proto_srcs",
+ "//src/google/protobuf/compiler:plugin_proto_src",
],
oss_strip_prefix = "third_party/protobuf/github/bootstrap/src",
- proto_lib_deps = ["@com_google_protobuf//:compiler_plugin_proto"],
- visibility = ["//:friends"],
- deps = ["//:descriptor_upb_proto"],
+ proto_lib_deps = ["//:compiler_plugin_proto"],
+ visibility = ["//upb:friends"],
+ deps = ["//upb:descriptor_upb_proto"],
)
upb_proto_reflection_library(
name = "plugin_upb_proto_reflection",
- visibility = ["//:friends"],
- deps = ["@com_google_protobuf//:compiler_plugin_proto"],
+ visibility = ["//upb:friends"],
+ deps = ["//:compiler_plugin_proto"],
)
bootstrap_cc_library(
@@ -87,10 +87,10 @@
"common.h",
],
bootstrap_deps = [
- "//:reflection",
+ "//upb:reflection",
],
copts = UPB_DEFAULT_CPPOPTS,
- visibility = ["//protos_generator:__pkg__"],
+ visibility = ["//upb/protos_generator:__pkg__"],
deps = [
"@com_google_absl//absl/strings",
],
@@ -106,17 +106,17 @@
],
bootstrap_deps = [
":common",
- "//:reflection",
- "//:descriptor_upb_proto",
+ "//upb:reflection",
+ "//upb:descriptor_upb_proto",
],
copts = UPB_DEFAULT_CPPOPTS,
- visibility = ["//protos_generator:__pkg__"],
+ visibility = ["//upb/protos_generator:__pkg__"],
deps = [
- "//:base",
- "//:mini_descriptor",
- "//:mini_table",
- "//:mini_table_internal",
- "//:port",
+ "//upb:base",
+ "//upb:mini_descriptor",
+ "//upb:mini_table",
+ "//upb:mini_table_internal",
+ "//upb:port",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/strings",
],
@@ -131,7 +131,7 @@
"keywords.h",
],
copts = UPB_DEFAULT_CPPOPTS,
- visibility = ["//protos_generator:__pkg__"],
+ visibility = ["//upb/protos_generator:__pkg__"],
)
bootstrap_cc_library(
@@ -141,13 +141,13 @@
],
bootstrap_deps = [
":plugin_upb_proto",
- "//:descriptor_upb_proto",
- "//:reflection",
+ "//upb:descriptor_upb_proto",
+ "//upb:reflection",
],
copts = UPB_DEFAULT_CPPOPTS,
- visibility = ["//protos_generator:__pkg__"],
+ visibility = ["//upb/protos_generator:__pkg__"],
deps = [
- "//:port",
+ "//upb:port",
"@com_google_absl//absl/container:flat_hash_set",
"@com_google_absl//absl/log:absl_check",
"@com_google_absl//absl/log:absl_log",
@@ -164,16 +164,16 @@
"names.h",
],
bootstrap_deps = [
- "//:reflection",
+ "//upb:reflection",
],
copts = UPB_DEFAULT_CPPOPTS,
- visibility = ["//protos_generator:__pkg__"],
+ visibility = ["//upb/protos_generator:__pkg__"],
deps = [
+ "//:protobuf",
+ "//src/google/protobuf/compiler:code_generator",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/strings",
- "@com_google_protobuf//:protobuf",
- "@com_google_protobuf//src/google/protobuf/compiler:code_generator",
],
)
@@ -186,7 +186,7 @@
visibility = ["//visibility:public"],
deps = [
":upbdev",
- "//:port",
+ "//upb:port",
],
)
@@ -209,16 +209,16 @@
":code_generator_request_upb_proto_reflection",
":plugin_upb_proto",
":plugin_upb_proto_reflection",
- "//:base",
- "//:descriptor_upb_proto",
- "//:json",
- "//:mem",
- "//:mini_descriptor",
- "//:mini_table",
- "//:port",
- "//:reflection",
- "//:reflection_internal",
- "//:wire",
+ "//upb:base",
+ "//upb:descriptor_upb_proto",
+ "//upb:json",
+ "//upb:mem",
+ "//upb:mini_descriptor",
+ "//upb:mini_table",
+ "//upb:port",
+ "//upb:reflection",
+ "//upb:reflection_internal",
+ "//upb:wire",
],
)
@@ -231,17 +231,17 @@
":names",
":plugin",
":plugin_upb_proto",
- "//:descriptor_upb_proto",
- "//:reflection",
+ "//upb:descriptor_upb_proto",
+ "//upb:reflection",
],
copts = UPB_DEFAULT_CPPOPTS,
visibility = ["//visibility:public"],
deps = [
- "//:base",
- "//:mem",
- "//:mini_table_internal",
- "//:port",
- "//:wire_types",
+ "//upb:base",
+ "//upb:mem",
+ "//upb:mini_table_internal",
+ "//upb:port",
+ "//upb:wire_types",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/container:flat_hash_set",
"@com_google_absl//absl/log:absl_check",
@@ -266,9 +266,9 @@
":common",
":file_layout",
":plugin",
- "//:descriptor_upb_proto",
- "//:reflection",
- "//upb/util:def_to_proto",
+ "//upb:descriptor_upb_proto",
+ "//upb:reflection",
+ "//upb/upb/util:def_to_proto",
],
)
@@ -288,7 +288,7 @@
deps = [
":plugin_upb_proto",
":upbdev",
- "//:port",
+ "//upb:port",
"@com_google_absl//absl/log:absl_log",
"@com_google_absl//absl/strings",
],
diff --git a/upb/upbc/bootstrap_compiler.bzl b/upb/upbc/bootstrap_compiler.bzl
index e2bb7d7..639757b 100644
--- a/upb/upbc/bootstrap_compiler.bzl
+++ b/upb/upbc/bootstrap_compiler.bzl
@@ -1,17 +1,17 @@
"""Macros that implement bootstrapping for the upb code generator."""
load(
- "//bazel:upb_proto_library.bzl",
+ "//upb/bazel:upb_proto_library.bzl",
"upb_proto_library",
)
load(
- "//cmake:build_defs.bzl",
+ "//upb/cmake:build_defs.bzl",
"staleness_test",
)
_stages = ["_stage0", "_stage1", ""]
-_protoc = "@com_google_protobuf//:protoc"
-_upbc_base = "//upbc:protoc-gen-upb"
+_protoc = "//:protoc"
+_upbc_base = "//upb/upbc:protoc-gen-upb"
# begin:google_only
# _is_google3 = True
@@ -28,7 +28,7 @@
def bootstrap_cc_library(name, visibility, deps, bootstrap_deps, **kwargs):
for stage in _stages:
- stage_visibility = visibility if stage == "" else ["//upbc:__pkg__"]
+ stage_visibility = visibility if stage == "" else ["//upb/upbc:__pkg__"]
native.cc_library(
name = name + stage,
deps = deps + [dep + stage for dep in bootstrap_deps],
@@ -115,12 +115,12 @@
srcs = _generated_srcs_for_suffix(base_dir + "stage0", oss_src_files, ".upb.c"),
hdrs = _generated_srcs_for_suffix(base_dir + "stage0", oss_src_files, ".upb.h"),
includes = [base_dir + "stage0"],
- visibility = ["//upbc:__pkg__"],
+ visibility = ["//upb/upbc:__pkg__"],
# This macro signals to the runtime that it must use OSS APIs for descriptor.proto/plugin.proto.
defines = ["UPB_BOOTSTRAP_STAGE0"],
deps = [
- "//:generated_code_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me",
- "//:mini_table",
+ "//upb:generated_code_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me",
+ "//upb:mini_table",
] + [dep + "_stage0" for dep in deps],
**kwargs
)
@@ -137,7 +137,7 @@
"--plugin=protoc-gen-upb=$(location " + _upbc(0) + ") " + _extra_proto_path +
"--upb_out=$(@D)/" + base_dir + "stage1 " +
" ".join(src_files),
- visibility = ["//upbc:__pkg__"],
+ visibility = ["//upb/upbc:__pkg__"],
tools = [
_protoc,
_upbc(0),
@@ -150,9 +150,9 @@
srcs = _generated_srcs_for_suffix(base_dir + "stage1", src_files, ".upb.c"),
hdrs = _generated_srcs_for_suffix(base_dir + "stage1", src_files, ".upb.h"),
includes = [base_dir + "stage1"],
- visibility = ["//upbc:__pkg__"],
+ visibility = ["//upb/upbc:__pkg__"],
deps = [
- "//:generated_code_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me",
+ "//upb:generated_code_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me",
] + [dep + "_stage1" for dep in deps],
**kwargs
)
diff --git a/upb/upbc/code_generator_request.c b/upb/upbc/code_generator_request.c
index 4ab5fcc..f302c0a 100644
--- a/upb/upbc/code_generator_request.c
+++ b/upb/upbc/code_generator_request.c
@@ -28,16 +28,16 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upbc/code_generator_request.h"
+#include "upb/upbc/code_generator_request.h"
#include <inttypes.h>
#include "google/protobuf/compiler/plugin.upb.h"
-#include "upb/mini_descriptor/decode.h"
-#include "upb/reflection/def.h"
+#include "upb/upb/mini_descriptor/decode.h"
+#include "upb/upb/reflection/def.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
/******************************************************************************/
diff --git a/upb/upbc/code_generator_request.h b/upb/upbc/code_generator_request.h
index 3218c08..ba1038f 100644
--- a/upb/upbc/code_generator_request.h
+++ b/upb/upbc/code_generator_request.h
@@ -31,12 +31,12 @@
#ifndef UPBC_CODE_GENERATOR_REQUEST_H_
#define UPBC_CODE_GENERATOR_REQUEST_H_
-#include "upb/mem/arena.h"
-#include "upb/reflection/def.h"
-#include "upbc/code_generator_request.upb.h"
+#include "upb/upb/mem/arena.h"
+#include "upb/upb/reflection/def.h"
+#include "upb/upbc/code_generator_request.upb.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -50,6 +50,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* UPBC_CODE_GENERATOR_REQUEST_H_ */
diff --git a/upb/upbc/common.cc b/upb/upbc/common.cc
index cfca0fc..230d264 100644
--- a/upb/upbc/common.cc
+++ b/upb/upbc/common.cc
@@ -28,10 +28,10 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upbc/common.h"
+#include "upb/upbc/common.h"
#include "absl/strings/str_replace.h"
-#include "upb/reflection/def.hpp"
+#include "upb/upb/reflection/def.hpp"
namespace upbc {
diff --git a/upb/upbc/common.h b/upb/upbc/common.h
index 1c70088..de05c47 100644
--- a/upb/upbc/common.h
+++ b/upb/upbc/common.h
@@ -35,7 +35,7 @@
#include "absl/strings/str_replace.h"
#include "absl/strings/substitute.h"
-#include "upb/reflection/def.hpp"
+#include "upb/upb/reflection/def.hpp"
namespace upbc {
diff --git a/upb/upbc/file_layout.cc b/upb/upbc/file_layout.cc
index fab6120..4c21996 100644
--- a/upb/upbc/file_layout.cc
+++ b/upb/upbc/file_layout.cc
@@ -28,13 +28,13 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upbc/file_layout.h"
+#include "upb/upbc/file_layout.h"
#include <string>
#include <unordered_set>
-#include "upb/mini_table/internal/extension.h"
-#include "upbc/common.h"
+#include "upb/upb/mini_table/internal/extension.h"
+#include "upb/upbc/common.h"
namespace upbc {
diff --git a/upb/upbc/file_layout.h b/upb/upbc/file_layout.h
index 9df43aa..92e078a 100644
--- a/upb/upbc/file_layout.h
+++ b/upb/upbc/file_layout.h
@@ -46,13 +46,13 @@
// end:github_only
#include "absl/container/flat_hash_map.h"
-#include "upb/base/status.hpp"
-#include "upb/mini_descriptor/decode.h"
-#include "upb/reflection/def.h"
-#include "upb/reflection/def.hpp"
+#include "upb/upb/base/status.hpp"
+#include "upb/upb/mini_descriptor/decode.h"
+#include "upb/upb/reflection/def.h"
+#include "upb/upb/reflection/def.hpp"
// Must be last
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
namespace upbc {
@@ -124,6 +124,6 @@
} // namespace upbc
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif // UPBC_FILE_LAYOUT_H
diff --git a/upb/upbc/get_used_fields.c b/upb/upbc/get_used_fields.c
index 796e501..f07ccc1 100644
--- a/upb/upbc/get_used_fields.c
+++ b/upb/upbc/get_used_fields.c
@@ -28,18 +28,18 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upbc/get_used_fields.h"
+#include "upb/upbc/get_used_fields.h"
#include "google/protobuf/descriptor.upb.h"
#include "google/protobuf/compiler/plugin.upb.h"
-#include "upb/reflection/def_pool.h"
-#include "upb/reflection/field_def.h"
-#include "upb/reflection/message.h"
-#include "upb/reflection/message_def.h"
-#include "upb/wire/decode.h"
+#include "upb/upb/reflection/def_pool.h"
+#include "upb/upb/reflection/field_def.h"
+#include "upb/upb/reflection/message.h"
+#include "upb/upb/reflection/message_def.h"
+#include "upb/upb/wire/decode.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#define upbdev_Err(...) \
{ \
diff --git a/upb/upbc/get_used_fields.h b/upb/upbc/get_used_fields.h
index ccf3208..6bbbfd3 100644
--- a/upb/upbc/get_used_fields.h
+++ b/upb/upbc/get_used_fields.h
@@ -31,12 +31,12 @@
#ifndef UPBC_GET_USED_FIELDS
#define UPBC_GET_USED_FIELDS
-#include "upb/base/status.h"
-#include "upb/base/string_view.h"
-#include "upb/mem/arena.h"
+#include "upb/upb/base/status.h"
+#include "upb/upb/base/string_view.h"
+#include "upb/upb/mem/arena.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -52,6 +52,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif // UPBC_GET_USED_FIELDS
diff --git a/upb/upbc/keywords.cc b/upb/upbc/keywords.cc
index 3f51705..95abec3 100644
--- a/upb/upbc/keywords.cc
+++ b/upb/upbc/keywords.cc
@@ -28,7 +28,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upbc/keywords.h"
+#include "upb/upbc/keywords.h"
#include <string>
#include <unordered_set>
diff --git a/upb/upbc/names.cc b/upb/upbc/names.cc
index 63521b8..0f9d4b6 100644
--- a/upb/upbc/names.cc
+++ b/upb/upbc/names.cc
@@ -28,14 +28,14 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upbc/names.h"
+#include "upb/upbc/names.h"
#include <string>
#include "absl/strings/match.h"
#include "absl/strings/string_view.h"
#include "google/protobuf/descriptor.h"
-#include "upb/reflection/def.hpp"
+#include "upb/upb/reflection/def.hpp"
namespace upbc {
diff --git a/upb/upbc/names.h b/upb/upbc/names.h
index 87b0a15..f8f7b94 100644
--- a/upb/upbc/names.h
+++ b/upb/upbc/names.h
@@ -37,7 +37,7 @@
#include "absl/container/flat_hash_map.h"
#include "absl/strings/string_view.h"
#include "google/protobuf/descriptor.h"
-#include "upb/reflection/def.hpp"
+#include "upb/upb/reflection/def.hpp"
namespace upbc {
diff --git a/upb/upbc/plugin.h b/upb/upbc/plugin.h
index 465bda0..bb4b1b0 100644
--- a/upb/upbc/plugin.h
+++ b/upb/upbc/plugin.h
@@ -59,10 +59,10 @@
#include "absl/log/absl_log.h"
#include "absl/strings/str_split.h"
#include "absl/strings/string_view.h"
-#include "upb/reflection/def.hpp"
+#include "upb/upb/reflection/def.hpp"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
namespace upbc {
@@ -207,6 +207,6 @@
} // namespace upbc
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif // UPB_UPBC_PLUGIN_H_
diff --git a/upb/upbc/protoc-gen-upb.cc b/upb/upbc/protoc-gen-upb.cc
index 56b431f..0a3e18f 100644
--- a/upb/upbc/protoc-gen-upb.cc
+++ b/upb/upbc/protoc-gen-upb.cc
@@ -49,17 +49,17 @@
#include "absl/strings/str_replace.h"
#include "absl/strings/string_view.h"
#include "absl/strings/substitute.h"
-#include "upb/base/descriptor_constants.h"
-#include "upb/base/string_view.h"
-#include "upb/reflection/def.hpp"
-#include "upb/wire/types.h"
-#include "upbc/common.h"
-#include "upbc/file_layout.h"
-#include "upbc/names.h"
-#include "upbc/plugin.h"
+#include "upb/upb/base/descriptor_constants.h"
+#include "upb/upb/base/string_view.h"
+#include "upb/upb/reflection/def.hpp"
+#include "upb/upb/wire/types.h"
+#include "upb/upbc/common.h"
+#include "upb/upbc/file_layout.h"
+#include "upb/upbc/names.h"
+#include "upb/upbc/plugin.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
namespace upbc {
namespace {
@@ -852,7 +852,7 @@
output(
"#ifndef $0_UPB_H_\n"
"#define $0_UPB_H_\n\n"
- "#include \"upb/generated_code_support.h\"\n",
+ "#include \"upb/upb/generated_code_support.h\"\n",
ToPreproc(file.name()));
for (int i = 0; i < file.public_dependency_count(); i++) {
@@ -867,7 +867,7 @@
output(
"// Must be last. \n"
- "#include \"upb/port/def.inc\"\n"
+ "#include \"upb/upb/port/def.inc\"\n"
"\n"
"#ifdef __cplusplus\n"
"extern \"C\" {\n"
@@ -985,7 +985,7 @@
"} /* extern \"C\" */\n"
"#endif\n"
"\n"
- "#include \"upb/port/undef.inc\"\n"
+ "#include \"upb/upb/port/undef.inc\"\n"
"\n"
"#endif /* $0_UPB_H_ */\n",
ToPreproc(file.name()));
@@ -1548,7 +1548,7 @@
output(
"#include <stddef.h>\n"
- "#include \"upb/generated_code_support.h\"\n"
+ "#include \"upb/upb/generated_code_support.h\"\n"
"#include \"$0\"\n",
HeaderFilename(file));
@@ -1559,7 +1559,7 @@
output(
"\n"
"// Must be last.\n"
- "#include \"upb/port/def.inc\"\n"
+ "#include \"upb/upb/port/def.inc\"\n"
"\n");
int msg_count = WriteMessages(pools, file, options, output);
@@ -1575,7 +1575,7 @@
output(" $0,\n", ext_count);
output("};\n\n");
- output("#include \"upb/port/undef.inc\"\n");
+ output("#include \"upb/upb/port/undef.inc\"\n");
output("\n");
}
@@ -1640,7 +1640,7 @@
const Options& options, Output& output) {
output(
"#include <stddef.h>\n"
- "#include \"upb/generated_code_support.h\"\n"
+ "#include \"upb/upb/generated_code_support.h\"\n"
"#include \"$0\"\n\n",
HeaderFilename(file));
diff --git a/upb/upbc/protoc-gen-upbdefs.cc b/upb/upbc/protoc-gen-upbdefs.cc
index b345530..d3b30ab 100644
--- a/upb/upbc/protoc-gen-upbdefs.cc
+++ b/upb/upbc/protoc-gen-upbdefs.cc
@@ -31,11 +31,11 @@
#include <memory>
#include "google/protobuf/descriptor.upb.h"
-#include "upb/reflection/def.hpp"
-#include "upb/util/def_to_proto.h"
-#include "upbc/common.h"
-#include "upbc/file_layout.h"
-#include "upbc/plugin.h"
+#include "upb/upb/reflection/def.hpp"
+#include "upb/upb/util/def_to_proto.h"
+#include "upb/upbc/common.h"
+#include "upb/upbc/file_layout.h"
+#include "upb/upbc/plugin.h"
namespace upbc {
namespace {
@@ -67,17 +67,17 @@
output(
"#ifndef $0_UPBDEFS_H_\n"
"#define $0_UPBDEFS_H_\n\n"
- "#include \"upb/reflection/def.h\"\n"
- "#include \"upb/reflection/internal/def_pool.h\"\n"
- "#include \"upb/port/def.inc\"\n"
+ "#include \"upb/upb/reflection/def.h\"\n"
+ "#include \"upb/upb/reflection/internal/def_pool.h\"\n"
+ "#include \"upb/upb/port/def.inc\"\n"
"#ifdef __cplusplus\n"
"extern \"C\" {\n"
"#endif\n\n",
ToPreproc(file.name()));
- output("#include \"upb/reflection/def.h\"\n");
+ output("#include \"upb/upb/reflection/def.h\"\n");
output("\n");
- output("#include \"upb/port/def.inc\"\n");
+ output("#include \"upb/upb/port/def.inc\"\n");
output("\n");
output("extern _upb_DefPool_Init $0;\n", DefInitSymbol(file));
@@ -92,7 +92,7 @@
"} /* extern \"C\" */\n"
"#endif\n"
"\n"
- "#include \"upb/port/undef.inc\"\n"
+ "#include \"upb/upb/port/undef.inc\"\n"
"\n"
"#endif /* $0_UPBDEFS_H_ */\n",
ToPreproc(file.name()));
@@ -101,7 +101,7 @@
void WriteDefSource(upb::FileDefPtr file, Output& output) {
EmitFileWarning(file.name(), output);
- output("#include \"upb/reflection/def.h\"\n");
+ output("#include \"upb/upb/reflection/def.h\"\n");
output("#include \"$0\"\n", DefHeaderFilename(file));
output("#include \"$0\"\n", HeaderFilename(file));
output("\n");
diff --git a/upb/upbc/protoc-gen-upbdev.cc b/upb/upbc/protoc-gen-upbdev.cc
index 3093169..6b209f0 100644
--- a/upb/upbc/protoc-gen-upbdev.cc
+++ b/upb/upbc/protoc-gen-upbdev.cc
@@ -32,8 +32,8 @@
#include <string>
#include "google/protobuf/compiler/plugin.upb.h"
-#include "upbc/subprocess.h"
-#include "upbc/upbdev.h"
+#include "upb/upbc/subprocess.h"
+#include "upb/upbc/upbdev.h"
static constexpr char kDefaultPlugin[] = "protoc_dart_plugin";
diff --git a/upb/upbc/stage0/google/protobuf/compiler/plugin.upb.c b/upb/upbc/stage0/google/protobuf/compiler/plugin.upb.c
index 3a67715..26e71c8 100644
--- a/upb/upbc/stage0/google/protobuf/compiler/plugin.upb.c
+++ b/upb/upbc/stage0/google/protobuf/compiler/plugin.upb.c
@@ -1,5 +1,5 @@
#include <stddef.h>
-#include "upb/generated_code_support.h"
+#include "upb/upb/generated_code_support.h"
#include "google/protobuf/compiler/plugin.upb.h"
#include "google/protobuf/descriptor.upb.h"
diff --git a/upb/upbc/stage0/google/protobuf/compiler/plugin.upb.h b/upb/upbc/stage0/google/protobuf/compiler/plugin.upb.h
index 18fb72c..9971706 100644
--- a/upb/upbc/stage0/google/protobuf/compiler/plugin.upb.h
+++ b/upb/upbc/stage0/google/protobuf/compiler/plugin.upb.h
@@ -9,9 +9,9 @@
#ifndef GOOGLE_PROTOBUF_COMPILER_PLUGIN_PROTO_UPB_H_
#define GOOGLE_PROTOBUF_COMPILER_PLUGIN_PROTO_UPB_H_
-#include "upb/generated_code_support.h"
+#include "upb/upb/generated_code_support.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -687,6 +687,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif /* GOOGLE_PROTOBUF_COMPILER_PLUGIN_PROTO_UPB_H_ */
diff --git a/upb/upbc/subprocess.cc b/upb/upbc/subprocess.cc
index e0c2604..7a50905 100644
--- a/upb/upbc/subprocess.cc
+++ b/upb/upbc/subprocess.cc
@@ -31,7 +31,7 @@
// Shamelessly copied from the protobuf compiler's subprocess.cc
// except this version passes strings instead of Messages.
-#include "upbc/subprocess.h"
+#include "upb/upbc/subprocess.h"
#include <algorithm>
#include <cstring>
@@ -48,7 +48,7 @@
#include "absl/strings/substitute.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
namespace upbc {
diff --git a/upb/upbc/upbc_so.c b/upb/upbc/upbc_so.c
index 1cfc04b..b70f399 100644
--- a/upb/upbc/upbc_so.c
+++ b/upb/upbc/upbc_so.c
@@ -30,5 +30,5 @@
// These headers form a spanning tree for the upbc defs needed by FFI layers.
-#include "upbc/get_used_fields.h"
-#include "upbc/upbdev.h"
+#include "upb/upbc/get_used_fields.h"
+#include "upb/upbc/upbdev.h"
diff --git a/upb/upbc/upbdev.c b/upb/upbc/upbdev.c
index ffccd07..b77c94e 100644
--- a/upb/upbc/upbdev.c
+++ b/upb/upbc/upbdev.c
@@ -28,7 +28,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "upbc/upbdev.h"
+#include "upb/upbc/upbdev.h"
#ifdef _WIN32
#ifndef WIN32_LEAN_AND_MEAN
@@ -41,13 +41,13 @@
#include "google/protobuf/compiler/plugin.upb.h"
#include "google/protobuf/compiler/plugin.upbdefs.h"
-#include "upb/base/status.h"
-#include "upb/json/decode.h"
-#include "upb/json/encode.h"
-#include "upb/mem/arena.h"
-#include "upbc/code_generator_request.h"
-#include "upbc/code_generator_request.upb.h"
-#include "upbc/code_generator_request.upbdefs.h"
+#include "upb/upb/base/status.h"
+#include "upb/upb/json/decode.h"
+#include "upb/upb/json/encode.h"
+#include "upb/upb/mem/arena.h"
+#include "upb/upbc/code_generator_request.h"
+#include "upb/upbc/code_generator_request.upb.h"
+#include "upb/upbc/code_generator_request.upbdefs.h"
static google_protobuf_compiler_CodeGeneratorResponse* upbc_JsonDecode(
const char* data, size_t size, upb_Arena* arena, upb_Status* status) {
diff --git a/upb/upbc/upbdev.h b/upb/upbc/upbdev.h
index 047a1be..b6dca92 100644
--- a/upb/upbc/upbdev.h
+++ b/upb/upbc/upbdev.h
@@ -31,12 +31,12 @@
#ifndef UPBC_UPBDEV_H_
#define UPBC_UPBDEV_H_
-#include "upb/base/status.h"
-#include "upb/base/string_view.h"
-#include "upb/mem/arena.h"
+#include "upb/upb/base/status.h"
+#include "upb/upb/base/string_view.h"
+#include "upb/upb/mem/arena.h"
// Must be last.
-#include "upb/port/def.inc"
+#include "upb/upb/port/def.inc"
#ifdef __cplusplus
extern "C" {
@@ -66,6 +66,6 @@
} /* extern "C" */
#endif
-#include "upb/port/undef.inc"
+#include "upb/upb/port/undef.inc"
#endif // UPBC_UPBDEV_H_