Skip to content

Commit

Permalink
Move to proto_common for all upb aspects to fix numerous tricky edge …
Browse files Browse the repository at this point in the history
…cases and simplify the code

PiperOrigin-RevId: 527937369
  • Loading branch information
thomasvl authored and copybara-github committed Apr 28, 2023
1 parent 88d5b91 commit 2282505
Show file tree
Hide file tree
Showing 14 changed files with 260 additions and 259 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/bazel_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ jobs:
- { NAME: "macOS", BAZEL: bazel, CC: clang, os: macos-11 }
- { NAME: "Windows", BAZEL: bazel, os: windows-2019, startup-flags: "--output_user_root=C:/tmp", flags: "--config=cpp17_msvc", targets: "upb/... upbc/... python/... protos/... protos_generator/..." }
# We support two Bazel versions back per https://opensource.google/documentation/policies/cplusplus-support
- { NAME: "Bazel 4.1.0", BAZEL: bazel-4.1.0-linux-x86_64, CC: clang, os: ubuntu-20-large }
- { NAME: "Bazel 5.3.0", BAZEL: bazel-5.3.0-linux-x86_64, CC: clang, os: ubuntu-20-large }
- { NAME: "Bazel 6.1.1", BAZEL: bazel-6.1.1-linux-x86_64, CC: clang, os: ubuntu-20-large }

name: ${{ matrix.NAME }}

Expand All @@ -52,10 +52,10 @@ jobs:
wget -O $FILENAME https://github.com/bazelbuild/bazel/releases/download/$VERSION/${{ matrix.BAZEL }}
chmod a+x $FILENAME
if: ${{ matrix.BAZEL != 'bazel' }}
- name: Check compiler version
- name: Check compiler versions
if: matrix.CC
run: ${{ matrix.CC }} --version
- name: Check Bazel version
- name: Check Bazel versions
run: ${{ matrix.BAZEL }} --version
- id: bazel-cache
name: Set up Bazel caching
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/python_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ jobs:
export_environment_variables: true
- name: Use gcloud CLI
run: gcloud info
- name: Check compiler version
if: matrix.CC
run: ${{ matrix.CC }} --version
- name: Configure Docker
run: gcloud auth configure-docker -q us-docker.pkg.dev
- name: Pull Docker Image
Expand Down
6 changes: 2 additions & 4 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,12 @@ http_archive(
)

load("@com_google_googletest//:googletest_deps.bzl", "googletest_deps")

googletest_deps()

load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
rules_pkg_dependencies()

load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")
rules_proto_dependencies()
rules_proto_toolchains()
rules_pkg_dependencies()

load("//bazel:system_python.bzl", "system_python")
system_python(
Expand Down
13 changes: 2 additions & 11 deletions bazel/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -46,22 +46,13 @@ bzl_library(
srcs = ["py_proto_library.bzl"],
)

bzl_library(
name = "proto_common_wrapper_bzl",
srcs = ["proto_common_wrapper.bzl"],
visibility = ["//protos/bazel:__pkg__"],
deps = [
"@rules_proto//proto:defs",
],
)

bzl_library(
name = "upb_proto_library_bzl",
srcs = ["upb_proto_library.bzl"],
visibility = ["//visibility:public"],
deps = [
":proto_common_wrapper_bzl",
"@rules_proto//proto:defs",
"@bazel_skylib//lib:paths",
"@bazel_tools//tools/cpp:toolchain_utils.bzl",
"@rules_proto//proto:defs",
],
)
68 changes: 0 additions & 68 deletions bazel/proto_common_wrapper.bzl

This file was deleted.

Loading

0 comments on commit 2282505

Please sign in to comment.