Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove protobuf_workspace #181

Merged
merged 7 commits into from
Oct 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ module(
)

bazel_dep(name = "bazel_skylib", version = "1.3.0")
bazel_dep(name = "protobuf", version = "21.7", repo_name = "com_google_protobuf")

# TODO(bazel-team): add support for protobuf_workspace

# Dependencies needed in tests
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 = "21.7", dev_dependency = True, repo_name = "com_google_protobuf")
thesayyn marked this conversation as resolved.
Show resolved Hide resolved
28 changes: 8 additions & 20 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,17 @@ rules_proto_dependencies()

rules_proto_toolchains()

# Test-only dependencies.

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "com_google_googletest",
sha256 = "81964fe578e9bd7c94dfdb09c8e4d6e6759e19967e397dbea48d1c10e45d0df2",
strip_prefix = "googletest-release-1.12.1",
urls = [
"https://mirror.bazel.build/github.com/google/googletest/archive/refs/tags/release-1.12.1.tar.gz",
"https://github.com/google/googletest/archive/refs/tags/release-1.12.1.tar.gz",
],
)

http_archive(
name = "bazelci_rules",
sha256 = "eca21884e6f66a88c358e580fd67a6b148d30ab57b1680f62a96c00f9bc6a07e",
strip_prefix = "bazelci_rules-1.0.0",
url = "https://github.com/bazelbuild/continuous-integration/releases/download/rules-1.0.0/bazelci_rules-1.0.0.tar.gz",
)
# Dev-only dependencies. USERS SHOULD NOT INSTALL THESE!
load(":dev_deps.bzl", "rules_proto_dev_deps")
rules_proto_dev_deps()

load("@bazelci_rules//:rbe_repo.bzl", "rbe_preconfig")

load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
protobuf_deps()


load("@bazelci_rules//:rbe_repo.bzl", "rbe_preconfig")
rbe_preconfig(
name = "buildkite_config",
toolchain = "ubuntu1804-bazel-java11",
Expand Down
44 changes: 44 additions & 0 deletions dev_deps.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
"""dev dependencies needed to develop rules_proto"""

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")


def rules_proto_dev_deps():
http_archive(
name = "rules_cc",
sha256 = "4aeb102efbcfad509857d7cb9c5456731e8ce566bfbf2960286a2ec236796cc3",
strip_prefix = "rules_cc-2f8c04c04462ab83c545ab14c0da68c3b4c96191",
comius marked this conversation as resolved.
Show resolved Hide resolved
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",
strip_prefix = "googletest-release-1.12.1",
urls = [
"https://mirror.bazel.build/github.com/google/googletest/archive/refs/tags/release-1.12.1.tar.gz",
"https://github.com/google/googletest/archive/refs/tags/release-1.12.1.tar.gz",
],
)

http_archive(
name = "bazelci_rules",
sha256 = "eca21884e6f66a88c358e580fd67a6b148d30ab57b1680f62a96c00f9bc6a07e",
strip_prefix = "bazelci_rules-1.0.0",
urls = [
"https://github.com/bazelbuild/continuous-integration/releases/download/rules-1.0.0/bazelci_rules-1.0.0.tar.gz",
],
)
comius marked this conversation as resolved.
Show resolved Hide resolved

http_archive(
thesayyn marked this conversation as resolved.
Show resolved Hide resolved
name = "com_google_protobuf",
sha256 = "75be42bd736f4df6d702a0e4e4d30de9ee40eac024c4b845d17ae4cc831fe4ae",
strip_prefix = "protobuf-21.7",
urls = [
"https://mirror.bazel.build/github.com/protocolbuffers/protobuf/archive/v21.7.tar.gz",
"https://github.com/protocolbuffers/protobuf/archive/v21.7.tar.gz",
],
)
3 changes: 0 additions & 3 deletions proto/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ bzl_library(
"repositories.bzl",
],
visibility = ["//visibility:public"],
deps = [
"//proto/private:dependencies",
],
)

# Toolchain type provided by proto_toolchain rule and used by proto_library
Expand Down
6 changes: 0 additions & 6 deletions proto/private/BUILD
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")

bzl_library(
name = "dependencies",
srcs = ["dependencies.bzl"],
visibility = ["//proto:__subpackages__"],
)

bzl_library(
name = "native",
srcs = ["native.bzl"],
Expand Down
18 changes: 0 additions & 18 deletions proto/private/BUILD.protoc

This file was deleted.

164 changes: 0 additions & 164 deletions proto/private/BUILD.release

This file was deleted.

Loading