-
Notifications
You must be signed in to change notification settings - Fork 81
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
Upgrade default GHC to 9.2.8 #1994
Conversation
06062c4
to
e977937
Compare
@@ -159,6 +159,7 @@ stack_snapshot( | |||
"_" + str(GHC_VERSION) if GHC_VERSION else "", | |||
), | |||
packages = [ | |||
"Cabal", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note, this is used here
rules_haskell/rules_haskell_tests/tests/repl-targets/hs_lib_repl_test/WORKSPACE
Lines 132 to 136 in 8271ec2
setup_deps = { | |
"alex": ["@stackage//:Cabal"], | |
"c2hs": ["@stackage//:Cabal"], | |
"happy": ["@stackage//:Cabal"], | |
}, |
What this means is that it uses the Cabal from the git commit given in the stackage yaml config.
So instead of adding a http_archive
for Cabal like this
rules_haskell/extensions/rules_haskell_dependencies.bzl
Lines 28 to 43 in 8271ec2
http_archive( | |
name = "Cabal", | |
build_file_content = """ | |
load("@rules_haskell//haskell:cabal.bzl", "haskell_cabal_library") | |
haskell_cabal_library( | |
name = "Cabal", | |
srcs = glob(["Cabal/**"]), | |
verbose = False, | |
version = "3.8.1.0", | |
visibility = ["//visibility:public"], | |
) | |
""", | |
sha256 = "b697b558558f351d2704e520e7dcb1f300cd77fea5677d4b2ee71d0b965a4fe9", | |
strip_prefix = "cabal-ghc-9.4-paths-module-relocatable", | |
urls = ["https://github.com/tweag/cabal/archive/refs/heads/ghc-9.4-paths-module-relocatable.zip"], | |
) |
and then using
@Cabal//:Cabal
in setup_deps
we might just use the cabal from the stackage snapshot directly as above. This would probably mean that every stack_snapshot would build it's own Cabal package instead of re-using the one from the Cabal repo. WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would probably mean that every stack_snapshot would build it's own Cabal package instead of re-using the one from the Cabal repo. WDYT?
What do you mean by every stack_snapshot
? It would only affect those that use this custom snapshot, correct? Or do you mean that this sets it as the default, and users would have to opt out by explicitly setting their own snapshot? I think in this case this is okay since it fixes a critical bug, i.e. without this most builds just won't work at all. And users can opt out with an explicit snapshot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed, I'll try to remove the redundant @Cabal
repositories and use the Cabal from stackage directly.
🎉 All dependencies have been resolved ! |
4e6adec
to
230823a
Compare
230823a
to
865a428
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! LGTM, only a small comment.
@@ -159,6 +159,7 @@ stack_snapshot( | |||
"_" + str(GHC_VERSION) if GHC_VERSION else "", | |||
), | |||
packages = [ | |||
"Cabal", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would probably mean that every stack_snapshot would build it's own Cabal package instead of re-using the one from the Cabal repo. WDYT?
What do you mean by every stack_snapshot
? It would only affect those that use this custom snapshot, correct? Or do you mean that this sets it as the default, and users would have to opt out by explicitly setting their own snapshot? I think in this case this is okay since it fixes a critical bug, i.e. without this most builds just won't work at all. And users can opt out with an explicit snapshot.
When there are no executable components the repository rule would fail with a IOException, e.g.: ``` ERROR: /home/runner/.cache/bazel/_bazel_runner/8c1e0159f4edbec0d500d51744201c1f/bazel_testing/bazel_6/WORKSPACE:111:15: fetching _stack_executables rule //external:stackage-exe: java.io.IOException: _stack_executables rule //external:stackage-exe must create a directory ERROR: /home/runner/.cache/bazel/_bazel_runner/8c1e0159f4edbec0d500d51744201c1f/bazel_testing/bazel_6/BUILD.bazel:32:15: //:c2hs-toolchain-impl depends on @stackage-exe//c2hs:c2hs in repository @stackage-exe which failed to fetch. no such package '@stackage-exe//c2hs': _stack_executables rule //external:stackage-exe must create a directory ```
This is needed by the rules_haskell_test lib-repl test which uses the stackage snapshot json file.
Newer versions depend on Win32 >= 2.13 on Windows, but the stack snapshot still just includes Win32 2.12.
ee8a6d3
to
0b239aa
Compare
depends on #1988