From d389551b35614508919e5dc33e8bce332e26e9a8 Mon Sep 17 00:00:00 2001 From: Claudio Bley Date: Tue, 7 Nov 2023 09:14:28 +0100 Subject: [PATCH] Hide `--registry` flags behind a config Renovate scans for registry URLs in .bazelrc files and tries to use all of them, but it does not support file: URLs and fails. However, it ignores any `--registry` values associated with a configuration. So introduce a `common` configuration which is always enabled, but causes renovate to skip the `--registry` values. --- .bazelrc.bzlmod | 3 ++- .bazelrc.common | 3 +++ examples/.bazelrc.bzlmod | 2 +- rules_haskell_nix/.bazelrc.bzlmod | 2 +- rules_haskell_tests/.bazelrc.bzlmod | 2 +- tutorial/.bazelrc.bzlmod | 2 +- 6 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.bazelrc.bzlmod b/.bazelrc.bzlmod index 28651a7d9..9759a35c6 100644 --- a/.bazelrc.bzlmod +++ b/.bazelrc.bzlmod @@ -3,4 +3,5 @@ common --noenable_bzlmod common:bzlmod --enable_bzlmod # Note, have to use /// to make Bazel not crash on Windows -common --registry=file:///%workspace%/registry --registry=https://bcr.bazel.build +common:common --registry=file:///%workspace%/registry --registry=https://bcr.bazel.build + diff --git a/.bazelrc.common b/.bazelrc.common index 5127fd6b1..5b70fa619 100644 --- a/.bazelrc.common +++ b/.bazelrc.common @@ -3,6 +3,9 @@ # Global Configuration # -------------------- +# enable common config by default (needed for renovate to ignore the file: registry) +common --config common + # Force TLS 1.2. With TLS 1.3, we run into the following error on Darwin. # > No subject alternative DNS name matching github-releases.githubusercontent.com found. # It looks like this is a result of SNI being broken on TLS 1.3 which results diff --git a/examples/.bazelrc.bzlmod b/examples/.bazelrc.bzlmod index 1f8164a85..e9e450bff 100644 --- a/examples/.bazelrc.bzlmod +++ b/examples/.bazelrc.bzlmod @@ -1,2 +1,2 @@ common:bzlmod --enable_bzlmod -common --registry=file://%workspace%/../registry --registry=https://bcr.bazel.build +common:common --registry=file://%workspace%/../registry --registry=https://bcr.bazel.build diff --git a/rules_haskell_nix/.bazelrc.bzlmod b/rules_haskell_nix/.bazelrc.bzlmod index 8b753074d..e04eb49e5 100644 --- a/rules_haskell_nix/.bazelrc.bzlmod +++ b/rules_haskell_nix/.bazelrc.bzlmod @@ -1,4 +1,4 @@ common:bzlmod --enable_bzlmod # Note, have to use /// to make Bazel not crash on Windows -common --registry=file:///%workspace%/../registry --registry=https://bcr.bazel.build +common:common --registry=file:///%workspace%/../registry --registry=https://bcr.bazel.build diff --git a/rules_haskell_tests/.bazelrc.bzlmod b/rules_haskell_tests/.bazelrc.bzlmod index bfe014b34..1f93e25d6 100644 --- a/rules_haskell_tests/.bazelrc.bzlmod +++ b/rules_haskell_tests/.bazelrc.bzlmod @@ -4,4 +4,4 @@ common --noenable_bzlmod common:bzlmod --enable_bzlmod # Note, have to use /// to make Bazel not crash on Windows -common --registry=file:///%workspace%/../registry --registry=https://bcr.bazel.build +common:common --registry=file:///%workspace%/../registry --registry=https://bcr.bazel.build diff --git a/tutorial/.bazelrc.bzlmod b/tutorial/.bazelrc.bzlmod index ec0ec767c..e9e450bff 100644 --- a/tutorial/.bazelrc.bzlmod +++ b/tutorial/.bazelrc.bzlmod @@ -1,2 +1,2 @@ common:bzlmod --enable_bzlmod -common --registry=file://%workspace%/../registry --registry=https://bcr.bazel.build \ No newline at end of file +common:common --registry=file://%workspace%/../registry --registry=https://bcr.bazel.build