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
Grpc.Tools: Customize path to gRPC codegen plugin via Environment Variable #27099
Comments
FTR
|
@mleutner would you be open to creating a PR that adds the configuration point? |
Added PR #30411 Added environment variable |
Renamed the env variable to GRPC_PROTOC_PLUGIN |
yesterday I upgrade my project from net6 to net7 and getting this error when doing the command that gets error
the error shows
Is this due to the same reason? |
@cwhsu1984 This looks the same as #24188 - see that issue for workarounds The issue you've commented on here enables a workaround by letting you to set the GRPC_PROTOC_PLUGIN environment variable to point to your own protoc plugin that has been built to work on Alpine. Again - see #24188 |
I try belows but failed for the same reason, any suggestion? use script
use before_script
|
@cwhsu1984 Make sure you have Grpc.Tools version 2.50.0 or later |
@tonydnewell after doing what you told me, my unit tests work now, thanks! To sum up,
belows are modified script that works for me
|
I got the some error on M1 docker build. Also you write something like as:
|
Is your feature request related to a problem? Please describe.
Provide an environment variable to specify a custom path to gRPC plugin executable (gRPC_PluginFullPath) for csharp. While there is a environment variable and configuration capabilities for protoc (via export PROTOBUF_PROTOC=</path/to/protoc>, there is non comprehensive way for RPC_Plugin (e.g. /path/to/grpc_csharp_plugin).
This FR is related to the lack of linux-musl_x64 target support and the resulting issue #24188 "Grpc.Tools generation doesn't work in alpine".
Describe the solution you'd like
In _Grpc.Tools.targets provide configuration for a custom environment variable to specify a path to the grpc_csharp_plugin, see TODO(kkm).
Describe alternatives you've considered
An alternative would be to support and distribute linux-musl_x64 targets with Grpc.Tools
Additional context
Alpine is widely used and also one of the supported targets of Microsoft .NET
The text was updated successfully, but these errors were encountered: