Skip to content

Broken on Bazel 9.0.1 with current rules_go version (0.42.0) #132

Closed

Description

@Silic0nS0ldier

A breaking change in Bazel v9 was the removal of symbols like CcInfo (--incompatible_autoload_externally is now set to an empty string).

A bug in 9.0.0 (caught in rc2 bazelbuild/bazel#27684) meant that some existing usages of these relocated symbols will surface as a different problem, or in the case of my transitive usage of rules_buf (via aspect_rules_lint) not be surfaced at all.

This gap was fixed in bazelbuild/bazel#28360, meaning rules_buf is broken in Bazel 9.0.1+.

Example: https://github.com/Silic0nS0ldier/vscode-git-monolithic-extension/actions/runs/23053667179/job/66961106184?pr=514#step:4:20

...
ERROR: /home/runner/.bazel/external/rules_go+/go/private/rules/cgo.bzl:191:22: ␊
    The CcInfo symbol has been removed, add the following to your BUILD/bzl file:

load("@rules_cc//cc/common:cc_info.bzl", "CcInfo")
...
ERROR: /home/runner/work/vscode-git-monolithic-extension/vscode-git-monolithic-extension/extension/vsix/BUILD.bazel:15:15: ␊
    While resolving toolchains for target //extension/vsix:copy_bundle_chunks (5c99fb7): ␊
    invalid registered toolchain '@go_toolchains//:all': ␊
    while parsing '@go_toolchains//:all': ␊
    error loading package '@@rules_go++go_sdk+go_toolchains//': ␊
    at /home/runner/.bazel/external/rules_go+/go/private/go_toolchain.bzl:20:6: ␊
    at /home/runner/.bazel/external/rules_go+/go/private/actions/archive.bzl:34:5: ␊
    compilation of module 'go/private/rules/cgo.bzl' failed
ERROR: Analysis of target '//extension/vsix:git_monolithic' failed; build aborted: Analysis failed

For those affected, this can be worked around by adding the following to MODULE.bazel.

bazel_dep(name = "rules_go", version = "0.60.0")

e.g. Silic0nS0ldier/vscode-git-monolithic-extension@41d9ee8

Activity

  1. added a commit that references this issue on Apr 27, 2026
    5927657
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions