From bc3564ee69ab8c4b5f4fcc4fa33e987472f09e37 Mon Sep 17 00:00:00 2001 From: Doug Parker Date: Sun, 4 Aug 2024 18:03:37 -0700 Subject: [PATCH] Updates comment for `--incompatible_disable_native_repo_rules`. Tried to enable this and found one missing `load` statement in the external example. However this option appears to just be broken with `--enable_bzlmod` as it triggers an error in a non-existant `WORKSPACE` file, even if the actual `WORKSPACE` file is empty. I filed https://github.com/bazelbuild/bazel/issues/23206, as it appears to be a core Bazel bug. `--enable_bzlmod` breaks a bunch of things here and I haven't had time to properly look into it, so I think it's best to just leave `--incompatible_disable_native_repo_rules` off for now. --- examples/external/WORKSPACE.bazel | 1 + tools/bazelrc/incompatible.bazelrc | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/external/WORKSPACE.bazel b/examples/external/WORKSPACE.bazel index 1539eec6..f60648c2 100644 --- a/examples/external/WORKSPACE.bazel +++ b/examples/external/WORKSPACE.bazel @@ -1,6 +1,7 @@ workspace(name = "external") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") +load("@bazel_tools//tools/build_defs/repo:local.bzl", "local_repository") http_archive( name = "aspect_bazel_lib", diff --git a/tools/bazelrc/incompatible.bazelrc b/tools/bazelrc/incompatible.bazelrc index 54a8bb32..ce129f78 100644 --- a/tools/bazelrc/incompatible.bazelrc +++ b/tools/bazelrc/incompatible.bazelrc @@ -19,7 +19,8 @@ common --incompatible_check_testonly_for_output_files common --incompatible_default_to_explicit_init_py common --incompatible_disable_native_android_rules -# Breaks `@rules_prerender` `WORKSPACE` file. +# Breaks with `--noenable_bzlmod`. +# https://github.com/bazelbuild/bazel/issues/23206 # common --incompatible_disable_native_repo_rules common --incompatible_disable_non_executable_java_binary