Skip to content
New issue

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

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

Already on GitHub? # to your account

chore: upgrade Bazel to 6.5.0 #2117

Merged
merged 3 commits into from
Apr 30, 2024
Merged
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
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.4.0
6.5.0
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,21 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).
### Changed

* Use ghc 9.4.6 by default
* Use Bazel 6.5.0 by default (See https://github.com/tweag/rules_haskell/pull/2117)

## [0.19] 2024-02-5

[0.19]: https://github.com/tweag/rules_haskell/compare/v0.18...v0.19

### Highlights
### Highlights

* Fix toolchain libraries creation when using `ghcWithPackages` (https://github.com/tweag/rules_haskell/pull/2098)

### Added

* Ghc 9.6.4 (https://github.com/tweag/rules_haskell/pull/2108)

### Changed
### Changed

* Upgrade `rules_sh` to `0.4.0` (https://github.com/tweag/rules_haskell/pull/2103)

Expand Down
2 changes: 1 addition & 1 deletion haskell/private/versions.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
SUPPORTED_BAZEL_VERSIONS = [
"6.0.0",
"6.3.2",
"6.4.0",
"6.5.0",
]

SUPPORTED_NIXPKGS_BAZEL_PACKAGES = [
Expand Down
10 changes: 10 additions & 0 deletions nixpkgs/nixos-unstable.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{ ... }@args:
let
# 2024-04-27
sha256 = "sha256:1iy5vigbw2dx7rhzmsszc7d87sw545f0vw4kcwxk3mazxg9qrzgl";
rev = "2b1f64b358f2cab62617f26b3870fd0ee375d848";
in
import (fetchTarball {
inherit sha256;
url = "https://github.com/NixOS/nixpkgs/archive/${rev}.tar.gz";
}) args
3 changes: 2 additions & 1 deletion rules_haskell_tests/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ use_repo(
"bazel_6",
"build_bazel_bazel_6_0_0",
"build_bazel_bazel_6_3_2",
"build_bazel_bazel_6_4_0",
"build_bazel_bazel_6_5_0",
"glibc_locales",
"linux_amd64_asterius-toolchain",
"nixpkgs_config_cc",
Expand All @@ -126,6 +126,7 @@ use_repo(
"nixpkgs_go_sdk_toolchains",
"nixpkgs_lz4",
"nixpkgs_python_toolchain",
"nixpkgs_unstable",
"toolchains_libraries",
"zlib.dev",
)
Expand Down
6 changes: 6 additions & 0 deletions rules_haskell_tests/non_module_deps_1.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ def repositories(*, bzlmod):
nix_file = "//nixpkgs:default.nix",
)

# TODO switch back to nixpkgs_default once bazel_* matches the version in .bazelversion
nixpkgs_local_repository(
name = "nixpkgs_unstable",
nix_file = "//nixpkgs:nixos-unstable.nix",
)

nixpkgs_package(
name = "glibc_locales",
attribute_path = "glibcLocales",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ def integration_testing_bazel_binaries():
for package in SUPPORTED_NIXPKGS_BAZEL_PACKAGES:
nixpkgs_package(
name = package,
repository = "@nixpkgs_default",
# TODO switch back to nixpkgs_default once bazel_* matches the version in .bazelversion
repository = "@nixpkgs_unstable",
build_file_content = """\
filegroup(
name = "bazel_bin",
Expand Down
5 changes: 4 additions & 1 deletion shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
with pkgs;

let
nixos-unstable = import ./nixpkgs/nixos-unstable.nix { };

macOS-security =
# make `/usr/bin/security` available in `PATH`, which is needed for stack
# on darwin which calls this binary to find certificates
Expand Down Expand Up @@ -42,7 +44,8 @@ mkShell {
++ lib.optionals docTools [ graphviz python39Packages.sphinx zip unzip ]
++ lib.optional stdenv.isDarwin macOS-security;

packages = [ bazel_6 ];
# TODO switch back to default nixpkgs once bazel_* matches the version in .bazelversion
packages = [ nixos-unstable.bazel_6 ];

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