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

wip: support bzlmod #377

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
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: 2 additions & 2 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ tasks:
default_workspace_ubuntu1804:
platform: ubuntu1804
build_targets:
- "@protoapis//..."
- "@protobufapis//..."
- "@googleapis//..."
test_targets:
- //example/...
Expand All @@ -23,7 +23,7 @@ tasks:
default_workspace_macos:
platform: macos
build_targets:
- "@protoapis//..."
- "@protobufapis//..."
- "@googleapis//..."
test_targets:
- //example/...
Expand Down
6 changes: 6 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
common --enable_bzlmod
common --@aspect_rules_ts//ts:skipLibCheck=always

build --@aspect_rules_ts//ts:default_to_tsc_transpiler
fetch --@aspect_rules_ts//ts:default_to_tsc_transpiler
query --@aspect_rules_ts//ts:default_to_tsc_transpiler

common --jvmopt=-Djava.security.manager=allow
build --java_language_version=17
Expand Down
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.4.0
7.2.1
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ __pycache__
docs/vendor
node_modules
vendor/**/BUILD.bazel
MODULE.bazel.lock
17 changes: 9 additions & 8 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
load("@//rules:proto_gazelle.bzl", "proto_gazelle")
load("@bazel_gazelle//:def.bzl", "gazelle", "gazelle_binary")
load("@com_github_bazelbuild_buildtools//buildifier:def.bzl", "buildifier")
load("@npm_ts_proto//:defs.bzl", "npm_link_all_packages")
load("@//rules:proto_gazelle.bzl", "proto_gazelle")

exports_files(["rules_proto_config.yaml"])

# ----------------------------------------------------
# Buildifier
# ----------------------------------------------------
buildifier(name = "buildifier")

# ----------------------------------------------------
# Gazelle
# ----------------------------------------------------
Expand Down Expand Up @@ -37,10 +31,17 @@ proto_gazelle(
gazelle = ":gazelle-protobuf",
imports = [
"@googleapis//:imports.csv",
"@protoapis//:imports.csv",
"@protobufapis//:imports.csv",
],
)

genrule(
name = "imports_csv",
outs = ["imports.csv"],
cmd = "cp $(location @protobufapis//:imports.csv) $@",
tools = ["@protobufapis//:imports.csv"],
)

gazelle(
name = "update_go_deps",
args = [
Expand Down
Loading
Loading