Skip to content

Commit

Permalink
try-import .bazelrc.* files everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
prednaz committed Feb 22, 2024
1 parent d63bfde commit 524dba4
Show file tree
Hide file tree
Showing 18 changed files with 81 additions and 23 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ jobs:
build --config=$BUILD_CONFIG
common --enable_bzlmod=${{ matrix.bzlmod }}
EOF
cp .bazelrc.local rules_haskell_nix
cp .bazelrc.local rules_haskell_tests
- name: Build & test - rules_haskell
if: matrix.module == 'rules_haskell'
uses: tweag/run-nix-shell@v0
Expand Down Expand Up @@ -208,7 +206,6 @@ jobs:
$bzlmod_cache_silo_key
common --enable_bzlmod=${{ matrix.bzlmod }}
EOF
cp .bazelrc.local rules_haskell_tests
- name: Build & test - rules_haskell
if: matrix.module == 'rules_haskell'
shell: bash
Expand Down
1 change: 0 additions & 1 deletion examples/.bazelrc

This file was deleted.

10 changes: 10 additions & 0 deletions examples/.bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import %workspace%/../.bazelrc.common
import %workspace%/../.bazelrc.bzlmod

# Remote Cache Authentication
# ---------------------------
try-import %workspace%/../.bazelrc.auth

# User Configuration
# ------------------
try-import %workspace%/../.bazelrc.local
7 changes: 6 additions & 1 deletion examples/.bazelrc.bzlmod
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
# Disable bzlmod explicitly by default, see https://github.com/tweag/rules_haskell/issues/1977
common --noenable_bzlmod

common:bzlmod --enable_bzlmod
common:common --registry=file://%workspace%/../registry --registry=https://bcr.bazel.build
# Note, have to use /// to make Bazel not crash on Windows
common:common --registry=file:///%workspace%/../registry --registry=https://bcr.bazel.build

1 change: 0 additions & 1 deletion examples/.bazelrc.common

This file was deleted.

1 change: 0 additions & 1 deletion examples/.bazelrc.local

This file was deleted.

1 change: 0 additions & 1 deletion examples/arm/.bazelrc

This file was deleted.

10 changes: 10 additions & 0 deletions examples/arm/.bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import %workspace%/../../.bazelrc.common
import %workspace%/../../.bazelrc.bzlmod

# Remote Cache Authentication
# ---------------------------
try-import %workspace%/../../.bazelrc.auth

# User Configuration
# ------------------
try-import %workspace%/../../.bazelrc.local
9 changes: 7 additions & 2 deletions examples/arm/.bazelrc.bzlmod
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
common:bzlmod --experimental_enable_bzlmod
common:bzlmod --registry=file://%workspace%/../../registry --registry=https://bcr.bazel.build
# Disable bzlmod explicitly by default, see https://github.com/tweag/rules_haskell/issues/1977
common --noenable_bzlmod

common:bzlmod --enable_bzlmod
# Note, have to use /// to make Bazel not crash on Windows
common:common --registry=file:///%workspace%/../../registry --registry=https://bcr.bazel.build

1 change: 0 additions & 1 deletion examples/arm/.bazelrc.common

This file was deleted.

8 changes: 6 additions & 2 deletions rules_haskell_nix/.bazelrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import %workspace%/../.bazelrc.common
import %workspace%/.bazelrc.bzlmod
import %workspace%/../.bazelrc.bzlmod

# Remote Cache Authentication
# ---------------------------
try-import %workspace%/../.bazelrc.auth

# User Configuration
# ------------------
try-import %workspace%/.bazelrc.local
try-import %workspace%/../.bazelrc.local
5 changes: 4 additions & 1 deletion rules_haskell_nix/.bazelrc.bzlmod
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
common:bzlmod --enable_bzlmod
# Disable bzlmod explicitly by default, see https://github.com/tweag/rules_haskell/issues/1977
common --noenable_bzlmod

common:bzlmod --enable_bzlmod
# Note, have to use /// to make Bazel not crash on Windows
common:common --registry=file:///%workspace%/../registry --registry=https://bcr.bazel.build

8 changes: 6 additions & 2 deletions rules_haskell_tests/.bazelrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import %workspace%/../.bazelrc.common
import %workspace%/.bazelrc.bzlmod
import %workspace%/../.bazelrc.bzlmod

# Remote Cache Authentication
# ---------------------------
try-import %workspace%/../.bazelrc.auth

# User Configuration
# ------------------
try-import %workspace%/.bazelrc.local
try-import %workspace%/../.bazelrc.local
2 changes: 1 addition & 1 deletion rules_haskell_tests/.bazelrc.bzlmod
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
common --noenable_bzlmod

common:bzlmod --enable_bzlmod

# Note, have to use /// to make Bazel not crash on Windows
common:common --registry=file:///%workspace%/../registry --registry=https://bcr.bazel.build

Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
import %workspace%/../../../../.bazelrc.common
import %workspace%/.bazelrc.bzlmod

# Remote Cache Authentication
# ---------------------------
try-import %workspace%/../../../../.bazelrc.auth

# User Configuration
# ------------------
try-import %workspace%/../../../../.bazelrc.local
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
common:bzlmod --experimental_enable_bzlmod
common:bzlmod --registry=file:%workspace%/../../../../registry --registry=https://bcr.bazel.build
# Disable bzlmod explicitly by default, see https://github.com/tweag/rules_haskell/issues/1977
common --noenable_bzlmod

common:bzlmod --enable_bzlmod
# Note, have to use /// to make Bazel not crash on Windows
common:common --registry=file:///%workspace%/../../../../registry --registry=https://bcr.bazel.build

1 change: 0 additions & 1 deletion tutorial/.bazelrc

This file was deleted.

10 changes: 10 additions & 0 deletions tutorial/.bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import %workspace%/../.bazelrc.common
import %workspace%/../.bazelrc.bzlmod

# Remote Cache Authentication
# ---------------------------
try-import %workspace%/../.bazelrc.auth

# User Configuration
# ------------------
try-import %workspace%/../.bazelrc.local
7 changes: 6 additions & 1 deletion tutorial/.bazelrc.bzlmod
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
# Disable bzlmod explicitly by default, see https://github.com/tweag/rules_haskell/issues/1977
common --noenable_bzlmod

common:bzlmod --enable_bzlmod
common:common --registry=file://%workspace%/../registry --registry=https://bcr.bazel.build
# Note, have to use /// to make Bazel not crash on Windows
common:common --registry=file:///%workspace%/../registry --registry=https://bcr.bazel.build

1 change: 0 additions & 1 deletion tutorial/.bazelrc.common

This file was deleted.

1 change: 0 additions & 1 deletion tutorial/.bazelrc.local

This file was deleted.

0 comments on commit 524dba4

Please sign in to comment.