Skip to content

Commit 7305604

Browse files
committed
Merge remote-tracking branch 'origin/master' into andrea/test-backpack
2 parents a70d879 + 463e08c commit 7305604

File tree

1,042 files changed

+34390
-41375
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,042 files changed

+34390
-41375
lines changed

.github/workflows/pipeline.yml

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "Run tests with ghc8107"
1+
name: "Run tests with ghc967"
22

33
on:
44
pull_request:
@@ -22,120 +22,120 @@ jobs:
2222
runs-on: [self-hosted, linux]
2323
steps:
2424
- uses: actions/checkout@v4
25-
- name: "Run tests with ghc8107: Running the nix-build tests..."
26-
run: "./test/tests.sh ghc8107 nix-build"
25+
- name: "Run tests with ghc967: Running the nix-build tests..."
26+
run: "./test/tests.sh ghc967 nix-build"
2727

2828
unit-tests:
2929
runs-on: [self-hosted, linux]
3030
steps:
3131
- uses: actions/checkout@v4
32-
- name: "Run tests with ghc8107: Running the unit tests..."
33-
run: "./test/tests.sh ghc8107 unit-tests"
32+
- name: "Run tests with ghc967: Running the unit tests..."
33+
run: "./test/tests.sh ghc967 unit-tests"
3434

3535
runghc:
3636
runs-on: [self-hosted, linux]
3737
steps:
3838
- uses: actions/checkout@v4
39-
- name: "Run tests with ghc8107: Checking that a nix-shell works for runghc..."
40-
run: "./test/tests.sh ghc8107 runghc"
39+
- name: "Run tests with ghc967: Checking that a nix-shell works for runghc..."
40+
run: "./test/tests.sh ghc967 runghc"
4141

4242
cabal:
4343
runs-on: [self-hosted, linux]
4444
steps:
4545
- uses: actions/checkout@v4
46-
- name: "Run tests with ghc8107: Checking that a nix-shell works for cabal..."
47-
run: "./test/tests.sh ghc8107 cabal"
46+
- name: "Run tests with ghc967: Checking that a nix-shell works for cabal..."
47+
run: "./test/tests.sh ghc967 cabal"
4848

4949
cabal-doExactConfig:
5050
runs-on: [self-hosted, linux]
5151
steps:
5252
- uses: actions/checkout@v4
53-
- name: "Run tests with ghc8107: Checking that a nix-shell works for cabal (doExactConfig component)..."
54-
run: "./test/tests.sh ghc8107 cabal-doExactConfig"
53+
- name: "Run tests with ghc967: Checking that a nix-shell works for cabal (doExactConfig component)..."
54+
run: "./test/tests.sh ghc967 cabal-doExactConfig"
5555

5656
tests-benchmarks:
5757
runs-on: [self-hosted, linux]
5858
steps:
5959
- uses: actions/checkout@v4
60-
- name: "Run tests with ghc8107: Checking that a nix-shell works for a project with test-suite build-tools and benchmarks..."
61-
run: "./test/tests.sh ghc8107 tests-benchmarks"
60+
- name: "Run tests with ghc967: Checking that a nix-shell works for a project with test-suite build-tools and benchmarks..."
61+
run: "./test/tests.sh ghc967 tests-benchmarks"
6262

6363
multi-target:
6464
runs-on: [self-hosted, linux]
6565
steps:
6666
- uses: actions/checkout@v4
67-
- name: "Run tests with ghc8107: Checking that a nix-shell works for a multi-target project..."
68-
run: "./test/tests.sh ghc8107 multi-target"
67+
- name: "Run tests with ghc967: Checking that a nix-shell works for a multi-target project..."
68+
run: "./test/tests.sh ghc967 multi-target"
6969

7070
shellFor-single-package:
7171
runs-on: [self-hosted, linux]
7272
steps:
7373
- uses: actions/checkout@v4
74-
- name: "Run tests with ghc8107: Checking shellFor works for a cabal project, multiple packages..."
75-
run: "./test/tests.sh ghc8107 shellFor-single-package"
74+
- name: "Run tests with ghc967: Checking shellFor works for a cabal project, multiple packages..."
75+
run: "./test/tests.sh ghc967 shellFor-single-package"
7676

7777
shellFor-multiple-package:
7878
runs-on: [self-hosted, linux]
7979
steps:
8080
- uses: actions/checkout@v4
81-
- name: "Run tests with ghc8107: Checking shellFor works for a cabal project, single package...y"
82-
run: "./test/tests.sh ghc8107 shellFor-multiple-package"
81+
- name: "Run tests with ghc967: Checking shellFor works for a cabal project, single package...y"
82+
run: "./test/tests.sh ghc967 shellFor-multiple-package"
8383

8484
shellFor-hoogle:
8585
runs-on: [self-hosted, linux]
8686
steps:
8787
- uses: actions/checkout@v4
88-
- name: "Run tests with ghc8107: Checking shellFor works for a cabal project, single package..."
89-
run: "./test/tests.sh ghc8107 shellFor-hoogle"
88+
- name: "Run tests with ghc967: Checking shellFor works for a cabal project, single package..."
89+
run: "./test/tests.sh ghc967 shellFor-hoogle"
9090

9191
shellFor-not-depends:
9292
runs-on: [self-hosted, linux]
9393
steps:
9494
- uses: actions/checkout@v4
95-
- name: "Run tests with ghc8107: Checking shellFor does not depend on given packages...y"
96-
run: "./test/tests.sh ghc8107 shellFor-not-depends"
95+
- name: "Run tests with ghc967: Checking shellFor does not depend on given packages...y"
96+
run: "./test/tests.sh ghc967 shellFor-not-depends"
9797

9898
maintainer-scripts:
9999
runs-on: [self-hosted, linux]
100100
steps:
101101
- uses: actions/checkout@v4
102-
- name: "Run tests with ghc8107: Checking the maintainer scripts...y"
103-
run: "./test/tests.sh ghc8107 maintainer-scripts"
102+
- name: "Run tests with ghc967: Checking the maintainer scripts...y"
103+
run: "./test/tests.sh ghc967 maintainer-scripts"
104104

105105
plan-extra-hackages:
106106
runs-on: [self-hosted, linux]
107107
steps:
108108
- uses: actions/checkout@v4
109-
- name: "Run tests with ghc8107: Checking that plan construction works with extra Hackages..."
110-
run: "./test/tests.sh ghc8107 plan-extra-hackages"
109+
- name: "Run tests with ghc967: Checking that plan construction works with extra Hackages..."
110+
run: "./test/tests.sh ghc967 plan-extra-hackages"
111111

112112
build-extra-hackages:
113113
runs-on: [self-hosted, linux]
114114
steps:
115115
- uses: actions/checkout@v4
116-
- name: "Run tests with ghc8107: Checking that package with extra Hackages can be build..."
117-
run: "./test/tests.sh ghc8107 build-extra-hackages"
116+
- name: "Run tests with ghc967: Checking that package with extra Hackages can be build..."
117+
run: "./test/tests.sh ghc967 build-extra-hackages"
118118

119119
hix:
120120
runs-on: [self-hosted, linux]
121121
steps:
122122
- uses: actions/checkout@v4
123-
- name: "Run tests with ghc8107: End-2-end test of hix project initialization and flakes development shell ..."
124-
run: "./test/tests.sh ghc8107 hix"
123+
- name: "Run tests with ghc967: End-2-end test of hix project initialization and flakes development shell ..."
124+
run: "./test/tests.sh ghc967 hix"
125125

126126
# template:
127127
# runs-on: [self-hosted, linux]
128128
# steps:
129129
# - uses: actions/checkout@v4
130-
# - name: "Run tests with ghc8107: End-2-end test of hix project initialization and flakes development shell ..."
131-
# run: "./test/tests.sh ghc8107 template"
130+
# - name: "Run tests with ghc967: End-2-end test of hix project initialization and flakes development shell ..."
131+
# run: "./test/tests.sh ghc967 template"
132132

133133
docs:
134134
runs-on: [self-hosted, linux]
135135
steps:
136136
- uses: actions/checkout@v4
137137
- name: "Test examples in documentation ..."
138-
run: "./test/tests.sh ghc8107 docs"
138+
run: "./test/tests.sh ghc967 docs"
139139

140140
hydra-ifdLevel-0-and-1:
141141
runs-on: [self-hosted, linux]
@@ -178,9 +178,9 @@ jobs:
178178
runs-on: [self-hosted, linux]
179179
steps:
180180
- uses: actions/checkout@v4
181-
- name: "Check closure size with ghc8107"
181+
- name: "Check closure size with ghc967"
182182
run: |
183-
nix-build build.nix -A maintainer-scripts.check-closure-size --argstr compiler-nix-name ghc8107 -o check-closure-size.sh
183+
nix-build build.nix -A maintainer-scripts.check-closure-size --argstr compiler-nix-name ghc967 -o check-closure-size.sh
184184
echo "+++ Closure size (MB)"
185185
./check-closure-size.sh
186186
@@ -208,7 +208,7 @@ jobs:
208208
- uses: actions/checkout@v4
209209
- name: "Make sure non store paths like can be used as src"
210210
run: |
211-
nix-build build.nix -A maintainer-scripts.check-path-support --argstr compiler-nix-name ghc8107 -o check-path-support.sh
211+
nix-build build.nix -A maintainer-scripts.check-path-support --argstr compiler-nix-name ghc967 -o check-path-support.sh
212212
./check-path-support.sh
213213
214214
haskell-nix-roots-do-not-require-IFDs:
@@ -218,19 +218,19 @@ jobs:
218218
- name: "Check that the haskell.nix roots do not require IFDs"
219219
run: nix build .#roots.x86_64-linux --accept-flake-config --option allow-import-from-derivation false
220220

221-
hydra-without-remote-builders-ghc8107:
221+
hydra-without-remote-builders-ghc967:
222222
runs-on: [self-hosted, linux]
223223
steps:
224224
- uses: actions/checkout@v4
225-
- name: "Check that evaluation of hydra jobs works without using remote builders for GHC 8.10.7"
226-
run: nix path-info --derivation .#requiredJobs.x86_64-darwin.required-unstable-ghc8107-native --show-trace --builders ''
225+
- name: "Check that evaluation of hydra jobs works without using remote builders for GHC 9.6.7"
226+
run: nix path-info --derivation .#requiredJobs.x86_64-darwin.required-unstable-ghc967-native --show-trace --builders ''
227227

228-
hydra-without-remote-builders-ghc9101:
228+
hydra-without-remote-builders-ghc9102:
229229
runs-on: [self-hosted, linux]
230230
steps:
231231
- uses: actions/checkout@v4
232-
- name: "Check that evaluation of hydra jobs works without using remote builders for GHC 9.10.1"
233-
run: nix path-info --derivation .#requiredJobs.x86_64-darwin.required-unstable-ghc9101-native --show-trace --builders ''
232+
- name: "Check that evaluation of hydra jobs works without using remote builders for GHC 9.10.2"
233+
run: nix path-info --derivation .#requiredJobs.x86_64-darwin.required-unstable-ghc9102-native --show-trace --builders ''
234234

235235
hix-cabal:
236236
runs-on: [self-hosted, linux]

.github/workflows/update-docs.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Updload Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
env:
9+
GH_TOKEN: ${{ github.token }}
10+
11+
jobs:
12+
upload-docs:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Install Nix with good defaults
20+
uses: input-output-hk/install-nix-action@v20
21+
with:
22+
extra_nix_config: |
23+
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= loony-tools:pr9m4BkM/5/eSTZlkQyRt57Jz7OMBxNSUiMC4FkcNfk=
24+
substituters = https://cache.nixos.org/ https://cache.iog.io/ https://cache.zw3rk.com
25+
nix_path: nixpkgs=channel:nixos-unstable
26+
27+
- name: Update docs
28+
run: |
29+
nix-build build.nix -A maintainer-scripts.update-docs -o update-docs.sh
30+
./update-docs.sh
31+
32+
- name: Upload docs
33+
run: |
34+
git config --global user.name 'Auto Update Bot'
35+
git config --global user.email '[email protected]'
36+
git push origin gh-pages

.github/workflows/updates.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
- name: "Update pins"
2020
run: |
2121
nix flake update hackage
22+
nix flake update hackage-for-stackage
2223
nix flake update stackage
2324
- name: Commit and push changes
2425
run: |

.github/workflows/upload-artifacts.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
- name: Wait for nix-tools meta job
4040
uses: input-output-hk/actions/wait-for-hydra@angerman/support-prs
4141
with:
42-
status: 'ci/hydra-build:nix-tools'
42+
check: 'nix-tools'
4343

4444
- name: "Pull nix-tools"
4545
run: |

build.nix

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@
66
, nixpkgsArgs ? haskellNix.nixpkgsArgs
77
, pkgs ? import nixpkgs nixpkgsArgs
88
, evalPackages ? import nixpkgs nixpkgsArgs
9-
# This version is used to make our GitHub Action runners happy
10-
# Using `nixpkgs-unstable` currently results in:
11-
# version `GLIBCXX_3.4.30' not found
12-
, nixpkgsForGitHubAction ? haskellNix.sources.nixpkgs-2211
13-
, pkgsForGitHubAction ? import nixpkgsForGitHubAction (nixpkgsArgs // { inherit (pkgs) system; })
149
, ifdLevel ? 1000
1510
, compiler-nix-name ? throw "No `compiler-nix-name` passed to build.nix"
1611
, haskellNix ? (import ./default.nix {})
@@ -28,7 +23,7 @@ in rec {
2823
pkgs.recurseIntoAttrs ({
2924
cabal-latest = tool compiler-nix-name "cabal" ({
3025
inherit evalPackages;
31-
} // pkgs.lib.optionalAttrs (ghcFromTo "9.10" "9.12") {
26+
} // pkgs.lib.optionalAttrs (ghcFromTo "9.13" "9.14") {
3227
cabalProjectLocal = builtins.readFile ./test/cabal.project.local;
3328
});
3429
} // pkgs.lib.optionalAttrs (__compareVersions haskell.compiler.${compiler-nix-name}.version "9.8" < 0) {
@@ -62,10 +57,10 @@ in rec {
6257
inherit evalPackages;
6358
src = pkgs.haskell-nix.sources."hls-2.2";
6459
};
65-
} // pkgs.lib.optionalAttrs (ghcFromTo "9.0" "9.11") {
66-
"hls-29" = tool compiler-nix-name "haskell-language-server" {
60+
} // pkgs.lib.optionalAttrs (ghcFromTo "9.0" "9.10.2") {
61+
"hls" = tool compiler-nix-name "haskell-language-server" {
6762
inherit evalPackages;
68-
src = pkgs.haskell-nix.sources."hls-2.9";
63+
src = pkgs.haskell-nix.sources."hls-2.10";
6964
};
7065
})
7166
);
@@ -77,14 +72,14 @@ in rec {
7772
maintainer-scripts = pkgs.dontRecurseIntoAttrs {
7873
update-hackage = import ./scripts/update-hackage.nix {
7974
inherit (pkgs) stdenv lib writeScript coreutils glibc git
80-
openssh nixFlakes gawk bash curl findutils;
75+
openssh nixVersions gawk bash curl findutils;
8176
# Update scripts use the internal nix-tools (compiled with a fixed GHC version)
8277
nix-tools = haskell.nix-tools-unchecked;
8378
inherit (haskell) update-index-state-hashes cabal-issue-8352-workaround;
8479
};
8580
update-stackage = haskell.callPackage ./scripts/update-stackage.nix {
8681
inherit (pkgs) stdenv lib writeScript coreutils glibc git
87-
openssh nixFlakes gawk bash curl findutils;
82+
openssh nixVersions gawk bash curl findutils;
8883
# Update scripts use the internal nix-tools (compiled with a fixed GHC version)
8984
nix-tools = haskell.nix-tools-unchecked;
9085
inherit (haskell) cabal-issue-8352-workaround;
@@ -98,7 +93,7 @@ in rec {
9893
nix-tools = haskell.nix-tools-unchecked; # includes cabal-install and default-setup
9994
};
10095
check-materialization-concurrency = pkgs.buildPackages.callPackage ./scripts/check-materialization-concurrency/check.nix {};
101-
check-path-support = pkgsForGitHubAction.buildPackages.callPackage ./scripts/check-path-support.nix {
96+
check-path-support = pkgs.buildPackages.callPackage ./scripts/check-path-support.nix {
10297
inherit compiler-nix-name;
10398
};
10499
};

builder/comp-builder.nix

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,9 @@ let
197197
"--with-gcc=${pkgsBuildBuild.emscripten}/bin/emcc"
198198
"--with-ld=${pkgsBuildBuild.emscripten}/bin/emcc"
199199
]
200+
++ lib.optionals (stdenv.hostPlatform.isGhcjs && stdenv.buildPlatform.isDarwin) [
201+
"--ar-options=--format=gnu" # Avoid `--format=darwin` it can cause `section too large` errors
202+
]
200203
++ [ # other flags
201204
(disableFeature dontStrip "executable-stripping")
202205
(disableFeature dontStrip "library-stripping")
@@ -206,7 +209,15 @@ let
206209
(enableFeature enableShared "shared")
207210
(enableFeature enableExecutableDynamic "executable-dynamic")
208211
(enableFeature doCoverage "coverage")
209-
(enableFeature (enableLibraryForGhci && !stdenv.hostPlatform.isGhcjs) "library-for-ghci")
212+
# For Android (or really anything that uses lld), -r will silently drop
213+
# "lazy" symbols. Those are leaf symbols with no referenes. This however
214+
# does not work when loading the objects into the linker, because then we
215+
# occationally miss symbols when subsequent libraries depending on the one
216+
# that dropped the symbol are loaded. bfd and lld support --whole-archive
217+
# lld -r --whole-archive ... will _not_ drop lazy symbols. However the
218+
# --whole-archive flag needs to come _before_ the objects, it's applied in
219+
# sequence. The proper fix is thusly to add --while-archive to Cabal.
220+
(enableFeature (enableLibraryForGhci && !stdenv.hostPlatform.isGhcjs && !stdenv.hostPlatform.isAndroid) "library-for-ghci")
210221
] ++ lib.optionals (stdenv.hostPlatform.isMusl && (haskellLib.isExecutableType componentId)) [
211222
# These flags will make sure the resulting executable is statically linked.
212223
# If it uses other libraries it may be necessary for to add more
@@ -374,8 +385,8 @@ let
374385
inherit (package.identifier) version;
375386
nativeBuildInputs = [shellWrappers.drv] ++ attrs.nativeBuildInputs;
376387
});
377-
profiled = self (drvArgs // { enableLibraryProfiling = true; });
378-
dwarf = self (drvArgs // { enableDWARF = true; });
388+
profiled = lib.makeOverridable self (drvArgs // { enableLibraryProfiling = true; });
389+
dwarf = lib.makeOverridable self (drvArgs // { enableDWARF = true; });
379390
} // lib.optionalAttrs (haskellLib.isLibrary componentId || haskellLib.isTest componentId) ({
380391
inherit haddock;
381392
inherit (haddock) haddockDir; # This is null if `doHaddock = false`
@@ -583,7 +594,6 @@ let
583594
(''
584595
if id=$(${target-pkg-and-db} field "z-${package.identifier.name}-z-*" id --simple-output); then
585596
name=$(${target-pkg-and-db} field "z-${package.identifier.name}-z-*" name --simple-output)
586-
echo "--dependency=''${name#z-${package.identifier.name}-z-}=$id" >> $out/exactDep/configure-flags
587597
echo "package-id $id" >> $out/envDep
588598
''
589599
# Allow `package-name:sublib-name` to work in `build-depends`

builder/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ let
6868
let
6969
haskellPackages = {
7070
# For musl we can use haddock from the buildGHC
71-
ghc = if stdenv.hostPlatform.isLinux && stdenv.targetPlatform.isMusl && !haskellLib.isNativeMusl
71+
ghc = if stdenv.targetPlatform.isMusl
7272
then ghc.buildGHC
7373
else ghc;
7474
inherit packages hoogle;

0 commit comments

Comments
 (0)