diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index 845ef6450..e8f580eaf 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -342,6 +342,11 @@ jobs: run: | # Quote the package specifier so that it works on Windows bazelisk test "//..." + - name: Setup tmate session + if: ${{ failure() }} + uses: mxschmitt/action-tmate@v3 + with: + limit-access-to-actor: true all_ci_tests: runs-on: ubuntu-24.04 diff --git a/WORKSPACE b/WORKSPACE index 0d7779d9d..fae911b3a 100755 --- a/WORKSPACE +++ b/WORKSPACE @@ -15,6 +15,24 @@ rules_shell_dependencies() rules_shell_toolchains() +load("@platforms//host:extension.bzl", "host_platform_repo") + +host_platform_repo(name = "host_platform") + +load("@rules_cc//cc:repositories.bzl", "rules_cc_dependencies", "rules_cc_toolchains") + +rules_cc_dependencies() + +rules_cc_toolchains() + +load("@bazel_features//:deps.bzl", "bazel_features_deps") + +bazel_features_deps() + +load("@rules_cc//cc:extensions.bzl", "compatibility_proxy_repo") + +compatibility_proxy_repo() + load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( diff --git a/docs/BUILD.bazel b/docs/BUILD.bazel index 0e5cbb7e1..076a16093 100644 --- a/docs/BUILD.bazel +++ b/docs/BUILD.bazel @@ -30,7 +30,7 @@ libraries = { "@com_google_protobuf//bazel:cc_proto_library_bzl", "@com_google_protobuf//bazel/common:proto_info_bzl", "@rules_cc//cc/common", - "@rules_cc//cc/toolchains:srcs", + "@rules_cc//cc/toolchains:toolchain_rules", "@rules_java//java:rules", "@rules_shell//shell:rules_bzl", "//haskell", @@ -39,7 +39,7 @@ libraries = { "@com_google_protobuf//bazel:cc_proto_library_bzl", "@com_google_protobuf//bazel/common:proto_info_bzl", "@rules_cc//cc/common", - "@rules_cc//cc/toolchains:srcs", + "@rules_cc//cc/toolchains:toolchain_rules", "@rules_java//java:rules", "//haskell", ], @@ -47,7 +47,7 @@ libraries = { "@com_google_protobuf//bazel:cc_proto_library_bzl", "@com_google_protobuf//bazel/common:proto_info_bzl", "@rules_cc//cc/common", - "@rules_cc//cc/toolchains:srcs", + "@rules_cc//cc/toolchains:toolchain_rules", "@rules_proto//proto:defs", "//haskell", ], @@ -61,7 +61,7 @@ libraries = { "@com_google_protobuf//bazel:cc_proto_library_bzl", "@com_google_protobuf//bazel/common:proto_info_bzl", "@rules_cc//cc/common", - "@rules_cc//cc/toolchains:srcs", + "@rules_cc//cc/toolchains:toolchain_rules", "@rules_java//java:rules", "@rules_proto//proto:defs", "//haskell", @@ -69,7 +69,7 @@ libraries = { "c2hs": [ "@com_google_protobuf//bazel:cc_proto_library_bzl", "@rules_cc//cc/common", - "@rules_cc//cc/toolchains:srcs", + "@rules_cc//cc/toolchains:toolchain_rules", "//haskell", ], } diff --git a/examples/MODULE.bazel b/examples/MODULE.bazel index 14229de8b..5e33dc93d 100644 --- a/examples/MODULE.bazel +++ b/examples/MODULE.bazel @@ -31,7 +31,7 @@ bazel_dep( bazel_dep( name = "rules_cc", - version = "0.1.1", + version = "0.2.0", ) bazel_dep( name = "rules_sh", diff --git a/examples/WORKSPACE b/examples/WORKSPACE index 0821006ec..6a7ae9bd6 100644 --- a/examples/WORKSPACE +++ b/examples/WORKSPACE @@ -14,6 +14,24 @@ load("@rules_haskell//haskell:repositories.bzl", "rules_haskell_dependencies") rules_haskell_dependencies() +load("@platforms//host:extension.bzl", "host_platform_repo") + +host_platform_repo(name = "host_platform") + +load("@rules_cc//cc:repositories.bzl", "rules_cc_dependencies", "rules_cc_toolchains") + +rules_cc_dependencies() + +rules_cc_toolchains() + +load("@bazel_features//:deps.bzl", "bazel_features_deps") + +bazel_features_deps() + +load("@rules_cc//cc:extensions.bzl", "compatibility_proxy_repo") + +compatibility_proxy_repo() + load("@rules_haskell//haskell:nixpkgs.bzl", "haskell_register_ghc_nixpkgs") GHC_VERSION = "9.4.8" diff --git a/examples/arm/WORKSPACE b/examples/arm/WORKSPACE index 9cb4246b1..179bf3480 100644 --- a/examples/arm/WORKSPACE +++ b/examples/arm/WORKSPACE @@ -16,6 +16,16 @@ load( rules_haskell_dependencies() +load("@rules_cc//cc:repositories.bzl", "rules_cc_dependencies", "rules_cc_toolchains") + +rules_cc_dependencies() + +rules_cc_toolchains() + +load("@rules_cc//cc:extensions.bzl", "compatibility_proxy_repo") + +compatibility_proxy_repo() + load( "@rules_haskell//haskell:cabal.bzl", "stack_snapshot", diff --git a/haskell/repositories.bzl b/haskell/repositories.bzl index 7a1af3c44..9531d7484 100644 --- a/haskell/repositories.bzl +++ b/haskell/repositories.bzl @@ -80,6 +80,9 @@ def rules_haskell_dependencies(): urls = [ "https://github.com/bazelbuild/rules_java/releases/download/6.3.0/rules_java-6.3.0.tar.gz", ], + urls = ["https://github.com/bazelbuild/rules_cc/releases/download/0.2.0/rules_cc-0.2.0.tar.gz"], + sha256 = "ae244f400218f4a12ee81658ff246c0be5cb02c5ca2de5519ed505a6795431e9", + strip_prefix = "rules_cc-0.2.0", ) maybe( diff --git a/rules_haskell_tests/MODULE.bazel b/rules_haskell_tests/MODULE.bazel index 1071d500a..074fd8956 100644 --- a/rules_haskell_tests/MODULE.bazel +++ b/rules_haskell_tests/MODULE.bazel @@ -49,7 +49,7 @@ bazel_dep( ) bazel_dep( name = "rules_cc", - version = "0.1.1", + version = "0.2.0", ) bazel_dep( name = "rules_sh", diff --git a/rules_haskell_tests/WORKSPACE b/rules_haskell_tests/WORKSPACE index 60e3ed3ae..d5cddab58 100644 --- a/rules_haskell_tests/WORKSPACE +++ b/rules_haskell_tests/WORKSPACE @@ -14,6 +14,24 @@ load("@rules_haskell//haskell:repositories.bzl", "rules_haskell_dependencies") rules_haskell_dependencies() +load("@platforms//host:extension.bzl", "host_platform_repo") + +host_platform_repo(name = "host_platform") + +load("@rules_cc//cc:repositories.bzl", "rules_cc_dependencies", "rules_cc_toolchains") + +rules_cc_dependencies() + +rules_cc_toolchains() + +load("@bazel_features//:deps.bzl", "bazel_features_deps") + +bazel_features_deps() + +load("@rules_cc//cc:extensions.bzl", "compatibility_proxy_repo") + +compatibility_proxy_repo() + load("//:non_module_deps.bzl", "repositories") repositories(bzlmod = False) diff --git a/rules_haskell_tests/tests/ghcWithPackages_2097/test/WORKSPACE b/rules_haskell_tests/tests/ghcWithPackages_2097/test/WORKSPACE index 531c3f6a0..0bc649cc5 100644 --- a/rules_haskell_tests/tests/ghcWithPackages_2097/test/WORKSPACE +++ b/rules_haskell_tests/tests/ghcWithPackages_2097/test/WORKSPACE @@ -28,6 +28,14 @@ nixpkgs_cc_configure( repository = "@rules_haskell//nixpkgs:default.nix", ) +load("@bazel_features//:deps.bzl", "bazel_features_deps") + +bazel_features_deps() + +load("@rules_cc//cc:extensions.bzl", "compatibility_proxy_repo") + +compatibility_proxy_repo() + nixpkgs_python_configure( repository = "@rules_haskell//nixpkgs:default.nix", ) diff --git a/rules_haskell_tests/tests/haskell_module/repl/haskell_module_repl_cross_library_deps_test/WORKSPACE b/rules_haskell_tests/tests/haskell_module/repl/haskell_module_repl_cross_library_deps_test/WORKSPACE index d74318e25..a5ff7049e 100644 --- a/rules_haskell_tests/tests/haskell_module/repl/haskell_module_repl_cross_library_deps_test/WORKSPACE +++ b/rules_haskell_tests/tests/haskell_module/repl/haskell_module_repl_cross_library_deps_test/WORKSPACE @@ -44,6 +44,14 @@ nixpkgs_cc_configure( repository = "@rules_haskell//nixpkgs:default.nix", ) +load("@bazel_features//:deps.bzl", "bazel_features_deps") + +bazel_features_deps() + +load("@rules_cc//cc:extensions.bzl", "compatibility_proxy_repo") + +compatibility_proxy_repo() + nixpkgs_python_configure( repository = "@rules_haskell//nixpkgs:default.nix", ) diff --git a/rules_haskell_tests/tests/haskell_module/repl/haskell_module_repl_test/WORKSPACE b/rules_haskell_tests/tests/haskell_module/repl/haskell_module_repl_test/WORKSPACE index 5fda6b280..44d8679ef 100644 --- a/rules_haskell_tests/tests/haskell_module/repl/haskell_module_repl_test/WORKSPACE +++ b/rules_haskell_tests/tests/haskell_module/repl/haskell_module_repl_test/WORKSPACE @@ -44,6 +44,14 @@ nixpkgs_cc_configure( repository = "@rules_haskell//nixpkgs:default.nix", ) +load("@bazel_features//:deps.bzl", "bazel_features_deps") + +bazel_features_deps() + +load("@rules_cc//cc:extensions.bzl", "compatibility_proxy_repo") + +compatibility_proxy_repo() + nixpkgs_python_configure( repository = "@rules_haskell//nixpkgs:default.nix", ) diff --git a/rules_haskell_tests/tests/recompilation/recompilation_workspace/WORKSPACE b/rules_haskell_tests/tests/recompilation/recompilation_workspace/WORKSPACE index 187640caa..2f9a38f81 100644 --- a/rules_haskell_tests/tests/recompilation/recompilation_workspace/WORKSPACE +++ b/rules_haskell_tests/tests/recompilation/recompilation_workspace/WORKSPACE @@ -33,3 +33,11 @@ nixpkgs_cc_configure( name = "nixpkgs_config_cc", repository = "@rules_haskell//nixpkgs:default.nix", ) + +load("@bazel_features//:deps.bzl", "bazel_features_deps") + +bazel_features_deps() + +load("@rules_cc//cc:extensions.bzl", "compatibility_proxy_repo") + +compatibility_proxy_repo() diff --git a/rules_haskell_tests/tests/repl-targets/hs_bin_repl_test/WORKSPACE b/rules_haskell_tests/tests/repl-targets/hs_bin_repl_test/WORKSPACE index 0813b95df..cb12089e4 100644 --- a/rules_haskell_tests/tests/repl-targets/hs_bin_repl_test/WORKSPACE +++ b/rules_haskell_tests/tests/repl-targets/hs_bin_repl_test/WORKSPACE @@ -38,6 +38,14 @@ nixpkgs_cc_configure( repository = "@rules_haskell//nixpkgs:default.nix", ) +load("@bazel_features//:deps.bzl", "bazel_features_deps") + +bazel_features_deps() + +load("@rules_cc//cc:extensions.bzl", "compatibility_proxy_repo") + +compatibility_proxy_repo() + nixpkgs_python_configure( repository = "@rules_haskell//nixpkgs:default.nix", ) diff --git a/rules_haskell_tests/tests/repl-targets/hs_lib_repl_test/WORKSPACE b/rules_haskell_tests/tests/repl-targets/hs_lib_repl_test/WORKSPACE index 68e1dc09f..005c0306f 100644 --- a/rules_haskell_tests/tests/repl-targets/hs_lib_repl_test/WORKSPACE +++ b/rules_haskell_tests/tests/repl-targets/hs_lib_repl_test/WORKSPACE @@ -47,6 +47,14 @@ nixpkgs_cc_configure( repository = "@rules_haskell//nixpkgs:default.nix", ) +load("@bazel_features//:deps.bzl", "bazel_features_deps") + +bazel_features_deps() + +load("@rules_cc//cc:extensions.bzl", "compatibility_proxy_repo") + +compatibility_proxy_repo() + nixpkgs_python_configure( repository = "@rules_haskell//nixpkgs:default.nix", ) diff --git a/rules_haskell_tests/tests/stack-snapshot-deps/hs_override_stack_test/WORKSPACE b/rules_haskell_tests/tests/stack-snapshot-deps/hs_override_stack_test/WORKSPACE index ae20a41ad..4f272070f 100644 --- a/rules_haskell_tests/tests/stack-snapshot-deps/hs_override_stack_test/WORKSPACE +++ b/rules_haskell_tests/tests/stack-snapshot-deps/hs_override_stack_test/WORKSPACE @@ -38,6 +38,14 @@ nixpkgs_cc_configure( repository = "@rules_haskell//nixpkgs:default.nix", ) +load("@bazel_features//:deps.bzl", "bazel_features_deps") + +bazel_features_deps() + +load("@rules_cc//cc:extensions.bzl", "compatibility_proxy_repo") + +compatibility_proxy_repo() + nixpkgs_python_configure( repository = "@rules_haskell//nixpkgs:default.nix", ) diff --git a/start b/start index faf25c704..e80bba28c 100755 --- a/start +++ b/start @@ -280,6 +280,24 @@ load( # Setup all Bazel dependencies required by rules_haskell. rules_haskell_dependencies() +load("@platforms//host:extension.bzl", "host_platform_repo") + +host_platform_repo(name = "host_platform") + +load("@rules_cc//cc:repositories.bzl", "rules_cc_dependencies", "rules_cc_toolchains") + +rules_cc_dependencies() + +rules_cc_toolchains() + +load("@bazel_features//:deps.bzl", "bazel_features_deps") + +bazel_features_deps() + +load("@rules_cc//cc:extensions.bzl", "compatibility_proxy_repo") + +compatibility_proxy_repo() + load( "@rules_haskell//haskell:toolchain.bzl", "rules_haskell_toolchains", diff --git a/tutorial/WORKSPACE b/tutorial/WORKSPACE index ea49813b9..4f5133202 100644 --- a/tutorial/WORKSPACE +++ b/tutorial/WORKSPACE @@ -9,6 +9,24 @@ load("@rules_haskell//haskell:repositories.bzl", "rules_haskell_dependencies") rules_haskell_dependencies() +load("@platforms//host:extension.bzl", "host_platform_repo") + +host_platform_repo(name = "host_platform") + +load("@rules_cc//cc:repositories.bzl", "rules_cc_dependencies", "rules_cc_toolchains") + +rules_cc_dependencies() + +rules_cc_toolchains() + +load("@bazel_features//:deps.bzl", "bazel_features_deps") + +bazel_features_deps() + +load("@rules_cc//cc:extensions.bzl", "compatibility_proxy_repo") + +compatibility_proxy_repo() + load("@rules_haskell//haskell:nixpkgs.bzl", "haskell_register_ghc_nixpkgs") GHC_VERSION = "9.4.8"