Skip to content

Commit

Permalink
Hide --registry flags behind a config
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
avdv committed Nov 7, 2023
1 parent 853d140 commit d389551
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .bazelrc.bzlmod
Original file line number Diff line number Diff line change
Expand Up @@ -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

3 changes: 3 additions & 0 deletions .bazelrc.common
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/.bazelrc.bzlmod
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion rules_haskell_nix/.bazelrc.bzlmod
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion rules_haskell_tests/.bazelrc.bzlmod
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion tutorial/.bazelrc.bzlmod
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit d389551

Please sign in to comment.