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

gazelle requires unbuildable version of golang.org/x/oauth2 #1516

Open
jmhodges opened this issue Apr 28, 2023 · 2 comments
Open

gazelle requires unbuildable version of golang.org/x/oauth2 #1516

jmhodges opened this issue Apr 28, 2023 · 2 comments

Comments

@jmhodges
Copy link
Contributor

What version of gazelle are you using?

v0.30.0

What version of rules_go are you using?

v0.39.1

What version of Bazel are you using?

Build label: 6.1.2
Build target: bazel-out/darwin_arm64-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Tue Apr 18 15:31:54 2023 (1681831914)
Build timestamp: 1681831914
Build timestamp as int: 1681831914

Does this issue reproduce with the latest releases of all the above?

Yes

What operating system and processor architecture are you using?

macOS 13.3..1

What did you do?

Set up a new rules_go and gazelle project and run bazel build @org_golang_x_oauth2//:oauth2

You can see a reproduction by checking out the branch go-oauth2-empty from jmhodges/bazel_bugs/ (Link to that branch in GitHub), and running bazel build @org_golang_x_oauth2//:oauth2

What did you expect to see?

A successful compile

What did you see instead?

$   bazel build @org_golang_x_oauth2//:oauth2
INFO: Analyzed target @org_golang_x_oauth2//:oauth2 (52 packages loaded, 9333 targets configured).
INFO: Found 1 target...
ERROR: /private/var/tmp/_bazel_jmhodges/eb16c8c3f4af4addfaf08c38f6204969/external/org_golang_x_oauth2/internal/BUILD.bazel:3:11: GoCompilePkg external/org_golang_x_oauth2/internal/internal.a failed: (Exit 1): builder failed: error executing command (from target @org_golang_x_oauth2//internal:internal) bazel-out/darwin_arm64-opt-exec-2B5CBBC6/bin/external/go_sdk/builder_reset/builder compilepkg -sdk external/go_sdk -installsuffix darwin_arm64 -src external/org_golang_x_oauth2/internal/doc.go -src ... (remaining 27 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
compilepkg: missing strict dependencies:
	/private/var/tmp/_bazel_jmhodges/eb16c8c3f4af4addfaf08c38f6204969/sandbox/darwin-sandbox/21/execroot/com_github_jmhodges_bazel_bugs/external/org_golang_x_oauth2/internal/token.go: import of "golang.org/x/net/context"
	/private/var/tmp/_bazel_jmhodges/eb16c8c3f4af4addfaf08c38f6204969/sandbox/darwin-sandbox/21/execroot/com_github_jmhodges_bazel_bugs/external/org_golang_x_oauth2/internal/token.go: import of "golang.org/x/net/context/ctxhttp"
	/private/var/tmp/_bazel_jmhodges/eb16c8c3f4af4addfaf08c38f6204969/sandbox/darwin-sandbox/21/execroot/com_github_jmhodges_bazel_bugs/external/org_golang_x_oauth2/internal/transport.go: import of "golang.org/x/net/context"
No dependencies were provided.
Check that imports in Go sources match importpath attributes in deps.
Target @org_golang_x_oauth2//:oauth2 failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 15.677s, Critical Path: 14.13s
INFO: 9 processes: 6 internal, 3 darwin-sandbox.
FAILED: Build did NOT complete successfully
@jmhodges
Copy link
Contributor Author

jmhodges commented Apr 28, 2023

It doesn't seem that anything in gazelle is actually using golang.org/x/oauth2? I did a search on GitHub (and local grep) and couldn't find any.

Maybe it can just be dropped?

(Also, the version of oauth2 is very old.)

@sfc-gh-ptabor
Copy link
Contributor

I updated the version of oauth2 in #1582

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

No branches or pull requests

2 participants