Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency bazel to v7 - abandoned #2166

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .bazelrc.common
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ startup --host_jvm_args=-Djdk.tls.client.protocols=TLSv1.2
common --incompatible_require_linker_input_cc_api
common --incompatible_disallow_empty_glob=true

# explicitly disable sandboxing exclusive tests (it was false in Bazel 6, but is true in Bazel 7+)
# (otherise this causes some integration tests to fail)
common --noincompatible_exclusive_test_sandboxed

# test environment does not propagate locales by default some tests reads files
# written in UTF8, we need to propagate the correct environment variables, such
# as LOCALE_ARCHIVE We also need to setup an utf8 locale
Expand Down
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.5.0
7.1.0
10 changes: 3 additions & 7 deletions rules_haskell_tests/.ghcide
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
#!/usr/bin/env bash
set -euo pipefail
build_ghcide() {
bazel build //tests/ghcide \
--experimental_show_artifacts \
2>&1 \
| awk '
/^>>>/ { print substr($1, 4); next }
{ print $0 > "/dev/stderr" }
'
bazel build //tests/ghcide
outfile=$( bazel cquery --output=files //tests/ghcide )
echo "$( bazel info execution_root)/${outfile}"
}
ghcide="$(build_ghcide)"
"$ghcide" "$@"
2 changes: 1 addition & 1 deletion rules_haskell_tests/shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ mkShell {
file
] ++ lib.optionals docTools [ graphviz python3Packages.sphinx zip unzip ];

packages = [ bazel_6 ];
packages = [ bazel_7 ];

shellHook = ''
# Add nix config flags to .bazelrc.local.
Expand Down
4 changes: 4 additions & 0 deletions rules_haskell_tests/tests/ghcWithPackages_2097/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ load("//tests/integration_testing:rules_haskell_integration_test.bzl", "rules_ha
rules_haskell_integration_test(
name = "ghc_with_packages_test",
srcs = ["Test.hs"],
env = {
"BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN": "1",
},
tags = ["requires_nix"],
workspace_path = "test",
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ def rules_haskell_integration_test(
workspace_path,
srcs,
deps = [],
env = {},
bindist_bazel_versions = SUPPORTED_BAZEL_VERSIONS,
nixpkgs_bazel_packages = SUPPORTED_NIXPKGS_BAZEL_PACKAGES,
**kwargs):
Expand All @@ -33,7 +34,7 @@ def rules_haskell_integration_test(
name = "%s_nixpkgs" % name,
srcs = srcs,
deps = deps,
env = {
env = env | {
"NIXPKGS": "1",
},
bazel_binaries = nixpkgs_bazel_binaries,
Expand All @@ -50,6 +51,7 @@ def rules_haskell_integration_test(
name = "%s_bindist" % name,
srcs = srcs,
deps = deps,
env = env,
bazel_binaries = bindist_bazel_binaries,
workspace_path = workspace_path,
rule_files = ["@rules_haskell//:distribution"],
Expand Down
2 changes: 1 addition & 1 deletion shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ mkShell {
++ lib.optionals docTools [ graphviz python3Packages.sphinx zip unzip ]
++ lib.optional stdenv.isDarwin macOS-security;

packages = [ bazel_6 ];
packages = [ bazel_7 ];

shellHook = ''
# Add nix config flags to .bazelrc.local.
Expand Down
Loading