diff --git a/.bazelrc b/.bazelrc index fab085457..f6cdbd740 100644 --- a/.bazelrc +++ b/.bazelrc @@ -113,6 +113,10 @@ build:ci --incompatible_load_proto_rules_from_bzl # https://github.com/tweag/rules_haskell/issues/1657 build: --incompatible_override_toolchain_transition +# This flag will become the default in bazel 7 +# https://github.com/bazelbuild/bazel/issues/17032 +build --incompatible_disable_starlark_host_transitions + coverage --build_tag_filters "coverage-compatible" --test_tag_filters "coverage-compatible" --test_output=all # To update these lines, execute diff --git a/.ci/bazel-5.2.0-darwin-x86_64.sha256 b/.ci/bazel-5.2.0-darwin-x86_64.sha256 deleted file mode 100644 index 17bd28908..000000000 --- a/.ci/bazel-5.2.0-darwin-x86_64.sha256 +++ /dev/null @@ -1 +0,0 @@ -edbe4c3a5efab799208ea0bc145bbf3330ff6e30a2cef065f9e1b337fede055b bazel-5.2.0-darwin-x86_64 diff --git a/.ci/bazel-5.2.0-linux-x86_64.sha256 b/.ci/bazel-5.2.0-linux-x86_64.sha256 deleted file mode 100644 index ab8f59a1c..000000000 --- a/.ci/bazel-5.2.0-linux-x86_64.sha256 +++ /dev/null @@ -1 +0,0 @@ -ae6944cf23baa5218fdb5f6d0ad7a7cf63c5b71eb463f47775e3f64828d340af bazel-5.2.0-linux-x86_64 diff --git a/.ci/bazel-5.2.0-windows-x86_64.exe.sha256 b/.ci/bazel-5.2.0-windows-x86_64.exe.sha256 deleted file mode 100644 index 6ae1cb936..000000000 --- a/.ci/bazel-5.2.0-windows-x86_64.exe.sha256 +++ /dev/null @@ -1 +0,0 @@ -919e5d1e9f559ea0966438b1434a74960a9ffb39e154535507b1c636ef72e2cb bazel-5.2.0-windows-x86_64.exe diff --git a/.ci/bazel-6.2.0-darwin-x86_64.sha256 b/.ci/bazel-6.2.0-darwin-x86_64.sha256 new file mode 100644 index 000000000..c43d66990 --- /dev/null +++ b/.ci/bazel-6.2.0-darwin-x86_64.sha256 @@ -0,0 +1 @@ +d2356012843ce3a2fbba89f88191673a6ad2f7716cc46ad43ec1bcee78d36b44 bazel-6.2.0-darwin-x86_64 diff --git a/.ci/bazel-6.2.0-linux-x86_64.sha256 b/.ci/bazel-6.2.0-linux-x86_64.sha256 new file mode 100644 index 000000000..26e445252 --- /dev/null +++ b/.ci/bazel-6.2.0-linux-x86_64.sha256 @@ -0,0 +1 @@ +3d11c26fb9ba12c833844450bb90165b176e8a19cb5cf5923f3cec855837f17c bazel-6.2.0-linux-x86_64 diff --git a/.ci/bazel-6.2.0-windows-x86_64.exe.sha256 b/.ci/bazel-6.2.0-windows-x86_64.exe.sha256 new file mode 100644 index 000000000..eecea8507 --- /dev/null +++ b/.ci/bazel-6.2.0-windows-x86_64.exe.sha256 @@ -0,0 +1 @@ +3d119e934ffb26910fcbd44dbc5973761480f58d3a06722cb84a90e16d8c5727 bazel-6.2.0-windows-x86_64.exe diff --git a/.ci/bazelversion b/.ci/bazelversion index 91ff57278..6abaeb2f9 100644 --- a/.ci/bazelversion +++ b/.ci/bazelversion @@ -1 +1 @@ -5.2.0 +6.2.0 diff --git a/WORKSPACE b/WORKSPACE index fc7b55b6b..fd51d954c 100755 --- a/WORKSPACE +++ b/WORKSPACE @@ -37,13 +37,12 @@ rules_proto_dependencies() rules_proto_toolchains() # For buildifier -# starting from 0.29, rules_go requires bazel >= 4.2.0 http_archive( name = "io_bazel_rules_go", - sha256 = "8e968b5fcea1d2d64071872b12737bbb5514524ee5f0a4f54f5920266c261acb", + sha256 = "6dc2da7ab4cf5d7bfc7c949776b1b7c733f05e56edc4bcd9022bb249d2e2a996", urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.28.0/rules_go-v0.28.0.zip", - "https://github.com/bazelbuild/rules_go/releases/download/v0.28.0/rules_go-v0.28.0.zip", + "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.39.1/rules_go-v0.39.1.zip", + "https://github.com/bazelbuild/rules_go/releases/download/v0.39.1/rules_go-v0.39.1.zip", ], ) @@ -104,9 +103,7 @@ load( go_rules_dependencies() -# If in nix-shell, use the Go SDK provided by Nix. -# Otherwise, ask Bazel to download a Go SDK. -go_register_toolchains(version = "1.16.2") +go_register_toolchains(version = "1.20.2") load("@com_github_bazelbuild_buildtools//buildifier:deps.bzl", "buildifier_dependencies") diff --git a/haskell/asterius/asterius_dependencies.bzl b/haskell/asterius/asterius_dependencies.bzl index 8f965ca78..434d7ecc5 100644 --- a/haskell/asterius/asterius_dependencies.bzl +++ b/haskell/asterius/asterius_dependencies.bzl @@ -19,7 +19,7 @@ def _nixpkgs_nodejs(name, nix_repository, nixpkgs_package_rule): # https://github.com/bazelbuild/bazel/issues/2927. nix_file_content = """ with import {{ config = {{}}; overlays = []; }}; - runCommand "nodejs-rules_haskell" {{ buildInputs = [ nodejs-16_x ]; }} '' + runCommand "nodejs-rules_haskell" {{ buildInputs = [ nodejs-18_x ]; }} '' mkdir -p $out cd $out for i in ${{nodejs}}/*; do ln -s $i; done diff --git a/haskell/private/versions.bzl b/haskell/private/versions.bzl index 25ce6dbfd..5e360f098 100644 --- a/haskell/private/versions.bzl +++ b/haskell/private/versions.bzl @@ -16,7 +16,7 @@ SUPPORTED_BAZEL_VERSIONS = [ "5.0.0", "5.2.0", - "6.0.0", + "6.2.0", ] SUPPORTED_NIXPKGS_BAZEL_PACKAGES = [ diff --git a/haskell/repositories.bzl b/haskell/repositories.bzl index d62c4bc9e..3d485ce9b 100644 --- a/haskell/repositories.bzl +++ b/haskell/repositories.bzl @@ -8,8 +8,8 @@ load( "check_bazel_version_compatible", ) -_rules_nixpkgs_version = "fb0e76e093c6ba7987ea4276027507a0d6dceb06" -_rules_nixpkgs_sha256 = "a8f20854da16156bd4e0d53d13dfb0d3360ee43c5ce764f0dc60703ab2b910e5" +_rules_nixpkgs_version = "0c1f8f5470c7f292b7620762e224f53d837929d3" +_rules_nixpkgs_sha256 = "9e3898a33c5f21f634aa9e2d45620e7c4b6d54d16d473571a891193bbd4725ca" _rules_sh_version = "v0.3.0" _rules_sh_sha256 = "d668bb32f112ead69c58bde2cae62f6b8acefe759a8c95a2d80ff6a85af5ac5e" diff --git a/nixpkgs/default.nix b/nixpkgs/default.nix index f69ab1603..743cb7bcc 100644 --- a/nixpkgs/default.nix +++ b/nixpkgs/default.nix @@ -1,8 +1,8 @@ { ... }@args: let - # 2023-01-03 - sha256 = "1213j2gvsmzmhpyi2jyn729s9d0gbn56k3d873iknd5ilb2rvpcr"; - rev = "73247c5ab2bc2037d7dd0d310f1fb43ed191edad"; + # 2023-05-22 + sha256 = "1lbr19fbh16n5ikgh9lzpscn83kr3w6hwx6md4k1iyxd7vx7zz0j"; + rev = "02df300699f8e4c24b39eeb7e034403880715dc5"; in import (fetchTarball { inherit sha256; diff --git a/rules_haskell_tests/WORKSPACE b/rules_haskell_tests/WORKSPACE index 2901d2718..31aadcd17 100644 --- a/rules_haskell_tests/WORKSPACE +++ b/rules_haskell_tests/WORKSPACE @@ -48,13 +48,12 @@ rules_proto_dependencies() rules_proto_toolchains() # For buildifier -# starting from 0.29, rules_go requires bazel >= 4.2.0 http_archive( name = "io_bazel_rules_go", - sha256 = "8e968b5fcea1d2d64071872b12737bbb5514524ee5f0a4f54f5920266c261acb", + sha256 = "6dc2da7ab4cf5d7bfc7c949776b1b7c733f05e56edc4bcd9022bb249d2e2a996", urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.28.0/rules_go-v0.28.0.zip", - "https://github.com/bazelbuild/rules_go/releases/download/v0.28.0/rules_go-v0.28.0.zip", + "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.39.1/rules_go-v0.39.1.zip", + "https://github.com/bazelbuild/rules_go/releases/download/v0.39.1/rules_go-v0.39.1.zip", ], ) @@ -165,9 +164,7 @@ load( go_rules_dependencies() -# If in nix-shell, use the Go SDK provided by Nix. -# Otherwise, ask Bazel to download a Go SDK. -go_register_toolchains(version = "host") if is_nix_shell else go_register_toolchains(version = "1.16.2") +go_register_toolchains(version = "1.20.2") load("@com_github_bazelbuild_buildtools//buildifier:deps.bzl", "buildifier_dependencies") diff --git a/shell.nix b/shell.nix index daa498301..4b668ff76 100644 --- a/shell.nix +++ b/shell.nix @@ -36,7 +36,7 @@ mkShell { file ] ++ lib.optionals docTools [graphviz python39Packages.sphinx zip unzip]; - packages = [ bazel_5 ]; + packages = [ bazel_6 ]; shellHook = '' # Add nix config flags to .bazelrc.local. diff --git a/start b/start index 852a1c004..a1455b398 100755 --- a/start +++ b/start @@ -13,7 +13,7 @@ readonly MIN_BAZEL_MAJOR=5 readonly MIN_BAZEL_MINOR=0 readonly MAX_BAZEL_MAJOR=6 -readonly MAX_BAZEL_MINOR=0 +readonly MAX_BAZEL_MINOR=2 stderr () { >&2 echo "$*"