-
Notifications
You must be signed in to change notification settings - Fork 391
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
Using wrong golang/x/net
version
#1021
Comments
golang/x/net
version
The line you pointed to only applies to Gazelle running in its own repository, so I don't think that's the issue. This looks like a problem with dependencies in If that's not it, please post a minimal reproducible example. |
Hi @jayconrod. Thank you for your answer. After reading your answer and article, I moved the declaration of But until v0.22.3 this change wasn't needed. I don't know why. I searched in my repo and there are no other declarations of Here are the changes I've made. diff --git a/WORKSPACE b/WORKSPACE
index 5939b74..09dab36 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -33,10 +33,10 @@ http_archive(
http_archive(
name = "bazel_gazelle",
- sha256 = "222e49f034ca7a1d1231422cdb67066b885819885c356673cb1f72f748a3c9d4",
+ sha256 = "62ca106be173579c0a167deb23358fdfe71ffa1e4cfdddf5582af26520f1c66f",
urls = [
- "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.22.3/bazel-gazelle-v0.22.3.tar.gz",
- "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.22.3/bazel-gazelle-v0.22.3.tar.gz",
+ "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.23.0/bazel-gazelle-v0.23.0.tar.gz",
+ "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.23.0/bazel-gazelle-v0.23.0.tar.gz",
],
)
@@ -50,6 +50,13 @@ load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository")
gazelle_dependencies()
+go_repository(
+ name = "org_golang_x_net",
+ importpath = "golang.org/x/net",
+ sum = "h1:uwuIcX0g4Yl1NC5XAz37xsr2lTtcqevgzYNVt49waME=",
+ version = "v0.0.0-20201110031124-69a78807bb2b",
+)
+
go_repository(
name = "com_github_azure_go_autorest_autorest",
importpath = "github.com/Azure/go-autorest/autorest",
@@ -1999,13 +2006,6 @@ go_repository(
version = "v0.0.0-20210220033148-5ea612d1eb83",
)
-go_repository(
- name = "org_golang_x_net",
- importpath = "golang.org/x/net",
- sum = "h1:uwuIcX0g4Yl1NC5XAz37xsr2lTtcqevgzYNVt49waME=",
- version = "v0.0.0-20201110031124-69a78807bb2b",
-)
-
go_repository(
name = "org_golang_x_sync",
importpath = "golang.org/x/sync",
Thank you for your help. |
What version of gazelle are you using?
v0.23.0
What version of rules_go are you using?
v0.27.0
What version of Bazel are you using?
Does this issue reproduce with the latest releases of all the above?
Yes
What operating system and processor architecture are you using?
Linux x86_64
What did you do?
When using v0.23.0 with
k8s.io/client-go
I see the following error:It looks like, for some reason, it's using the wrong
golang/x/net
when building, even I'm forcing the version like this:My guess is something related to this commit?
5d15f00#diff-5493ff8e9397811510e780de47c57abb70137f1afe85d1519130dc3679d60ce5R43
My workaround, for now, is using v0.22.3 but I started to use
embed
in my projects and I want to use it with gazelle/rules_go.What did you expect to see?
Compile successfully.
What did you see instead?
Compile failing.
The text was updated successfully, but these errors were encountered: