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

Rules_docker is broken with release of 36 #3361

Closed
Cartman75 opened this issue Nov 24, 2022 · 2 comments
Closed

Rules_docker is broken with release of 36 #3361

Cartman75 opened this issue Nov 24, 2022 · 2 comments

Comments

@Cartman75
Copy link

Cartman75 commented Nov 24, 2022

What version of rules_go are you using?

0.36.0

What version of gazelle are you using?

Not Defined.

What version of Bazel are you using?

5.3.2

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

yes

What operating system and processor architecture are you using?

Debian bullseye

Any other potentially useful information about your toolchain?

What did you do?

What did you expect to see?

Rules_docker be able to compile images

What did you see instead?

Error:
ERROR:` Traceback (most recent call last):
File "/home/tradergt/.cache/bazel/_bazel_tradergt/5ec41db2c4e272bc949a06a673e6483b/external/bazel_gazelle/internal/go_repository_tools.bzl", line 15, column 52, in
load("@io_bazel_rules_go//go/private:common.bzl", "env_execute", "executable_extension")
Error: file '@io_bazel_rules_go//go/private:common.bzl' does not contain symbol 'env_execute'
ERROR: error loading package '': at /home/tradergt/.cache/bazel/_bazel_tradergt/5ec41db2c4e272bc949a06a673e6483b/external/io_bazel_rules_docker/repositories/deps.bzl:22:6: at /home/tradergt/.cache/bazel/_bazel_tradergt/5ec41db2c4e272bc949a06a673e6483b/external/io_bazel_rules_docker/repositories/go_repositories.bzl:22:6: at /home/tradergt/.cache/bazel/_bazel_tradergt/5ec41db2c4e272bc949a06a673e6483b/external/bazel_gazelle/deps.bzl:24:5: initialization of module 'internal/go_repository_tools.bzl' failed

It looks like env_execute was mistakenly thought of not being used:
#3276

@fmeum
Copy link
Member

fmeum commented Nov 24, 2022

@Cartman75 bazel-gazelle stopped using that rules_go-internal method in bazel-contrib/bazel-gazelle@3e83644#diff-c1403c382e16f440e9d5e59ebc70a6beb7f68f5ccefbcb5dd73e5cb9352e85a0, which is contained in the last five releases. rules_docker depends on a very old version of bazel-gazelle, so adding a more recent version of bazel-gazelle to your WORKSPACE explicitly (close to the top) should fix this issue.

@Cartman75
Copy link
Author

You are right, adding gazelle fixed. it. Thanks!

@fmeum fmeum closed this as completed Nov 24, 2022
HoloRin added a commit to rabbitmq/rabbitmq-server that referenced this issue Mar 21, 2024
rules_docker depends on an old gazelle, which depends on an old
rules_go, which is not bazel 7 compatible

bazel-contrib/rules_go#3361 (comment)

So we make the gazelle dependency explicit on a newer version
HoloRin added a commit to rabbitmq/rabbitmq-server that referenced this issue Mar 22, 2024
rules_docker depends on an old gazelle, which depends on an old
rules_go, which is not bazel 7 compatible

bazel-contrib/rules_go#3361 (comment)

So we make the gazelle dependency explicit on a newer version
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