Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: bazelbuild/rules_proto
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 6.0.0
Choose a base ref
...
head repository: bazelbuild/rules_proto
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 6.0.2
Choose a head ref
  • 2 commits
  • 9 files changed
  • 2 contributors

Commits on May 29, 2024

  1. Make rules_cc a production dep (#215)

    This is used in tools/file_concat which is part of proto_descriptor_set.
    I think this worked before because it was implicitly imported by bazel
    keith authored May 29, 2024

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    8df2b70 View commit details

Commits on Jun 17, 2024

  1. Fix Bazel version to 7.1.2, update lock file, fix no bzlmod builds (#217

    )
    comius authored Jun 17, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    db09d58 View commit details
Showing with 1,791 additions and 90 deletions.
  1. +57 −3 .bazelci/presubmit.yml
  2. +2 −0 .bazelrc
  3. +1 −0 .bazelversion
  4. +3 −3 MODULE.bazel
  5. +1,690 −73 MODULE.bazel.lock
  6. +4 −0 WORKSPACE
  7. +4 −10 dev_deps.bzl
  8. +11 −1 proto/repositories.bzl
  9. +19 −0 proto/setup.bzl
60 changes: 57 additions & 3 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
@@ -18,29 +18,83 @@ buildifier:
tasks:
ubuntu2004:
build_targets: *build_targets
build_flags:
- "--config=nobzlmod"
test_targets: *test_targets
test_flags:
- "--config=nobzlmod"
macos:
build_targets: *build_targets
build_flags:
- "--config=nobzlmod"
test_targets: *test_targets
test_flags:
- "--config=nobzlmod"
windows:
build_targets: *build_targets
build_flags:
- "--config=nobzlmod"
test_targets: *test_targets
test_flags:
- "--config=nobzlmod"
ubuntu2004_bzlmod:
platform: ubuntu2004
build_targets: *build_targets
build_flags:
- "--config=bzlmod"
- "--lockfile_mode=error"
test_targets: *test_targets
test_flags:
- "--config=bzlmod"
- "--lockfile_mode=error"
macos_bzlmod:
platform: macos
build_targets: *build_targets
build_flags:
- "--config=bzlmod"
- "--lockfile_mode=error"
test_targets: *test_targets
test_flags:
- "--config=bzlmod"
- "--lockfile_mode=error"
windows_bzlmod:
platform: windows
build_targets: *build_targets
build_flags:
- "--config=bzlmod"
- "--lockfile_mode=error"
test_targets: *test_targets
test_flags:
- "--config=bzlmod"
- "--lockfile_mode=error"
ubuntu2004_head:
bazel: last_green
platform: ubuntu2004
build_targets: *build_targets
build_flags:
- "--config=nobzlmod"
test_targets: *test_targets
test_flags:
- "--config=nobzlmod"
macos_head:
bazel: last_green
platform: macos
build_targets: *build_targets
build_flags:
- "--config=nobzlmod"
test_targets: *test_targets
test_flags:
- "--config=nobzlmod"
windows_head:
bazel: last_green
platform: windows
build_targets: *build_targets
build_flags:
- "--config=nobzlmod"
test_targets: *test_targets
ubuntu2004_bzlmod:
test_flags:
- "--config=nobzlmod"
ubuntu2004_head_bzlmod:
bazel: last_green
platform: ubuntu2004
build_flags:
@@ -49,7 +103,7 @@ tasks:
test_flags:
- "--config=bzlmod"
test_targets: *test_targets_bzlmod
macos_bzlmod:
macos_head_bzlmod:
bazel: last_green
platform: macos
build_flags:
@@ -58,7 +112,7 @@ tasks:
test_flags:
- "--config=bzlmod"
test_targets: *test_targets_bzlmod
windows_bzlmod:
windows_head_bzlmod:
bazel: last_green
platform: windows
build_flags:
2 changes: 2 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
build:bzlmod --enable_bzlmod
build:nobzlmod --noenable_bzlmod

1 change: 1 addition & 0 deletions .bazelversion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7.1.2
6 changes: 3 additions & 3 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -7,13 +7,13 @@ module(
compatibility_level = 1,
)

bazel_dep(name = "rules_license", version = "0.0.7")
bazel_dep(name = "bazel_skylib", version = "1.3.0")
bazel_dep(name = "bazel_features", version = "1.4.1")
bazel_dep(name = "bazel_skylib", version = "1.3.0")
bazel_dep(name = "rules_cc", version = "0.0.1")
bazel_dep(name = "rules_license", version = "0.0.7")

# Dependencies needed in tests
bazel_dep(name = "stardoc", version = "0.5.6", dev_dependency = True, repo_name = "io_bazel_stardoc")
bazel_dep(name = "rules_cc", version = "0.0.1", dev_dependency = True)
bazel_dep(name = "googletest", version = "1.11.0", dev_dependency = True, repo_name = "com_google_googletest")
bazel_dep(name = "protobuf", version = "23.1", dev_dependency = True, repo_name = "com_google_protobuf")
bazel_dep(name = "platforms", version = "0.0.8", dev_dependency = True)
1,763 changes: 1,690 additions & 73 deletions MODULE.bazel.lock

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
@@ -4,6 +4,10 @@ load("//proto:repositories.bzl", "rules_proto_dependencies")

rules_proto_dependencies()

load("//proto:setup.bzl", "rules_proto_setup")

rules_proto_setup()

load("//proto:toolchains.bzl", "rules_proto_toolchains")

rules_proto_toolchains()
14 changes: 4 additions & 10 deletions dev_deps.bzl
Original file line number Diff line number Diff line change
@@ -27,16 +27,6 @@ def rules_proto_dev_deps():
],
)

http_archive(
name = "rules_cc",
sha256 = "4aeb102efbcfad509857d7cb9c5456731e8ce566bfbf2960286a2ec236796cc3",
strip_prefix = "rules_cc-2f8c04c04462ab83c545ab14c0da68c3b4c96191",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_cc/archive/2f8c04c04462ab83c545ab14c0da68c3b4c96191.tar.gz",
"https://github.com/bazelbuild/rules_cc/archive/2f8c04c04462ab83c545ab14c0da68c3b4c96191.tar.gz",
],
)

http_archive(
name = "com_google_googletest",
sha256 = "81964fe578e9bd7c94dfdb09c8e4d6e6759e19967e397dbea48d1c10e45d0df2",
@@ -64,4 +54,8 @@ def rules_proto_dev_deps():
"https://mirror.bazel.build/github.com/protocolbuffers/protobuf/archive/v23.1.tar.gz",
"https://github.com/protocolbuffers/protobuf/archive/v23.1.tar.gz",
],
remote_patch_strip = 1,
remote_patches = {
"https://raw.githubusercontent.com/bazelbuild/bazel-central-registry/main/modules/protobuf/23.1/patches/0007-bazel-Get-rid-of-exec_tools.-13401.patch": "sha256-Thj5ZYqMpgaUrjZv8XyWqyD+I6XQNcZjo4jI14a7QxE=",
},
)
12 changes: 11 additions & 1 deletion proto/repositories.bzl
Original file line number Diff line number Diff line change
@@ -11,7 +11,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Dependencies required to use rules_proto."""

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
@@ -47,3 +46,14 @@ def rules_proto_dependencies():
strip_prefix = "bazel_features-1.4.1",
url = "https://github.com/bazel-contrib/bazel_features/releases/download/v1.4.1/bazel_features-v1.4.1.tar.gz",
)

maybe(
http_archive,
name = "rules_cc",
sha256 = "4aeb102efbcfad509857d7cb9c5456731e8ce566bfbf2960286a2ec236796cc3",
strip_prefix = "rules_cc-2f8c04c04462ab83c545ab14c0da68c3b4c96191",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_cc/archive/2f8c04c04462ab83c545ab14c0da68c3b4c96191.tar.gz",
"https://github.com/bazelbuild/rules_cc/archive/2f8c04c04462ab83c545ab14c0da68c3b4c96191.tar.gz",
],
)
19 changes: 19 additions & 0 deletions proto/setup.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2024 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Setup required to use rules_proto."""

load("@bazel_features//:deps.bzl", "bazel_features_deps")

def rules_proto_setup():
bazel_features_deps()