Skip to content

Commit

Permalink
Fix missing starlark return value
Browse files Browse the repository at this point in the history
  • Loading branch information
pcj committed Jan 23, 2025
1 parent 7b60b7a commit 1304070
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/protoc/depsresolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ var (
ErrNoLabel = errors.New("no label")
)

const debug = true
const debug = false

type DepsResolver func(c *config.Config, ix *resolve.RuleIndex, r *rule.Rule, imports []string, from label.Label)

Expand Down
2 changes: 2 additions & 0 deletions pkg/protoc/starlark_plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ func (p *starlarkPlugin) Configure(ctx *PluginContext) *PluginConfiguration {
Out: out,
Options: options,
}
case starlark.NoneType:
return nil
default:
p.errorReporter("plugin %q configure returned invalid type: %T", p.name, value)
return nil
Expand Down
3 changes: 3 additions & 0 deletions rules/private/proto_repository_tools_srcs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ PROTO_REPOSITORY_TOOLS_SRCS = [
"@build_stack_rules_proto//pkg/plugin/grpcecosystem/grpcgateway:protoc-gen-grpc-gateway.go",
"@build_stack_rules_proto//pkg/plugin/scalapb/scalapb:BUILD.bazel",
"@build_stack_rules_proto//pkg/plugin/scalapb/scalapb:protoc_gen_scala.go",
"@build_stack_rules_proto//pkg/plugin/scalapb/zio_grpc:BUILD.bazel",
"@build_stack_rules_proto//pkg/plugin/scalapb/zio_grpc:protoc_gen_zio_grpc.go",
"@build_stack_rules_proto//pkg/plugin/stackb/grpc_js:BUILD.bazel",
"@build_stack_rules_proto//pkg/plugin/stackb/grpc_js:protoc-gen-grpc-js.go",
"@build_stack_rules_proto//pkg/plugin/stephenh/ts-proto:BUILD.bazel",
Expand Down Expand Up @@ -179,6 +181,7 @@ PROTO_REPOSITORY_TOOLS_SRCS = [
"@build_stack_rules_proto//plugin/grpc/grpc-node:BUILD.bazel",
"@build_stack_rules_proto//plugin/grpc/grpc-web:BUILD.bazel",
"@build_stack_rules_proto//plugin/scalapb/scalapb:BUILD.bazel",
"@build_stack_rules_proto//plugin/scalapb/zio-grpc:BUILD.bazel",
"@build_stack_rules_proto//plugin/stackb/grpc_js:BUILD.bazel",
"@build_stack_rules_proto//plugin/stephenh/ts-proto:BUILD.bazel",
"@build_stack_rules_proto//rules:BUILD.bazel",
Expand Down

0 comments on commit 1304070

Please sign in to comment.