Skip to content

Update skylib to fix gazelle #899

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

Merged
merged 1 commit into from
Jun 23, 2023
Merged

Conversation

alexbozhenko
Copy link
Contributor

Currently, running gazelle fails:

$ bazel run //:gazelle  -- -help
ERROR: Traceback (most recent call last):
        File "/home/alex/.cache/bazel/_bazel_alex/6ff60870017843370a59ce449c5a420a/external/bazel_gazelle/internal/BUILD.bazel", line 19, column 26, in <toplevel>
                gazelle_binary_test_suite()
        File "/home/alex/.cache/bazel/_bazel_alex/6ff60870017843370a59ce449c5a420a/external/bazel_gazelle/internal/gazelle_binary_test.bzl", line 27, column 19, in gazelle_binary_test_suite
                unittest.suite(
        File "/home/alex/.cache/bazel/_bazel_alex/6ff60870017843370a59ce449c5a420a/external/bazel_skylib/lib/unittest.bzl", line 269, column 18, in _suite
                test_rule(name = test_name)
Error: 'struct' object is not callable
ERROR: /home/alex/code/protoc-gen-validate/BUILD.bazel:9:8: every rule of type _gazelle_runner implicitly depends upon the target '@bazel_gazelle//internal:gazelle.bash.in', but this target could not be found because of: no such target '@bazel_gazelle//internal:gazelle.bash.in': target 'gazelle.bash.in' not declared in package 'internal' defined by /home/alex/.cache/bazel/_bazel_alex/6ff60870017843370a59ce449c5a420a/external/bazel_gazelle/internal/BUILD.bazel; however, a source file of this name exists.  (Perhaps add 'exports_files(["gazelle.bash.in"])' to internal/BUILD?)
ERROR: Analysis of target '//:gazelle' failed; build aborted: 
INFO: Elapsed time: 0.486s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (7 packages loaded, 142 targets configured)
ERROR: Build failed. Not running target

Similar issue is described here: bazel-contrib/rules_go#3532 (comment)

After the update it works:

$ bazel run //:gazelle  -- -help
...
Gazelle is a BUILD file generator for Go projects. It can create new BUILD files
...

Update skylib to the latest version.
Also, use releases URL (https://blog.bazel.build/2023/02/15/github-archive-checksum.html)

@CLAassistant
Copy link

CLAassistant commented Jun 22, 2023

CLA assistant check
All committers have signed the CLA.

@rodaine rodaine added the Bazel Bazel related issues label Jun 23, 2023
@rodaine rodaine merged commit 7e4a43c into bufbuild:main Jun 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bazel Bazel related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants