Skip to content

Commit 1e56b00

Browse files
committed
Merge remote-tracking branch 'origin/master' into stardoc
2 parents 3bcf945 + 5c7b2ab commit 1e56b00

239 files changed

Lines changed: 3881 additions & 755 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

BUILD.bazel

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("@bazel_gazelle//:def.bzl", "gazelle_binary")
1+
load("@bazel_gazelle//:def.bzl", "gazelle", "gazelle_binary")
22
load("@build_stack_rules_proto//rules:proto_gazelle.bzl", "proto_gazelle")
33
load("@npm_ts_proto//:defs.bzl", "npm_link_all_packages")
44

@@ -10,9 +10,16 @@ exports_files([
1010
# ----------------------------------------------------
1111
# Gazelle
1212
# ----------------------------------------------------
13-
# gazelle:prefix github.com/stackb/rules_proto
13+
# gazelle:prefix github.com/stackb/rules_proto/v4
1414
# gazelle:exclude vendor
1515
# gazelle:exclude node_modules
16+
# gazelle:go_generate_proto false
17+
18+
# ProTip: `bazel run //:gazelle` for go-only deps
19+
gazelle(
20+
name = "gazelle",
21+
external = "static",
22+
)
1623

1724
gazelle_binary(
1825
name = "gazelle-protobuf",
@@ -27,8 +34,9 @@ gazelle_binary(
2734
visibility = ["//visibility:public"],
2835
)
2936

37+
# ProTip: `bazel run //:proto_gazelle` for this extension
3038
proto_gazelle(
31-
name = "gazelle",
39+
name = "proto_gazelle",
3240
cfgs = ["//:rules_proto_config.yaml"],
3341
external = "static",
3442
gazelle = "//:gazelle-protobuf",

MODULE.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ bazel_dep(name = "rules_pkg", version = "1.1.0")
1919
bazel_dep(name = "rules_license", version = "1.0.0")
2020
bazel_dep(name = "rules_jvm_external", version = "6.8")
2121
bazel_dep(name = "rules_java", version = "8.15.1")
22-
bazel_dep(name = "rules_go", version = "0.57.0", repo_name = "io_bazel_rules_go")
22+
bazel_dep(name = "rules_go", version = "0.59.0", repo_name = "io_bazel_rules_go")
2323
bazel_dep(name = "rules_foreign_cc", version = "0.15.0") # specified to ensure more recent version than @grpc/@opencensus-cpp/@google_benchmark
2424
bazel_dep(name = "rules_cc", version = "0.2.0")
2525
bazel_dep(name = "protobuf", version = "32.0", repo_name = "com_google_protobuf")
2626
bazel_dep(name = "package_metadata", version = "0.0.5")
2727
bazel_dep(name = "grpc", version = "1.74.1", repo_name = "com_github_grpc_grpc")
2828
bazel_dep(name = "grpc-java", version = "1.71.0", repo_name = "io_grpc_grpc_java")
29-
bazel_dep(name = "gazelle", version = "0.45.0", repo_name = "bazel_gazelle")
29+
bazel_dep(name = "gazelle", version = "0.47.0", repo_name = "bazel_gazelle")
3030
bazel_dep(name = "bazel_skylib", version = "1.8.1")
3131
bazel_dep(name = "bazel_features", version = "1.35.0")
3232
bazel_dep(name = "aspect_rules_ts", version = "3.7.0")

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ tidy:
33
bazel run @go_sdk//:bin/go -- mod tidy
44
bazel run @go_sdk//:bin/go -- mod vendor
55
find vendor -name 'BUILD.bazel' | xargs rm
6-
bazel run //:gazelle
6+
bazel run //:proto_gazelle
77
bazel mod tidy
88

99
.PHONY: build

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# `rules_proto (v4)`
22

3-
![build-status](https://github.com/stackb/rules_proto/actions/workflows/ci.yaml/badge.svg)
3+
![build-status](https://github.com/stackb/rules_proto/v4/actions/workflows/ci.yaml/badge.svg)
44
[![Go Reference](https://pkg.go.dev/badge/github.com/stackb/rules_proto.svg)](https://pkg.go.dev/github.com/stackb/rules_proto)
55

66
Bazel starlark rules for building protocol buffers +/- gRPC :sparkles:.

cmd/examplegen/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ go_library(
88
"generator.go",
99
"template.go",
1010
],
11-
importpath = "github.com/stackb/rules_proto/cmd/examplegen",
11+
importpath = "github.com/stackb/rules_proto/v4/cmd/examplegen",
1212
visibility = ["//visibility:private"],
1313
)
1414

cmd/gazelle/BUILD.bazel

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,26 +23,26 @@ go_library(
2323
"profiler.go",
2424
"update-repos.go",
2525
],
26-
importpath = "github.com/stackb/rules_proto/cmd/gazelle",
26+
importpath = "github.com/stackb/rules_proto/v4/cmd/gazelle",
2727
visibility = ["//visibility:public"],
2828
deps = [
2929
"//cmd/gazelle/internal/wspace",
3030
"//language/proto_go_modules",
3131
"//language/protobuf",
3232
"//language/starlarkmodules",
33-
"@bazel_gazelle//config:go_default_library",
34-
"@bazel_gazelle//flag:go_default_library",
35-
"@bazel_gazelle//label:go_default_library",
36-
"@bazel_gazelle//language:go_default_library",
37-
"@bazel_gazelle//language/go:go_default_library",
38-
"@bazel_gazelle//language/proto:go_default_library",
39-
"@bazel_gazelle//merger:go_default_library",
40-
"@bazel_gazelle//repo:go_default_library",
41-
"@bazel_gazelle//resolve:go_default_library",
42-
"@bazel_gazelle//rule:go_default_library",
43-
"@bazel_gazelle//walk:go_default_library",
44-
"@com_github_bazelbuild_buildtools//build:go_default_library",
45-
"@com_github_pmezard_go_difflib//difflib:go_default_library",
33+
"@bazel_gazelle//config",
34+
"@bazel_gazelle//flag",
35+
"@bazel_gazelle//label",
36+
"@bazel_gazelle//language",
37+
"@bazel_gazelle//language/go",
38+
"@bazel_gazelle//language/proto",
39+
"@bazel_gazelle//merger",
40+
"@bazel_gazelle//repo",
41+
"@bazel_gazelle//resolve",
42+
"@bazel_gazelle//rule",
43+
"@bazel_gazelle//walk",
44+
"@com_github_bazelbuild_buildtools//build",
45+
"@com_github_pmezard_go_difflib//difflib",
4646
],
4747
)
4848

@@ -62,10 +62,10 @@ go_test(
6262
x_defs = {"goRootFile": "$(rlocationpath @go_sdk//:ROOT)"},
6363
deps = [
6464
"//cmd/gazelle/internal/wspace",
65-
"@bazel_gazelle//config:go_default_library",
66-
"@bazel_gazelle//testtools:go_default_library",
67-
"@com_github_google_go_cmp//cmp:go_default_library",
68-
"@io_bazel_rules_go//go/runfiles:go_default_library",
65+
"@bazel_gazelle//config",
66+
"@bazel_gazelle//testtools",
67+
"@com_github_google_go_cmp//cmp",
68+
"@io_bazel_rules_go//go/runfiles",
6969
],
7070
)
7171

cmd/gazelle/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ To upgrade gazelle, one must:
66

77
- Compare changes in the source repo@version to the files here. It's easiest to
88
just copy over each file and see where the diffs are. Make sure `langs.go`
9-
includes `github.com/stackb/rules_proto/language/protobuf`.
9+
includes `github.com/stackb/rules_proto/v4/language/protobuf`.
1010
- Since the `proto_gazelle.bzl` rule uses
1111
`@bazel_gazelle//internal:gazelle.bash.in`, changes there must remain
1212
compatible with proto_gazelle. Look at the diff there and make sure the

cmd/gazelle/fix-update.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import (
3939
"github.com/bazelbuild/bazel-gazelle/resolve"
4040
"github.com/bazelbuild/bazel-gazelle/rule"
4141
"github.com/bazelbuild/bazel-gazelle/walk"
42-
"github.com/stackb/rules_proto/cmd/gazelle/internal/wspace"
42+
"github.com/stackb/rules_proto/v4/cmd/gazelle/internal/wspace"
4343
)
4444

4545
// updateConfig holds configuration information needed to run the fix and

cmd/gazelle/integration_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import (
3131
"github.com/bazelbuild/bazel-gazelle/config"
3232
"github.com/bazelbuild/bazel-gazelle/testtools"
3333
"github.com/google/go-cmp/cmp"
34-
"github.com/stackb/rules_proto/cmd/gazelle/internal/wspace"
34+
"github.com/stackb/rules_proto/v4/cmd/gazelle/internal/wspace"
3535
)
3636

3737
// skipIfWorkspaceVisible skips the test if the WORKSPACE file for the

cmd/gazelle/internal/wspace/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
33
go_library(
44
name = "wspace",
55
srcs = ["finder.go"],
6-
importpath = "github.com/stackb/rules_proto/cmd/gazelle/internal/wspace",
6+
importpath = "github.com/stackb/rules_proto/v4/cmd/gazelle/internal/wspace",
77
visibility = ["//visibility:public"],
88
)
99

0 commit comments

Comments
 (0)