Skip to content
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

[bazel] Add default shell env to gen_well_known_protos_java #7758

Merged
merged 1 commit into from
Aug 20, 2020

Conversation

adamyi
Copy link
Contributor

@adamyi adamyi commented Jul 29, 2020

We may need the shell environment (potentially augmented with
--action_env) to invoke protoc on Windows. If protoc was built with
mingw, it probably needs .dll files in non-default locations that must be
in PATH. Previously with --compiler=mingw-gcc,
bazel build //:gen_well_known_protos_java would fail on Windows. This
CL fixes the issue.

Also we have default_shell_env set to True for ProtoCompile, this makes
the behavior consistent.

See #2933, and
https://github.com/bazelbuild/rules_go/blob/585a27ad0ab5bdd185aa3bd5b0877a778d4777ad/proto/compiler.bzl#L130

We may need the shell environment (potentially augmented with
`--action_env`) to invoke protoc on Windows. If protoc was built with
mingw, it probably needs .dll files in non-default locations that must be
in PATH. Previously with `--compiler=mingw-gcc`,
`bazel build //:gen_well_known_protos_java` would fail on Windows. This
CL fixes the issue.

Also we have `default_shell_env` set to True for `ProtoCompile`, this makes
the behavior consistent.

See protocolbuffers#2933, and
https://github.com/bazelbuild/rules_go/blob/585a27ad0ab5bdd185aa3bd5b0877a778d4777ad/proto/compiler.bzl#L130
@acozzette acozzette merged commit 88f3ef7 into protocolbuffers:master Aug 20, 2020
@acozzette
Copy link
Member

Thanks, @adamyi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants