Skip to content

Commit

Permalink
Set default ghc version to 9.4.6
Browse files Browse the repository at this point in the history
  • Loading branch information
ylecornec committed Feb 13, 2024
1 parent 2265ebf commit 4dd62ad
Show file tree
Hide file tree
Showing 15 changed files with 35 additions and 34 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
bzlmod: false
# TODO: in a MODULE.bazel file we declare version specific dependencies, would need to use stack snapshot json
# and stack config per GHC version
- ghc: 9.4.6
- ghc: 9.2.8
bzlmod: true
- ghc: 9.6.2
bzlmod: true
Expand Down Expand Up @@ -149,7 +149,7 @@ jobs:
exclude:
# TODO: in a MODULE.bazel file we declare version specific dependencies, would need to use stack snapshot json
# and stack config per GHC version
- ghc: 9.4.6
- ghc: 9.2.8
bzlmod: true
- ghc: 9.6.2
bzlmod: true
Expand Down
2 changes: 1 addition & 1 deletion constants.bzl
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
test_ghc_version = "9.2.8"
test_ghc_version = "9.4.6"
test_asterius_version = "0.0.1"
6 changes: 3 additions & 3 deletions examples/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ rules_haskell_dependencies()
load("@rules_haskell//haskell:nixpkgs.bzl", "haskell_register_ghc_nixpkgs")

haskell_register_ghc_nixpkgs(
attribute_path = "haskell.compiler.ghc928",
attribute_path = "haskell.compiler.ghc946",
repository = "@rules_haskell//nixpkgs:default.nix",
version = "9.2.8",
version = "9.4.6",
)

load("@rules_haskell//haskell:toolchain.bzl", "rules_haskell_toolchains")

rules_haskell_toolchains(version = "9.2.8")
rules_haskell_toolchains(version = "9.4.6")

load("@rules_nixpkgs_cc//:cc.bzl", "nixpkgs_cc_configure")
load("@rules_nixpkgs_python//:python.bzl", "nixpkgs_python_configure")
Expand Down
2 changes: 1 addition & 1 deletion haskell/ghc.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# (see stackage.org).

# Currently, we are using GHC 9.2.x as default.
DEFAULT_GHC_VERSION = "9.2.8"
DEFAULT_GHC_VERSION = "9.4.6"
4 changes: 2 additions & 2 deletions rules_haskell_nix/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ nix_haskell_toolchains = use_extension(
# Declare a default nix-based toolchain
nix_haskell_toolchains.new(
attribute_path = "",
nix_file_content = """with import <nixpkgs> {}; haskell.packages.ghc928.ghc""",
nix_file_content = """with import <nixpkgs> {}; haskell.packages.ghc946.ghc""",
repository = "@nixpkgs_default",
version = "9.2.8",
version = "9.4.6",
)
use_repo(
nix_haskell_toolchains,
Expand Down
5 changes: 3 additions & 2 deletions rules_haskell_tests/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ haskell_toolchains = use_extension(
"haskell_toolchains",
)

test_ghc_version = "9.2.8"
test_ghc_version = "9.4.6"

test_ghcopts = [
"-XStandaloneDeriving", # Flag used at compile time
Expand Down Expand Up @@ -316,12 +316,13 @@ nix_haskell_toolchains = use_extension(
"@rules_haskell_nix//extensions:nix_haskell_toolchains.bzl",
"nix_haskell_toolchains",
)

nix_haskell_toolchains.new(
attribute_path = "",
cabalopts = test_cabalopts,
ghcopts = test_ghcopts,
haddock_flags = test_haddock_flags,
nix_file_content = """with import <nixpkgs> {}; haskell.packages.ghc928.ghc""",
nix_file_content = """with import <nixpkgs> {}; haskell.packages.ghc946.ghc""",
repl_ghci_args = test_repl_ghci_args,
repository = "@nixpkgs_default",
version = test_ghc_version,
Expand Down
2 changes: 1 addition & 1 deletion rules_haskell_tests/shell.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ pkgs ? import ./nixpkgs { }, docTools ? true, ghcVersion ? "9.2.8" }:
{ pkgs ? import ./nixpkgs { }, docTools ? true, ghcVersion ? "9.4.6" }:

with pkgs;
mkShell {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ rules_haskell_dependencies()
load("@rules_haskell//haskell:nixpkgs.bzl", "haskell_register_ghc_nixpkgs")

haskell_register_ghc_nixpkgs(
attribute_path = "haskell.compiler.ghc928",
attribute_path = "haskell.compiler.ghc946",
repository = "@rules_haskell//nixpkgs:default.nix",
version = "9.2.8",
version = "9.4.6",
)

load("@rules_haskell//haskell:toolchain.bzl", "rules_haskell_toolchains")

rules_haskell_toolchains(version = "9.2.8")
rules_haskell_toolchains(version = "9.4.6")

load(
"@rules_nixpkgs_core//:nixpkgs.bzl",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ rules_haskell_dependencies()
load("@rules_haskell//haskell:nixpkgs.bzl", "haskell_register_ghc_nixpkgs")

haskell_register_ghc_nixpkgs(
attribute_path = "haskell.compiler.ghc928",
attribute_path = "haskell.compiler.ghc946",
repository = "@rules_haskell//nixpkgs:default.nix",
version = "9.2.8",
version = "9.4.6",
)

load("@rules_haskell//haskell:toolchain.bzl", "rules_haskell_toolchains")

rules_haskell_toolchains(version = "9.2.8")
rules_haskell_toolchains(version = "9.4.6")

load(
"@io_tweag_rules_nixpkgs//nixpkgs:nixpkgs.bzl",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ rules_haskell_dependencies()
load("@rules_haskell//haskell:nixpkgs.bzl", "haskell_register_ghc_nixpkgs")

haskell_register_ghc_nixpkgs(
attribute_path = "haskell.compiler.ghc928",
attribute_path = "haskell.compiler.ghc946",
repository = "@rules_haskell//nixpkgs:default.nix",
version = "9.2.8",
version = "9.4.6",
)

load("@rules_haskell//haskell:toolchain.bzl", "rules_haskell_toolchains")

rules_haskell_toolchains(version = "9.2.8")
rules_haskell_toolchains(version = "9.4.6")

load(
"@io_tweag_rules_nixpkgs//nixpkgs:nixpkgs.bzl",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ rules_haskell_dependencies()
load("@rules_haskell//haskell:nixpkgs.bzl", "haskell_register_ghc_nixpkgs")

haskell_register_ghc_nixpkgs(
attribute_path = "haskell.compiler.ghc928",
attribute_path = "haskell.compiler.ghc946",
repository = "@rules_haskell//nixpkgs:default.nix",
version = "9.2.8",
version = "9.4.6",
)

load("@rules_haskell//haskell:toolchain.bzl", "rules_haskell_toolchains")

rules_haskell_toolchains(version = "9.2.8")
rules_haskell_toolchains(version = "9.4.6")

load(
"@io_tweag_rules_nixpkgs//nixpkgs:nixpkgs.bzl",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ rules_haskell_dependencies()
load("@rules_haskell//haskell:nixpkgs.bzl", "haskell_register_ghc_nixpkgs")

haskell_register_ghc_nixpkgs(
attribute_path = "haskell.compiler.ghc928",
attribute_path = "haskell.compiler.ghc946",
repository = "@rules_haskell//nixpkgs:default.nix",
version = "9.2.8",
version = "9.4.6",
)

load("@rules_haskell//haskell:toolchain.bzl", "rules_haskell_toolchains")

rules_haskell_toolchains(version = "9.2.8")
rules_haskell_toolchains(version = "9.4.6")

load(
"@io_tweag_rules_nixpkgs//nixpkgs:nixpkgs.bzl",
Expand Down
2 changes: 1 addition & 1 deletion shell.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ pkgs ? import ./nixpkgs { }, docTools ? true, ghcVersion ? "9.2.8" }:
{ pkgs ? import ./nixpkgs { }, docTools ? true, ghcVersion ? "9.4.6" }:

with pkgs;

Expand Down
6 changes: 3 additions & 3 deletions start
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
set -eu

# If the environment variable `GHC_VERSION` is not set yet,
# we use the default version (currently "9.2.8").
GHC_VERSION=${GHC_VERSION:="9.2.8"}
# we use the default version (currently "9.4.6").
GHC_VERSION=${GHC_VERSION:="9.4.6"}

readonly MIN_BAZEL_MAJOR=6
readonly MIN_BAZEL_MINOR=0
Expand Down Expand Up @@ -314,7 +314,7 @@ EOF
# https://github.com/tweag/rules_nixpkgs/blob/master/README.md
nixpkgs_git_repository(
name = "nixpkgs",
revision = "nixos-23.05",
revision = "nixos-23.11",
)
nixpkgs_cc_configure(
Expand Down
6 changes: 3 additions & 3 deletions tutorial/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ rules_haskell_dependencies()
load("@rules_haskell//haskell:nixpkgs.bzl", "haskell_register_ghc_nixpkgs")

haskell_register_ghc_nixpkgs(
attribute_path = "haskell.compiler.ghc928",
attribute_path = "haskell.compiler.ghc946",
repository = "@rules_haskell//nixpkgs:default.nix",
version = "9.2.8",
version = "9.4.6",
)

load("@rules_haskell//haskell:toolchain.bzl", "rules_haskell_toolchains")

rules_haskell_toolchains(version = "9.2.8")
rules_haskell_toolchains(version = "9.4.6")

load(
"@io_tweag_rules_nixpkgs//nixpkgs:nixpkgs.bzl",
Expand Down

0 comments on commit 4dd62ad

Please sign in to comment.