Skip to content

build(gazelle): Update Gazelle, to bring in bzlmod support #3060

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

Closed
wants to merge 5 commits into from

Conversation

shaldengeki
Copy link
Contributor

This upgrades the version of Gazelle to HEAD. I need this, because I'd like to write tests in #3057 against a setup using bzlmod, but our current version doesn't support that:

$ bazel test //...
FAIL: //python:python_test_directive_python_generate_proto_module_protobuf (Exit 1) (see /home/charles/.cache/bazel/_bazel_charles/25da5a3f5a375d8b77b073daf0c17156/execroot/_main/bazel-out/k8-fastbuild/testlogs/python/python_test_directive_python_generate_proto_module_protobuf/test.log)
INFO: From Testing //python:python_test_directive_python_generate_proto_module_protobuf:
==================== Test output for //python:python_test_directive_python_generate_proto_module_protobuf:
--- FAIL: TestGazelleBinary (0.00s)
    --- FAIL: TestGazelleBinary/directive_python_generate_proto_module_protobuf (0.01s)
        python_test.go:169: expected gazelle exit code: 0
            got: 1
        python_test.go:179: expected gazelle stderr: 
            got: gazelle: -repo_root not specified, and WORKSPACE cannot be found: file does not exist
        python_test.go:144: "" exists
        python_test.go:144: "/directive_python_generate_proto_module_protobuf" exists
        python_test.go:144: "/directive_python_generate_proto_module_protobuf/BUILD" exists
        python_test.go:144: "/directive_python_generate_proto_module_protobuf/MODULE.bazel" exists
        python_test.go:144: "/directive_python_generate_proto_module_protobuf/README.md" exists
        python_test.go:144: "/directive_python_generate_proto_module_protobuf/foo.proto" exists
        python_test.go:144: "/directive_python_generate_proto_module_protobuf/test.yaml" exists
FAIL

(note the MODULE.bazel in the above logs. That's the test I'm adding covering bzlmod support.)

With this change, the test works:

$ bazel test //...
# ...
Executed 70 out of 71 tests: 71 tests pass.

@shaldengeki
Copy link
Contributor Author

shaldengeki commented Jul 5, 2025

Hmm, well, this is a bummer. Looks like newer versions of Gazelle rely on go 1.20.x: https://buildkite.com/bazel/rules-python-python/builds/12038/steps/canvas?sid=0197dcca-d714-4faa-96ff-0d4a4df34557

So this requires a bump of that. Lemme see if that's not too painful - I'm hoping not.

@shaldengeki
Copy link
Contributor Author

Hmmmmmm.

https://buildkite.com/bazel/rules-python-python/builds/12039/steps/canvas?sid=0197dcd2-e4e8-4781-957c-78b99345b5b3

external\gazelle++go_deps+com_github_dougthor42_go_tree_sitter\iter.go:17:18: undefined: Node

iiiinteresting.

@shaldengeki
Copy link
Contributor Author

Ah, I guess @dougthor42 is already working on this here: #2962

@shaldengeki
Copy link
Contributor Author

Gonna close this while I figure out what to do in #3057.

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

Successfully merging this pull request may close these issues.

1 participant
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy