Skip to content

Commit 9da1917

Browse files
authored
Merge branch 'master' into philipp/reexport_depset
2 parents b210ba1 + e97f4e4 commit 9da1917

22 files changed

+647
-67
lines changed

.github/workflows/workflow.yaml

+9-7
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
buildbuddy_api_key: ${{ secrets.BUILDBUDDY_API_KEY }}
2727
bazelrc_path: .bazelrc.auth
2828
- uses: ./.github/actions/set_tcp_keepalive_time
29-
- uses: extractions/netrc@v1
29+
- uses: extractions/netrc@v2
3030
with:
3131
machine: api.github.com
3232
password: ${{ secrets.GITHUB_TOKEN }}
@@ -47,16 +47,16 @@ jobs:
4747
module: [rules_haskell, rules_haskell_nix, rules_haskell_tests]
4848
bzlmod: [true, false]
4949
ghc:
50-
- 9.2.8
5150
- 9.4.6
5251
- 9.6.2
52+
- 9.8.1
5353
exclude:
5454
- module: rules_haskell_nix
5555

5656
bzlmod: false
5757
# TODO: in a MODULE.bazel file we declare version specific dependencies, would need to use stack snapshot json
5858
# and stack config per GHC version
59-
- ghc: 9.2.8
59+
- ghc: 9.8.1
6060
bzlmod: true
6161
- ghc: 9.6.2
6262
bzlmod: true
@@ -82,7 +82,7 @@ jobs:
8282
buildbuddy_api_key: ${{ secrets.BUILDBUDDY_API_KEY }}
8383
bazelrc_path: .bazelrc.auth
8484
- uses: ./.github/actions/set_tcp_keepalive_time
85-
- uses: extractions/netrc@v1
85+
- uses: extractions/netrc@v2
8686
with:
8787
machine: api.github.com
8888
password: ${{ secrets.GITHUB_TOKEN }}
@@ -143,19 +143,21 @@ jobs:
143143
module: [rules_haskell, rules_haskell_tests]
144144
bzlmod: [true, false]
145145
ghc:
146-
- 9.2.8
147146
- 9.4.6
148147
- 9.6.2
148+
- 9.8.1
149149
exclude:
150150
# TODO: in a MODULE.bazel file we declare version specific dependencies, would need to use stack snapshot json
151151
# and stack config per GHC version
152-
- ghc: 9.2.8
152+
- ghc: 9.8.1
153153
bzlmod: true
154154
- ghc: 9.6.2
155155
bzlmod: true
156156
# currently proto-lens-protoc fails with an access violation on Windows
157157
- ghc: 9.6.2
158158
os: windows-latest
159+
- ghc: 9.8.1
160+
os: windows-latest
159161
env:
160162
GHC_VERSION: ${{ matrix.ghc }}
161163
runs-on: ${{ matrix.os }}
@@ -175,7 +177,7 @@ jobs:
175177
buildbuddy_api_key: ${{ secrets.BUILDBUDDY_API_KEY }}
176178
bazelrc_path: .bazelrc.auth
177179
- uses: ./.github/actions/set_tcp_keepalive_time
178-
- uses: extractions/netrc@v1
180+
- uses: extractions/netrc@v2
179181
with:
180182
machine: api.github.com
181183
password: ${{ secrets.GITHUB_TOKEN }}

WORKSPACE

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ load("//haskell:private/ghc_ci.bzl", "ghc_version")
44

55
ghc_version(name = "rules_haskell_ghc_version")
66

7+
load("@rules_haskell//haskell:private/versions.bzl", "is_at_least")
78
load("//haskell:repositories.bzl", "rules_haskell_dependencies")
89

910
rules_haskell_dependencies()
@@ -179,7 +180,7 @@ stack_snapshot(
179180
"proto-lens-runtime",
180181
"lens-family",
181182
],
182-
setup_deps = {} if GHC_VERSION and GHC_VERSION.startswith("9.6.") else {
183+
setup_deps = {} if GHC_VERSION and is_at_least("9.6", GHC_VERSION) else {
183184
# See https://github.com/tweag/rules_haskell/issues/1871
184185
"HUnit": ["@Cabal//:Cabal"],
185186
"bifunctors": ["@Cabal//:Cabal"],

extensions/rules_haskell_dependencies.bzl

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
66
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
77
load("@rules_haskell//tools:os_info.bzl", "os_info")
88
load("@rules_haskell_ghc_version//:ghc_version.bzl", "GHC_VERSION")
9+
load("@rules_haskell//haskell:private/versions.bzl", "is_at_least")
910

1011
def _empty_repo_impl(rctx):
1112
fail(rctx.attr.error_msg)
@@ -38,7 +39,8 @@ def repositories(*, bzlmod): # @unused
3839

3940
# TODO: Remove when tests are run with a ghc version containing Cabal >= 3.10
4041
# See https://github.com/tweag/rules_haskell/issues/1871
41-
if GHC_VERSION and GHC_VERSION.startswith("9.6."):
42+
43+
if GHC_VERSION and is_at_least("9.6", GHC_VERSION):
4244
_empty_repo(
4345
name = "Cabal",
4446
error_msg = "When using GHC >= 9.6, do not depend on @Cabal, as https://github.com/tweag/rules_haskell/issues/1871 is fixed.",

haskell/private/ghc_bindist_generated.json

+22
Original file line numberDiff line numberDiff line change
@@ -400,5 +400,27 @@
400400
"https://downloads.haskell.org/~ghc/9.8.1/ghc-9.8.1-x86_64-unknown-mingw32.tar.xz",
401401
"eb74654419cb646e9d2e362b57f2f81bc9f5231bceb543b14cb0341aedb07fa3"
402402
]
403+
},
404+
"9.8.2": {
405+
"linux_amd64": [
406+
"https://downloads.haskell.org/~ghc/9.8.2/ghc-9.8.2-x86_64-deb9-linux.tar.xz",
407+
"9ff735b0b9dcb0c48cc32d6df7826b6ee9b2fdf1f1e056f015bab9e79fc86c11"
408+
],
409+
"linux_arm64": [
410+
"https://downloads.haskell.org/~ghc/9.8.2/ghc-9.8.2-aarch64-deb10-linux.tar.xz",
411+
"9a3776fd8dc02f95b751f0e44823d6727dea2c212857e2c5c5f6a38a034d1575"
412+
],
413+
"darwin_amd64": [
414+
"https://downloads.haskell.org/~ghc/9.8.2/ghc-9.8.2-x86_64-apple-darwin.tar.xz",
415+
"64e8cca6310443cd6de8255edcf391d937829792e701167f7e5fb234f7150078"
416+
],
417+
"darwin_arm64": [
418+
"https://downloads.haskell.org/~ghc/9.8.2/ghc-9.8.2-aarch64-apple-darwin.tar.xz",
419+
"67be089dedbe599d911efd8f82e4f9a19225761a3872be74dfd4b5a557fb8e1a"
420+
],
421+
"windows_amd64": [
422+
"https://downloads.haskell.org/~ghc/9.8.2/ghc-9.8.2-x86_64-unknown-mingw32.tar.xz",
423+
"f7d496b850686ea5fbfcecc722ec399ec7acb8d06ebec23bb4dcb9338f430764"
424+
]
403425
}
404426
}

haskell/private/versions.bzl

+4-4
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def _parse_bazel_version(bazel_version):
5151
"""
5252
return [int(_parse_version_chunk(x)) for x in bazel_version.split(".")]
5353

54-
def _is_at_least(threshold, version):
54+
def is_at_least(threshold, version):
5555
"""Check that a version is higher or equals to a threshold.
5656
Args:
5757
threshold: the minimum version string
@@ -64,7 +64,7 @@ def _is_at_least(threshold, version):
6464
# Needed for check_bazel_version below.
6565
return _parse_bazel_version(version) >= _parse_bazel_version(threshold)
6666

67-
def _is_at_most(threshold, version):
67+
def is_at_most(threshold, version):
6868
"""Check that a version is lower or equals to a threshold.
6969
Args:
7070
threshold: the maximum version string
@@ -103,7 +103,7 @@ def check_bazel_version(minimum_bazel_version, maximum_bazel_version = None, baz
103103
else:
104104
bazel_version = native.bazel_version
105105

106-
if not _is_at_least(
106+
if not is_at_least(
107107
threshold = minimum_bazel_version,
108108
version = bazel_version,
109109
):
@@ -113,7 +113,7 @@ def check_bazel_version(minimum_bazel_version, maximum_bazel_version = None, baz
113113
))
114114

115115
if maximum_bazel_version:
116-
if not _is_at_most(
116+
if not is_at_most(
117117
threshold = maximum_bazel_version,
118118
version = bazel_version,
119119
):

rules_haskell_tests/WORKSPACE

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ local_repository(
66
)
77

88
load("@rules_haskell//haskell:private/ghc_ci.bzl", "ghc_version")
9+
load("@rules_haskell//haskell:private/versions.bzl", "is_at_least")
910

1011
ghc_version(name = "rules_haskell_ghc_version")
1112

@@ -297,7 +298,7 @@ stack_snapshot(
297298
"typed-process": ["@Cabal//:Cabal"],
298299
"unliftio-core": ["@Cabal//:Cabal"],
299300
}.items()
300-
if [d for d in deps if d != "@Cabal//:Cabal"] or not GHC_VERSION or not GHC_VERSION.startswith("9.6.")
301+
if [d for d in deps if d != "@Cabal//:Cabal"] or not GHC_VERSION or not is_at_least("9.6", GHC_VERSION)
301302
},
302303
stack_snapshot_json = "//:stackage_snapshot{}.json".format(
303304
"_" + str(GHC_VERSION) if GHC_VERSION else "",

0 commit comments

Comments
 (0)