Magnus pushed to branch wip/mangoiv/27817 at Glasgow Haskell Compiler / GHC

Commits:

3 changed files:

Changes:

  • .ghc-nix/flake.lock
    1
    +{
    
    2
    +  "nodes": {
    
    3
    +    "all-cabal-hashes": {
    
    4
    +      "flake": false,
    
    5
    +      "locked": {
    
    6
    +        "lastModified": 1764068599,
    
    7
    +        "narHash": "sha256-cqiypgQN/PtGGA6JqFZ5LM/TDqeWyTRICetqGeYJTwU=",
    
    8
    +        "owner": "commercialhaskell",
    
    9
    +        "repo": "all-cabal-hashes",
    
    10
    +        "rev": "74615195a38035ef480f946c73735d44fa5958fe",
    
    11
    +        "type": "github"
    
    12
    +      },
    
    13
    +      "original": {
    
    14
    +        "owner": "commercialhaskell",
    
    15
    +        "ref": "hackage",
    
    16
    +        "repo": "all-cabal-hashes",
    
    17
    +        "type": "github"
    
    18
    +      }
    
    19
    +    },
    
    20
    +    "flake-compat": {
    
    21
    +      "flake": false,
    
    22
    +      "locked": {
    
    23
    +        "lastModified": 1761588595,
    
    24
    +        "narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=",
    
    25
    +        "owner": "edolstra",
    
    26
    +        "repo": "flake-compat",
    
    27
    +        "rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5",
    
    28
    +        "type": "github"
    
    29
    +      },
    
    30
    +      "original": {
    
    31
    +        "owner": "edolstra",
    
    32
    +        "repo": "flake-compat",
    
    33
    +        "type": "github"
    
    34
    +      }
    
    35
    +    },
    
    36
    +    "flake-utils": {
    
    37
    +      "inputs": {
    
    38
    +        "systems": "systems"
    
    39
    +      },
    
    40
    +      "locked": {
    
    41
    +        "lastModified": 1731533236,
    
    42
    +        "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
    
    43
    +        "owner": "numtide",
    
    44
    +        "repo": "flake-utils",
    
    45
    +        "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
    
    46
    +        "type": "github"
    
    47
    +      },
    
    48
    +      "original": {
    
    49
    +        "owner": "numtide",
    
    50
    +        "repo": "flake-utils",
    
    51
    +        "type": "github"
    
    52
    +      }
    
    53
    +    },
    
    54
    +    "ghc-nix": {
    
    55
    +      "inputs": {
    
    56
    +        "all-cabal-hashes": "all-cabal-hashes",
    
    57
    +        "flake-compat": "flake-compat",
    
    58
    +        "ghc-wasm-meta": "ghc-wasm-meta",
    
    59
    +        "nixpkgs": "nixpkgs_2",
    
    60
    +        "pre-commit-hooks": "pre-commit-hooks"
    
    61
    +      },
    
    62
    +      "locked": {
    
    63
    +        "host": "gitlab.haskell.org",
    
    64
    +        "lastModified": 1780840069,
    
    65
    +        "narHash": "sha256-kqpfNTSUdiAm42PX0kZH0RMWKNraOlTU14SuX1i441Q=",
    
    66
    +        "owner": "ghc",
    
    67
    +        "repo": "ghc.nix",
    
    68
    +        "rev": "cf6309aa107e557dd913184d09d98c732d6f3404",
    
    69
    +        "type": "gitlab"
    
    70
    +      },
    
    71
    +      "original": {
    
    72
    +        "host": "gitlab.haskell.org",
    
    73
    +        "owner": "ghc",
    
    74
    +        "repo": "ghc.nix",
    
    75
    +        "type": "gitlab"
    
    76
    +      }
    
    77
    +    },
    
    78
    +    "ghc-wasm-meta": {
    
    79
    +      "inputs": {
    
    80
    +        "flake-utils": "flake-utils",
    
    81
    +        "nixpkgs": "nixpkgs"
    
    82
    +      },
    
    83
    +      "locked": {
    
    84
    +        "host": "gitlab.haskell.org",
    
    85
    +        "lastModified": 1771125696,
    
    86
    +        "narHash": "sha256-+90XoM7PUfgD7383ki/aHC0cLKS32XVnYgI672pegcY=",
    
    87
    +        "owner": "ghc",
    
    88
    +        "repo": "ghc-wasm-meta",
    
    89
    +        "rev": "4e1f900e9933966634bc2e29dbeb81d09ce36727",
    
    90
    +        "type": "gitlab"
    
    91
    +      },
    
    92
    +      "original": {
    
    93
    +        "host": "gitlab.haskell.org",
    
    94
    +        "owner": "ghc",
    
    95
    +        "repo": "ghc-wasm-meta",
    
    96
    +        "type": "gitlab"
    
    97
    +      }
    
    98
    +    },
    
    99
    +    "gitignore": {
    
    100
    +      "inputs": {
    
    101
    +        "nixpkgs": [
    
    102
    +          "ghc-nix",
    
    103
    +          "pre-commit-hooks",
    
    104
    +          "nixpkgs"
    
    105
    +        ]
    
    106
    +      },
    
    107
    +      "locked": {
    
    108
    +        "lastModified": 1709087332,
    
    109
    +        "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
    
    110
    +        "owner": "hercules-ci",
    
    111
    +        "repo": "gitignore.nix",
    
    112
    +        "rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
    
    113
    +        "type": "github"
    
    114
    +      },
    
    115
    +      "original": {
    
    116
    +        "owner": "hercules-ci",
    
    117
    +        "repo": "gitignore.nix",
    
    118
    +        "type": "github"
    
    119
    +      }
    
    120
    +    },
    
    121
    +    "nixpkgs": {
    
    122
    +      "locked": {
    
    123
    +        "lastModified": 1770770419,
    
    124
    +        "narHash": "sha256-iKZMkr6Cm9JzWlRYW/VPoL0A9jVKtZYiU4zSrVeetIs=",
    
    125
    +        "owner": "NixOS",
    
    126
    +        "repo": "nixpkgs",
    
    127
    +        "rev": "6c5e707c6b5339359a9a9e215c5e66d6d802fd7a",
    
    128
    +        "type": "github"
    
    129
    +      },
    
    130
    +      "original": {
    
    131
    +        "owner": "NixOS",
    
    132
    +        "ref": "nixos-25.11",
    
    133
    +        "repo": "nixpkgs",
    
    134
    +        "type": "github"
    
    135
    +      }
    
    136
    +    },
    
    137
    +    "nixpkgs_2": {
    
    138
    +      "locked": {
    
    139
    +        "lastModified": 1769900590,
    
    140
    +        "narHash": "sha256-I7Lmgj3owOTBGuauy9FL6qdpeK2umDoe07lM4V+PnyA=",
    
    141
    +        "owner": "nixos",
    
    142
    +        "repo": "nixpkgs",
    
    143
    +        "rev": "41e216c0ca66c83b12ab7a98cc326b5db01db646",
    
    144
    +        "type": "github"
    
    145
    +      },
    
    146
    +      "original": {
    
    147
    +        "owner": "nixos",
    
    148
    +        "ref": "nixos-25.11",
    
    149
    +        "repo": "nixpkgs",
    
    150
    +        "type": "github"
    
    151
    +      }
    
    152
    +    },
    
    153
    +    "pre-commit-hooks": {
    
    154
    +      "inputs": {
    
    155
    +        "flake-compat": [
    
    156
    +          "ghc-nix",
    
    157
    +          "flake-compat"
    
    158
    +        ],
    
    159
    +        "gitignore": "gitignore",
    
    160
    +        "nixpkgs": [
    
    161
    +          "ghc-nix",
    
    162
    +          "nixpkgs"
    
    163
    +        ]
    
    164
    +      },
    
    165
    +      "locked": {
    
    166
    +        "lastModified": 1763988335,
    
    167
    +        "narHash": "sha256-QlcnByMc8KBjpU37rbq5iP7Cp97HvjRP0ucfdh+M4Qc=",
    
    168
    +        "owner": "cachix",
    
    169
    +        "repo": "pre-commit-hooks.nix",
    
    170
    +        "rev": "50b9238891e388c9fdc6a5c49e49c42533a1b5ce",
    
    171
    +        "type": "github"
    
    172
    +      },
    
    173
    +      "original": {
    
    174
    +        "owner": "cachix",
    
    175
    +        "repo": "pre-commit-hooks.nix",
    
    176
    +        "type": "github"
    
    177
    +      }
    
    178
    +    },
    
    179
    +    "root": {
    
    180
    +      "inputs": {
    
    181
    +        "ghc-nix": "ghc-nix"
    
    182
    +      }
    
    183
    +    },
    
    184
    +    "systems": {
    
    185
    +      "locked": {
    
    186
    +        "lastModified": 1681028828,
    
    187
    +        "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
    
    188
    +        "owner": "nix-systems",
    
    189
    +        "repo": "default",
    
    190
    +        "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
    
    191
    +        "type": "github"
    
    192
    +      },
    
    193
    +      "original": {
    
    194
    +        "owner": "nix-systems",
    
    195
    +        "repo": "default",
    
    196
    +        "type": "github"
    
    197
    +      }
    
    198
    +    }
    
    199
    +  },
    
    200
    +  "root": "root",
    
    201
    +  "version": 7
    
    202
    +}

  • .ghc-nix/flake.nix
    1
    +{
    
    2
    +  description = "adhoc ghc.nix devShell flake";
    
    3
    +  nixConfig = {
    
    4
    +    bash-prompt = "\\[\\e[34;1m\\]ghc.nix ~ \\[\\e[0m\\]";
    
    5
    +  };
    
    6
    +  inputs.ghc-nix.url = "gitlab:ghc/ghc.nix?host=gitlab.haskell.org";
    
    7
    +  # In case you need to fork ghc.nix:
    
    8
    +  # inputs.ghc-nix.url = "gitlab:ghc/ghc.nix/yourbranch?host=gitlab.haskell.org";
    
    9
    +  outputs = { ghc-nix, ... }:
    
    10
    +    let
    
    11
    +      userSettings = {
    
    12
    +        # put your settings here
    
    13
    +        withIde = true;
    
    14
    +      };
    
    15
    +    in
    
    16
    +    {
    
    17
    +      devShells = ghc-nix.lib.perSystem (system: { default = ghc-nix.legacy ({ inherit system; } // userSettings); });
    
    18
    +    };
    
    19
    +}

  • .gitlab-ci.yml
    ... ... @@ -137,7 +137,8 @@ workflow:
    137 137
     .lint:
    
    138 138
       stage: tool-lint
    
    139 139
       tags:
    
    140
    -    - lint
    
    140
    +    - lint-anyarch
    
    141
    +  image: debian:13
    
    141 142
       before_script:
    
    142 143
         # Allow Git to read from the runner-owned checkout. This is needed
    
    143 144
         # for example by the lint-author job.
    
    ... ... @@ -146,6 +147,20 @@ workflow:
    146 147
         - *drafts-can-fail-lint
    
    147 148
         - when: always
    
    148 149
     
    
    150
    +# linting but we need a boot toolchain
    
    151
    +.lint-ghc-toolchain:
    
    152
    +  extends: .lint
    
    153
    +  before_script:
    
    154
    +    - apt update
    
    155
    +    - apt install -qy ghc cabal-install build-essential curl libffi-dev libffi8 libgmp-dev libgmp10 libncurses-dev libncurses6 libtinfo6 pkg-config python3 cmake git happy alex autoconf automake python3 libgmp-dev libnuma-dev libncurses-dev
    
    156
    +
    
    157
    +# linting but we need python
    
    158
    +.lint-python:
    
    159
    +  extends: .lint
    
    160
    +  before_script:
    
    161
    +    apt update
    
    162
    +    apt install -qy python3 mypy shellcheck
    
    163
    +
    
    149 164
     .nightly: &nightly
    
    150 165
       variables:
    
    151 166
         XZ_OPT: "-9"
    
    ... ... @@ -217,11 +232,11 @@ not-interruptible:
    217 232
       stage: not-interruptible
    
    218 233
       script: "true"
    
    219 234
       interruptible: false
    
    220
    -  image: "debian:13"
    
    235
    +  image: debian:13
    
    221 236
       variables:
    
    222 237
         GIT_STRATEGY: none
    
    223 238
       tags:
    
    224
    -    - lint
    
    239
    +    - lint-anyarch
    
    225 240
       rules:
    
    226 241
     #   - if: '$CI_COMMIT_BRANCH == "master"'
    
    227 242
     #      when: always
    
    ... ... @@ -242,7 +257,6 @@ include: '.gitlab/jobs.yaml'
    242 257
     
    
    243 258
     ghc-linters:
    
    244 259
       stage: tool-lint
    
    245
    -  image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb13:$DOCKER_REV"
    
    246 260
       extends: .lint-params
    
    247 261
       variables:
    
    248 262
         BUILD_FLAVOUR: default
    
    ... ... @@ -258,7 +272,6 @@ ghc-linters:
    258 272
     # Skipped if the MR has the ~"no-changelog" label.
    
    259 273
     lint-changelog:
    
    260 274
       stage: tool-lint
    
    261
    -  image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb13:$DOCKER_REV"
    
    262 275
       extends: .lint
    
    263 276
       variables:
    
    264 277
         CHANGELOG_EXPECT_MR: "$CI_MERGE_REQUEST_IID"
    
    ... ... @@ -279,7 +292,6 @@ lint-changelog:
    279 292
     
    
    280 293
     # Run mypy Python typechecker on linter scripts.
    
    281 294
     lint-linters:
    
    282
    -  image: "registry.gitlab.haskell.org/ghc/ci-images/linters:$DOCKER_REV"
    
    283 295
       extends: .lint
    
    284 296
       variables:
    
    285 297
         GIT_DEPTH: 1
    
    ... ... @@ -293,7 +305,6 @@ lint-linters:
    293 305
     
    
    294 306
     # Check that .T files all parse by listing broken tests.
    
    295 307
     lint-testsuite:
    
    296
    -  image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb13:$DOCKER_REV"
    
    297 308
       extends: .lint
    
    298 309
       variables:
    
    299 310
         GIT_DEPTH: 1
    
    ... ... @@ -307,7 +318,6 @@ lint-testsuite:
    307 318
     
    
    308 319
     # Run mypy Python typechecker on testsuite driver
    
    309 320
     typecheck-testsuite:
    
    310
    -  image: "registry.gitlab.haskell.org/ghc/ci-images/linters:$DOCKER_REV"
    
    311 321
       extends: .lint
    
    312 322
       variables:
    
    313 323
         GIT_DEPTH: 1
    
    ... ... @@ -323,7 +333,6 @@ typecheck-testsuite:
    323 333
     # accommodate, e.g., haddock changes not yet upstream) but not on `master` or
    
    324 334
     # Marge jobs.
    
    325 335
     .lint-submods:
    
    326
    -  image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb13:$DOCKER_REV"
    
    327 336
       extends: .lint-params
    
    328 337
       variables:
    
    329 338
         BUILD_FLAVOUR: default
    
    ... ... @@ -341,7 +350,6 @@ typecheck-testsuite:
    341 350
     # Check that commits in an MR were not authored with the identity that CI uses
    
    342 351
     # when it needs to create commits itself. This only needs Git history.
    
    343 352
     lint-author:
    
    344
    -  image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb13:$DOCKER_REV"
    
    345 353
       extends: .lint
    
    346 354
       variables:
    
    347 355
         GIT_SUBMODULE_STRATEGY: none
    
    ... ... @@ -425,8 +433,7 @@ lint-submods-branch:
    425 433
     
    
    426 434
     .lint-params:
    
    427 435
       needs: []
    
    428
    -  image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb13:$DOCKER_REV"
    
    429
    -  extends: .lint
    
    436
    +  extends: .lint-ghc-toolchain
    
    430 437
       before_script:
    
    431 438
         - export PATH="/opt/toolchain/bin:$PATH"
    
    432 439
         # workaround for docker permissions
    
    ... ... @@ -448,18 +455,16 @@ lint-submods-branch:
    448 455
     
    
    449 456
     hadrian-ghc-in-ghci:
    
    450 457
       stage: quick-build
    
    458
    +  extends: .lint-ghc-toolchain
    
    451 459
       needs:
    
    452 460
         - job: lint-linters
    
    453 461
         - job: lint-submods
    
    454 462
           optional: true
    
    455
    -  image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb13:$DOCKER_REV"
    
    456 463
       before_script:
    
    457 464
         # workaround for docker permissions
    
    458 465
         - sudo chown ghc:ghc -R .
    
    459 466
       variables:
    
    460 467
         GHC_FLAGS: -Werror -Wwarn=unused-imports
    
    461
    -  tags:
    
    462
    -    - lint
    
    463 468
       script:
    
    464 469
         - git clean -xdf && git submodule foreach git clean -xdf
    
    465 470
         - . .gitlab/ci.sh setup