rules-proto-grpc / rules_proto_grpc

Bazel rules for building Protobuf and gRPC code and libraries from proto_library targets
https://rules-proto-grpc.com
Apache License 2.0
249 stars 156 forks source link

Removing dependency on Bash on Windows platform #314

Open AlexanderGolovlev opened 3 months ago

AlexanderGolovlev commented 3 months ago

Allows building the rules on Windows platform not using Bash shell.

stakira commented 3 months ago

I support this fix. The bash issue is not only an extra step in setup, but can also cause dramatic confusions.

With WSL installed, the default bash.exe available is an entrance to WSL. Various proto library/compile rules will fail with very confusing message ''You seem to have passed an empty string as one of the arguments to protoc.exe. This is actually sort of hard to do. Congrats. Unfortunately it is not valid input so the program is going to die now." (see #308) The WSL bash.exe is located at at C:\Windows\System32\, which is a path unreasonable to remove from PATH. The status quo is rather awkward and needs a fix.

aaliddell commented 2 months ago

It looks like one of the test workspaces (special_characters) is repeatably failing under Windows with this change: https://buildkite.com/bazel/rules-proto-grpc-rules-proto-grpc/builds/2561#019003a6-0288-423a-8804-49253e72a823

Is there some escaping that is missing in passing the paths under the new code path?