build: Bump rules_go and protobuf to pick up Windows fixes#4556
build: Bump rules_go and protobuf to pick up Windows fixes#4556mattklein123 merged 9 commits intoenvoyproxy:masterfrom greenhouse-org:bump-deps-for-windows
Conversation
- Bump rules_go to 1.15.3 (latest). This picks up some fixes so that rules_go works on Windows. The api go tests don't appear to build with go1.11, so pin to go1.10.4 - Bump google/protobuf to fa252ec2, which picks up a fix for handling Windows path separators Signed-off-by: Sam Smith <sesmith177@gmail.com>
|
It looks like this commit bazel-contrib/rules_go@3a4db22 breaks |
This works around protoc-gen-go generating invalid go code Signed-off-by: Sam Smith <sesmith177@gmail.com>
|
It looks like the issue is with how newer versions of Specifically, it will generate a which will fail to compile. I've pushed a commit that works around this by renaming |
|
@sesmith177 would you like to review/merge as is (to get this off the books) and then do a late fixup when the strings proto issue is resolved? Or just wait until then? |
|
@htuch not sure I follow -- are you suggesting we review/merge with the renaming of |
|
@sesmith177 why does protoc-gen-go now do this? This seems broken. Technically I think the string(s) rename is safe as we don't change the package namespace; see https://github.com/envoyproxy/envoy/blob/master/api/STYLE.md for discusion of when it is (un)safe to rename. |
|
It looks like the change in behavior occurred when moving from protoc-gen-go v1.0.0 -> v1.1.0; we have not determined what caused the change. I agree that this behavior seems like a bug |
|
@sesmith177 thanks - if it's a reasonable bug to fix in protoc-gen-go, then let's do it there. Otherwise, we can probably merge this PR without breaking too much. |
|
@htuch we submitted a PR to One thing to note is that it is difficult to bump this dependency in Envoy, as it does not have any BUILD files -- they are generated by |
|
@sesmith177 can we also bump |
|
sure, we'll bump it to |
Signed-off-by: Sam Smith <sesmith177@gmail.com> Signed-off-by: Arjun Sreedharan <asreedharan@pivotal.io>
|
@sesmith177 I guess I was asking "Is there an ability to fix this upstream in rules_go so we don't need the giant patch?" |
- this lets us access the patch files for com_github_golang_protobuf directly Signed-off-by: Natalie Arellano <narellano@pivotal.io> Signed-off-by: Sam Smith <sesmith177@gmail.com>
|
@htuch it looks like if we bump rules_go forward past bazel-contrib/rules_go@fcfb5f5, we can reference their patch files directly without needing to carry our own |
htuch
left a comment
There was a problem hiding this comment.
Awesome, this is getting smaller all the time :)
ci/WORKSPACE.filter.example
Outdated
| load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains") | ||
| go_rules_dependencies() | ||
| go_register_toolchains() | ||
| go_register_toolchains(go_version = "1.10.4") |
There was a problem hiding this comment.
Do we need to modify WORKSPACE here, is there any way to hide this under a macro in envoy_build_system.bzl? The reason I ask this is that any change here can be chaotic to consumer of Envoy who have their own custom WORKSPACEs. Ideally we make version details as opaque as possible.
| _repository_impl( | ||
| name = "com_github_golang_protobuf", | ||
| patches = [ | ||
| "@io_bazel_rules_go//third_party:com_github_golang_protobuf-gazelle.patch", |
There was a problem hiding this comment.
Woohoo! Can you add a comment on why these are needed and when we can get rid of the patches?
Signed-off-by: Natalie Arellano <narellano@pivotal.io> Signed-off-by: Sam Smith <sesmith177@gmail.com>
|
@sesmith177 rad, ready to merge when CI completes. |
|
@sesmith177 @htuch hmm, i am getting these errors after this change (on Linux): It looks whereas we the minimum bazel version for envoy is 0.15.0, no? |
|
@rgs1 the minimum version for Envoy is the last point release, we move fast. You're going to have to bump. |
|
@htuch ah fair. yeah — moved to 0.17.2 and life is good again. this: https://github.com/envoyproxy/envoy/blob/master/ci/build_container/build_container_common.sh#L3 made me think 0.15.0 was being used... which i just realized refers to buildifier. Sorry for the confusion. |
…y#4556) - Bump rules_go to 1.15.3 (latest). This picks up some fixes so that rules_go works on Windows. The api go tests don't appear to build with go1.11, so pin to go1.10.4 - Bump google/protobuf to fa252ec2, which picks up a fix for handling Windows path separators Signed-off-by: Sam Smith <sesmith177@gmail.com> Signed-off-by: Aaltan Ahmad <aa@stripe.com>
|
@rgs1 that version number if only for |
Description:
1.15.3(latest). This picks up some fixes so thatrules_go works on Windows. The api go tests don't appear to build with
go1.11, so pin togo1.10.4google/protobuftofa252ec2, which picks up a fix for handlingWindows path separators
Risk Level:
Low
Testing:
Ran
bazel build //source/exe:envoy-static && bazel test //test/...andbazel test @envoy_api//test/... @envoy_api//tools/...Docs Changes:
n/a
Release Notes:
n/a