Skip to content

Commit a8f6325

Browse files
authored
Update GHC and tools in Nix shell/GHA (#1171)
- Update cabal-install to 3.12.1.0 - Update GHC to 9.6.6 - Update HLS to 2.9.0.0 - Update cabal-gild to 1.5.0.0 - Update cabal-docspec to 0.0.0.20240703 - Update hlint to 2.8.0 Also, we enable the new [`multi-repl` feature](https://well-typed.com/blog/2023/03/cabal-multi-unit/) by default. For example, you can now easily spawn a single `ghcid` session for all of Consensus via ``` ghcid --target all ``` Also, this enables the (experimental) `multipleComponents` session loading mode of HLS, which is promising to increase robustness (locally, I haven't gotten spurious "overlapping instance" errors for example). See eg emacs-lsp/lsp-haskell#184 or haskell/vscode-haskell#1077 how to enable that in your editor. Also see https://well-typed.com/blog/2024/07/hls-multi/.
2 parents a6de699 + 68eadd6 commit a8f6325

File tree

11 files changed

+52
-94
lines changed

11 files changed

+52
-94
lines changed

.github/workflows/checks.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ jobs:
9595
uses: input-output-hk/actions/haskell@latest
9696
id: setup-haskell
9797
with:
98-
cabal-version: "3.10.1.0"
99-
ghc-version: "9.6.5"
98+
cabal-version: "3.12.1.0"
99+
ghc-version: "9.6.6"
100100

101101
- name: Install base libraries
102102
uses: input-output-hk/actions/base@latest

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,16 @@ jobs:
2929
strategy:
3030
fail-fast: false
3131
matrix:
32-
ghc: ["8.10.7", "9.6.5", "9.8.2"]
32+
ghc: ["8.10.7", "9.6.6", "9.8.2"]
3333
variant: [default, no-thunks]
3434
exclude:
3535
- variant:
3636
${{ (github.event_name == 'schedule' || inputs.nothunks) && 'default' || 'no-thunks' }}
3737
env:
3838
# Modify this value to "invalidate" the Cabal cache.
39-
CABAL_CACHE_VERSION: "2024-01-29"
39+
CABAL_CACHE_VERSION: "2024-07-04"
4040

41-
CABAL: "3.10.3.0"
41+
CABAL: "3.12.1.0"
4242

4343
steps:
4444
- uses: actions/checkout@v4
@@ -186,7 +186,7 @@ jobs:
186186
if: |
187187
github.event_name == 'push'
188188
&& github.ref == 'refs/heads/main'
189-
&& matrix.ghc=='9.6.5'
189+
&& matrix.ghc=='9.6.6'
190190
run: |
191191
# need for latex, dvisvgm and standalone
192192
sudo apt install texlive-latex-extra texlive-latex-base
@@ -201,7 +201,7 @@ jobs:
201201
if: |
202202
github.event_name == 'push'
203203
&& github.ref == 'refs/heads/main'
204-
&& matrix.ghc=='9.6.5'
204+
&& matrix.ghc=='9.6.6'
205205
uses: actions/upload-artifact@v4
206206
with:
207207
name: haddocks

.github/workflows/hlint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: 'Set up HLint'
3030
uses: haskell-actions/hlint-setup@v2
3131
with:
32-
version: 3.6.1
32+
version: 3.8
3333

3434
- name: 'Run HLint'
3535
uses: haskell-actions/hlint-run@v2

cabal.project

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ packages:
3030
tests: true
3131
benchmarks: true
3232

33+
multi-repl: True
34+
3335
import: ./asserts.cabal
3436

3537
-- We need to disable bitvec's SIMD for now, as it breaks during cross compilation.

flake.lock

Lines changed: 34 additions & 55 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
};
3434
# for cabal-docspec
3535
cabal-extras = {
36-
url = "github:phadej/cabal-extras/cabal-docspec-0.0.0.20240414";
36+
url = "github:phadej/cabal-extras/cabal-docspec-0.0.0.20240703";
3737
flake = false;
3838
};
3939
gentle-introduction = {

nix/haskell.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ let
1414
};
1515
hsPkgs = haskell-nix.cabalProject {
1616
src = ./..;
17-
compiler-nix-name = "ghc965";
17+
compiler-nix-name = "ghc966";
1818
flake.variants = {
1919
ghc810 = { compiler-nix-name = lib.mkForce "ghc8107"; };
2020
ghc98 = { compiler-nix-name = lib.mkForce "ghc982"; };

nix/shell.nix

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ in
66
hsPkgs.shellFor {
77
nativeBuildInputs = [
88
pkgs.cabal
9-
pkgs.cabal-multi-repl
109
pkgs.cabal-docspec
1110
pkgs.fd
1211
pkgs.nixpkgs-fmt
@@ -24,7 +23,7 @@ hsPkgs.shellFor {
2423
# version as used in hsPkgs.
2524
tools = {
2625
haskell-language-server = {
27-
src = inputs.haskellNix.inputs."hls-2.8";
26+
src = inputs.haskellNix.inputs."hls-2.9";
2827
configureArgs = "--disable-benchmarks --disable-tests";
2928
};
3029
};

nix/tools.nix

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ inputs: final: prev:
22

33
let
44
inherit (final) lib;
5-
tool-index-state = "2024-05-31T00:00:00Z";
5+
tool-index-state = "2024-07-04T00:00:00Z";
66
tool = name: version: other:
77
final.haskell-nix.tool final.hsPkgs.args.compiler-nix-name name ({
88
version = version;
@@ -12,29 +12,7 @@ in
1212
{
1313
inherit tool-index-state;
1414

15-
cabal = tool "cabal" "latest" { };
16-
17-
cabal-multi-repl = (final.haskell-nix.cabalProject {
18-
# cabal master commit containing https://github.com/haskell/cabal/pull/8726
19-
src = final.fetchFromGitHub {
20-
owner = "haskell";
21-
repo = "cabal";
22-
rev = "adc283a0f06c7d24aeed67e69aca3d71c04010b3";
23-
hash = "sha256-3K9WVR/tINK3PyGlXpypSpp1pguHTnolDruHNE+VvE4=";
24-
};
25-
index-state = tool-index-state;
26-
inherit (final.hsPkgs.args) compiler-nix-name;
27-
cabalProject = ''
28-
packages: Cabal-syntax Cabal cabal-install-solver cabal-install
29-
'';
30-
configureArgs = "--disable-benchmarks --disable-tests";
31-
modules = [{
32-
packages.cabal-install.components.exes.cabal.postInstall = ''
33-
mv $out/bin/cabal $out/bin/cabal-multi-repl
34-
wrapProgram $out/bin/cabal-multi-repl --add-flags --enable-multi-repl
35-
'';
36-
}];
37-
}).cabal-install.components.exes.cabal;
15+
cabal = tool "cabal" "3.12.1.0" { };
3816

3917
cabal-docspec = tool "cabal-docspec" "git" {
4018
compiler-nix-name = "ghc98";
@@ -55,7 +33,7 @@ in
5533

5634
stylish-haskell = tool "stylish-haskell" "0.14.6.0" { };
5735

58-
cabal-gild = tool "cabal-gild" "1.3.1.2" { };
36+
cabal-gild = tool "cabal-gild" "1.5.0.1" { };
5937

6038
haskellBuildUtils = prev.haskellBuildUtils.override {
6139
inherit (final.hsPkgs.args) compiler-nix-name;

ouroboros-consensus/ouroboros-consensus.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ common common-bench
6161
-- We use this option to avoid skewed results due to changes in cache-line
6262
-- alignment. See
6363
-- https://github.com/Bodigrim/tasty-bench#comparison-against-baseline
64-
if impl(ghc >= 8.6)
64+
if impl(ghc >=8.6)
6565
ghc-options: -fproc-alignment=64
6666

6767
library

scripts/docs/haddocks.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ GHC_VERSION=$(ghc --numeric-version)
2525
if ! command -v cabal-docspec &> /dev/null
2626
then
2727
# cabal-docspec. Download binary
28-
curl -sL https://github.com/phadej/cabal-extras/releases/download/cabal-docspec-0.0.0.20240414/cabal-docspec-0.0.0.20240414-x86_64-linux.xz > cabal-docspec.xz
28+
curl -sL https://github.com/phadej/cabal-extras/releases/download/cabal-docspec-0.0.0.20240703/cabal-docspec-0.0.0.20240703-x86_64-linux.xz > cabal-docspec.xz
2929
# this doesn't seem to exist in GH runners?
3030
mkdir -p "$HOME"/.local/bin
3131
xz -d < cabal-docspec.xz > "$HOME"/.local/bin/cabal-docspec

0 commit comments

Comments
 (0)