Skip to content

[Bazel CI] ERROR: The buildifier_prebuilt module's internal code is not compatible with the new "Strict Export" rule of Bazel 2026/v8.0+ #671

@deepalak56

Description

@deepalak56

CI: https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/5296#019c88b0-afb8-4cc7-b6ea-818831123ba5

Platform: Ubuntu, MacOs, Windows

Logs:

(04:10:08) ERROR: /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/e39f370102c57c6df99fa66a2e5b1446/external/buildifier_prebuilt++buildifier_prebuilt_deps_extension+buildifier_prebuilt_toolchains/BUILD.bazel:18:18: in prebuilt_toolchain rule @@buildifier_prebuilt++buildifier_prebuilt_deps_extension+buildifier_prebuilt_toolchains//:buildifier_linux_amd64: Visibility error:
--
target '@@buildifier_prebuilt++buildifier_prebuilt_deps_extension+buildifier_linux_amd64//file:buildifier' is not visible from
target '@@buildifier_prebuilt++buildifier_prebuilt_deps_extension+buildifier_prebuilt_toolchains//:buildifier_linux_amd64'
Recommendation: modify the visibility declaration if you think the dependency is legitimate. For more info see https://bazel.build/concepts/visibility. To set the visibility of that source file target, use the exports_files() function
(04:10:08) ERROR: /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/e39f370102c57c6df99fa66a2e5b1446/external/buildifier_prebuilt++buildifier_prebuilt_deps_extension+buildifier_prebuilt_toolchains/BUILD.bazel:18:18: Analysis of target '@@buildifier_prebuilt++buildifier_prebuilt_deps_extension+buildifier_prebuilt_toolchains//:buildifier_linux_amd64' (config: cfa90bf) failed
(04:10:08) ERROR: Analysis of target '//:buildifier' failed; build aborted: Analysis failed
(04:10:08) INFO: Elapsed time: 2.463s, Critical Path: 0.03s
(04:10:08) INFO: 1 process: 1 internal.
(04:10:08) ERROR: Build did NOT complete successfully
(04:10:08) FAILED:
Fetching repository @@rules_cc++cc_configure_extension+local_config_cc; starting
Fetching repository @@catch2+; starting
bazel build failed with exit code 1
🚨 Error: The command exited with status 1

Culprit:

Steps:

git clone -v https://github.com/bazelbuild/examples.git
git reset daadf13 --hard
export USE_BAZEL_VERSION=acfecad0b7ce464c8a15c0b4f72f6c3faef40e6d
bazel --output_user_root=C:/b build --config=remote --project_id=bazel-untrusted --lockfile_mode=off -- ...

CC Greenteam @Wyverald

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