Skip to content

Update GHC and tools in Nix shell/GHA #1171

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

Merged
merged 3 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ jobs:
uses: input-output-hk/actions/haskell@latest
id: setup-haskell
with:
cabal-version: "3.10.1.0"
ghc-version: "9.6.5"
cabal-version: "3.12.1.0"
ghc-version: "9.6.6"

- name: Install base libraries
uses: input-output-hk/actions/base@latest
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ jobs:
strategy:
fail-fast: false
matrix:
ghc: ["8.10.7", "9.6.5", "9.8.2"]
ghc: ["8.10.7", "9.6.6", "9.8.2"]
variant: [default, no-thunks]
exclude:
- variant:
${{ (github.event_name == 'schedule' || inputs.nothunks) && 'default' || 'no-thunks' }}
env:
# Modify this value to "invalidate" the Cabal cache.
CABAL_CACHE_VERSION: "2024-01-29"
CABAL_CACHE_VERSION: "2024-07-04"

CABAL: "3.10.3.0"
CABAL: "3.12.1.0"

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -186,7 +186,7 @@ jobs:
if: |
github.event_name == 'push'
&& github.ref == 'refs/heads/main'
&& matrix.ghc=='9.6.5'
&& matrix.ghc=='9.6.6'
run: |
# need for latex, dvisvgm and standalone
sudo apt install texlive-latex-extra texlive-latex-base
Expand All @@ -201,7 +201,7 @@ jobs:
if: |
github.event_name == 'push'
&& github.ref == 'refs/heads/main'
&& matrix.ghc=='9.6.5'
&& matrix.ghc=='9.6.6'
uses: actions/upload-artifact@v4
with:
name: haddocks
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: 'Set up HLint'
uses: haskell-actions/hlint-setup@v2
with:
version: 3.6.1
version: 3.8

- name: 'Run HLint'
uses: haskell-actions/hlint-run@v2
Expand Down
2 changes: 2 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ packages:
tests: true
benchmarks: true

multi-repl: True

import: ./asserts.cabal

-- We need to disable bitvec's SIMD for now, as it breaks during cross compilation.
Expand Down
89 changes: 34 additions & 55 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
};
# for cabal-docspec
cabal-extras = {
url = "github:phadej/cabal-extras/cabal-docspec-0.0.0.20240414";
url = "github:phadej/cabal-extras/cabal-docspec-0.0.0.20240703";
flake = false;
};
gentle-introduction = {
Expand Down
2 changes: 1 addition & 1 deletion nix/haskell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ let
};
hsPkgs = haskell-nix.cabalProject {
src = ./..;
compiler-nix-name = "ghc965";
compiler-nix-name = "ghc966";
flake.variants = {
ghc810 = { compiler-nix-name = lib.mkForce "ghc8107"; };
ghc98 = { compiler-nix-name = lib.mkForce "ghc982"; };
Expand Down
3 changes: 1 addition & 2 deletions nix/shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ in
hsPkgs.shellFor {
nativeBuildInputs = [
pkgs.cabal
pkgs.cabal-multi-repl
pkgs.cabal-docspec
pkgs.fd
pkgs.nixpkgs-fmt
Expand All @@ -24,7 +23,7 @@ hsPkgs.shellFor {
# version as used in hsPkgs.
tools = {
haskell-language-server = {
src = inputs.haskellNix.inputs."hls-2.8";
src = inputs.haskellNix.inputs."hls-2.9";
configureArgs = "--disable-benchmarks --disable-tests";
};
};
Expand Down
28 changes: 3 additions & 25 deletions nix/tools.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ inputs: final: prev:

let
inherit (final) lib;
tool-index-state = "2024-05-31T00:00:00Z";
tool-index-state = "2024-07-04T00:00:00Z";
tool = name: version: other:
final.haskell-nix.tool final.hsPkgs.args.compiler-nix-name name ({
version = version;
Expand All @@ -12,29 +12,7 @@ in
{
inherit tool-index-state;

cabal = tool "cabal" "latest" { };

cabal-multi-repl = (final.haskell-nix.cabalProject {
# cabal master commit containing https://github.com/haskell/cabal/pull/8726
src = final.fetchFromGitHub {
owner = "haskell";
repo = "cabal";
rev = "adc283a0f06c7d24aeed67e69aca3d71c04010b3";
hash = "sha256-3K9WVR/tINK3PyGlXpypSpp1pguHTnolDruHNE+VvE4=";
};
index-state = tool-index-state;
inherit (final.hsPkgs.args) compiler-nix-name;
cabalProject = ''
packages: Cabal-syntax Cabal cabal-install-solver cabal-install
'';
configureArgs = "--disable-benchmarks --disable-tests";
modules = [{
packages.cabal-install.components.exes.cabal.postInstall = ''
mv $out/bin/cabal $out/bin/cabal-multi-repl
wrapProgram $out/bin/cabal-multi-repl --add-flags --enable-multi-repl
'';
}];
}).cabal-install.components.exes.cabal;
cabal = tool "cabal" "3.12.1.0" { };

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

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

cabal-gild = tool "cabal-gild" "1.3.1.2" { };
cabal-gild = tool "cabal-gild" "1.5.0.1" { };

haskellBuildUtils = prev.haskellBuildUtils.override {
inherit (final.hsPkgs.args) compiler-nix-name;
Expand Down
2 changes: 1 addition & 1 deletion ouroboros-consensus/ouroboros-consensus.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ common common-bench
-- We use this option to avoid skewed results due to changes in cache-line
-- alignment. See
-- https://github.com/Bodigrim/tasty-bench#comparison-against-baseline
if impl(ghc >= 8.6)
if impl(ghc >=8.6)
ghc-options: -fproc-alignment=64

library
Expand Down
2 changes: 1 addition & 1 deletion scripts/docs/haddocks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ GHC_VERSION=$(ghc --numeric-version)
if ! command -v cabal-docspec &> /dev/null
then
# cabal-docspec. Download binary
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
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
# this doesn't seem to exist in GH runners?
mkdir -p "$HOME"/.local/bin
xz -d < cabal-docspec.xz > "$HOME"/.local/bin/cabal-docspec
Expand Down