Issue Description
When using extra_protoc_args = ["--csharp_opt=base_namespace="],, the build fails.
I think that because the plugin expects the .cs file to be generated at the root of the staging folder, but base_namespace puts it into a folder hierarchy.
Log Output
BUILD.bazel:23:21: output '_rpg_premerge_csharp_proto/Test.cs' was not created
BUILD.bazel:23:21: Compiling protoc outputs for csharp_plugin plugin on target @//:csharp_proto failed: not all outputs were created or valid
rules_proto_grpc Version
4.4.0
Bazel Version
6.3.2
OS
Mac OS
Link to Demo Repo
No response
WORKSPACE Content
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
########################################
### rules_proto
########################################
http_archive(
name = "rules_proto",
sha256 = "dc3fb206a2cb3441b485eb1e423165b231235a1ea9b031b4433cf7bc1fa460dd",
strip_prefix = "rules_proto-5.3.0-21.7",
urls = [
"https://github.com/bazelbuild/rules_proto/archive/refs/tags/5.3.0-21.7.tar.gz",
],
)
load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")
rules_proto_dependencies()
rules_proto_toolchains()
########################################
### rules_proto_grpc
########################################
http_archive(
name = "rules_proto_grpc",
sha256 = "928e4205f701b7798ce32f3d2171c1918b363e9a600390a25c876f075f1efc0a",
strip_prefix = "rules_proto_grpc-4.4.0",
urls = ["https://github.com/rules-proto-grpc/rules_proto_grpc/releases/download/4.4.0/rules_proto_grpc-4.4.0.tar.gz"],
)
load("@rules_proto_grpc//:repositories.bzl", "rules_proto_grpc_toolchains", "rules_proto_grpc_repos")
rules_proto_grpc_toolchains()
rules_proto_grpc_repos()
load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")
rules_proto_dependencies()
rules_proto_toolchains()
########################################
### rules_proto_grpc/csharp
########################################
load("@rules_proto_grpc//csharp:repositories.bzl", rules_proto_grpc_csharp_repos = "csharp_repos")
rules_proto_grpc_csharp_repos()
load("@io_bazel_rules_dotnet//dotnet:deps.bzl", "dotnet_repositories")
load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps")
grpc_deps()
dotnet_repositories()
load(
"@io_bazel_rules_dotnet//dotnet:defs.bzl",
"dotnet_register_toolchains",
"dotnet_repositories_nugets",
)
dotnet_register_toolchains()
dotnet_repositories_nugets()
load("@rules_proto_grpc//csharp/nuget:nuget.bzl", "nuget_rules_proto_grpc_packages")
nuget_rules_proto_grpc_packages()
BUILD Content
load(
"@rules_proto//proto:defs.bzl",
"proto_library",
)
load(
"@rules_proto_grpc//csharp:defs.bzl",
"csharp_proto_compile",
)
proto_library(
name = "protos",
visibility = ["//visibility:public"],
srcs = [":test.proto"],
)
csharp_proto_compile(
name = "csharp_proto",
visibility = ["//visibility:public"],
extra_protoc_args = ["--csharp_opt=base_namespace="],
protos = [
":protos",
],
)
Proto Content
syntax = "proto3";
package com.saiimons;
message Test {
optional string foo = 1;
optional bool bar = 2;
}
service TestApi {
rpc echo (Test) returns (Test);
}
Any Other Content
No response
Issue Description
When using
extra_protoc_args = ["--csharp_opt=base_namespace="],, the build fails.I think that because the plugin expects the
.csfile to be generated at the root of the staging folder, butbase_namespaceputs it into a folder hierarchy.Log Output
rules_proto_grpc Version
4.4.0
Bazel Version
6.3.2
OS
Mac OS
Link to Demo Repo
No response
WORKSPACE Content
BUILD Content
Proto Content
Any Other Content
No response