Skip to content

Commit

Permalink
Bazel bzlmod support for grpc-web. (grpc#1456)
Browse files Browse the repository at this point in the history
* Bazel bzlmod support for grpc-web.

Updates the bazel-based build of grpc-web to use bzlmod.

The WORKSPACE file is retained for now, but it should probably be deleted since
it should be unused.

* Delete WORKSPACE files.

* bazel mod tidy

* MODULE.bazel fixups

* Update version to 1.6.0.rc1 in MODULE.bazel

* Update module and dockerfile in response to pr comments about build failure and protobuf version

* Fix lint issue with MODULE.bazel
  • Loading branch information
gonzojive authored Aug 27, 2024
1 parent 8ba8fbe commit 9856bfe
Show file tree
Hide file tree
Showing 5 changed files with 8,927 additions and 41 deletions.
13 changes: 13 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1 +1,14 @@
build --copt=-Wno-error=deprecated-declarations --host_copt=-Wno-error=deprecated-declarations

# Required until this is the default; expected in Bazel 7
common --enable_bzlmod

# Load any settings specific to the current user.
# .bazelrc.user should appear in .gitignore so that settings are not shared with team members
# This needs to be last statement in this
# config, as the user configuration should be able to overwrite flags from this file.
# See https://docs.bazel.build/versions/master/best-practices.html#bazelrc
# (Note that we use .bazelrc.user so the file appears next to .bazelrc in directory listing,
# rather than user.bazelrc as suggested in the Bazel docs)
try-import %workspace%/.bazelrc.user

24 changes: 24 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
"""
A bazel module for the grpc-web project.
Visit https://grpc.io/ and https://github.com/grpc/grpc-web for
more information about the project.
"""

module(
name = "grpc-web",
version = "1.6.0",
compatibility_level = 1,
repo_name = "com_github_grpc_grpc_web",
)

bazel_dep(name = "protobuf", version = "27.1", repo_name = "com_google_protobuf")
bazel_dep(name = "grpc", version = "1.65.0", repo_name = "com_github_grpc_grpc")
bazel_dep(name = "rules_cc", version = "0.0.2")
bazel_dep(name = "rules_proto", version = "6.0.2")

# Needed to resolve https://github.com/bazelbuild/bazel-central-registry/issues/2538.
single_version_override(
module_name = "grpc-java",
version = "1.64.0",
)
Loading

0 comments on commit 9856bfe

Please sign in to comment.