Skip to content

Applying fixer for grpc_go_plugin plugin #146

@ash2k

Description

@ash2k

Description

I'm getting a lot of such messages with 4.0.0 and new go_validate_compile():

INFO: From Applying fixer for grpc_go_plugin plugin on target //internal/tool/prototool:proto_compile_validate:
Fixing missing plugin output file: internal/tool/prototool/prototool_grpc.pb.go
Warning: failed to find go package for templating go files, falling back to parent dir name
INFO: From Applying fixer for grpc_go_plugin plugin on target //pkg/agentcfg:proto_compile_validate:
Fixing missing plugin output file: pkg/agentcfg/agentcfg_grpc.pb.go
Warning: failed to find go package for templating go files, falling back to parent dir name
INFO: From Applying fixer for grpc_go_plugin plugin on target //internal/module/reverse_tunnel/info:proto_compile_validate:
Fixing missing plugin output file: internal/module/reverse_tunnel/info/info_grpc.pb.go
Warning: failed to find go package for templating go files, falling back to parent dir name
INFO: From Applying fixer for grpc_go_plugin plugin on target //internal/module/reverse_tunnel/tracker:proto_compile_validate:
Fixing missing plugin output file: internal/module/reverse_tunnel/tracker/tracker_grpc.pb.go
Warning: failed to find go package for templating go files, falling back to parent dir name
INFO: From Applying fixer for grpc_go_plugin plugin on target //internal/tool/grpctool:proto_compile_validate:
Fixing missing plugin output file: internal/tool/grpctool/grpctool_grpc.pb.go
Warning: failed to find go package for templating go files, falling back to parent dir name
INFO: From Applying fixer for grpc_go_plugin plugin on target //cmd/kas/kasapp:proto_compile_validate:
Fixing missing plugin output file: cmd/kas/kasapp/kasapp_grpc.pb.go
Warning: failed to find go package for templating go files, falling back to parent dir name
INFO: From Compiling protoc outputs for ruby_plugin plugin on target //pkg/ruby:configuration_project_grpc:
[libprotobuf WARNING ../../src/google/protobuf/compiler/ruby/ruby_generator.cc:517] Omitting proto2 dependency 'validate/validate.proto' from proto3 output file 'internal/module/configuration_project/rpc/rpc_pb.rb' because we don't support proto2 and no proto2 types from that file are being used.
INFO: From Applying fixer for grpc_go_plugin plugin on target //pkg/kascfg:proto_compile_validate:
Fixing missing plugin output file: pkg/kascfg/kascfg_grpc.pb.go
Warning: failed to find go package for templating go files, falling back to parent dir name

Looking at the sources in https://github.com/rules-proto-grpc/rules_proto_grpc/blob/master/go/go_validate_compile.bzl and https://github.com/rules-proto-grpc/rules_proto_grpc/blob/master/go/go_grpc_compile.bzl looks like they both include the gRPC plugin and validate includes all three plugins.

In my project I call each compile rule independently and explicitly, depending on which proto file I'm compiling. So, I didn't expect these rules to try to do this all for me :) Quite a few proto files in my project use the validator plugin but not gRPC and I think that explains why I'm getting those messages.

I'm not sure what to suggest here. I just expected each rule to do one thing only so that they can be composed (via macros) by the end user to do what is necessary. I'm not sure what to do with the existing approach - I was trying to get rid of my custom plugin definition for the validate plugin but looks like I cannot. I prefer to not have those warnings and to not do the compilation work multiple times.

Would it be possible to remove proto and grpc plugins from the validate rule definition? It's probably not too late as 4.0.0 has just been released and not many people use it (it's a breaking change).

Metadata

Metadata

Assignees

No one assigned

    Labels

    lang-goGo rules specific

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions