Magnus pushed to branch ghc-9.12 at Glasgow Haskell Compiler / GHC

Commits:

7 changed files:

Changes:

  • .gitlab/rel_eng/fetch-gitlab-artifacts/fetch_gitlab.py
    ... ... @@ -3,6 +3,7 @@ from pathlib import Path
    3 3
     import subprocess
    
    4 4
     import gitlab
    
    5 5
     import json
    
    6
    +import traceback
    
    6 7
     
    
    7 8
     logging.basicConfig(level=logging.INFO)
    
    8 9
     
    
    ... ... @@ -154,6 +155,7 @@ def fetch_artifacts(release: str, pipeline_id: int,
    154 155
                     bindist.replace(dest)
    
    155 156
             except Exception as e:
    
    156 157
                 logging.error(f'Error fetching job {job.name}: {e}')
    
    158
    +            traceback.print_exc()
    
    157 159
                 pass
    
    158 160
     
    
    159 161
     def main():
    

  • .gitlab/rel_eng/nix/sources.json
    1 1
     {
    
    2
    -    "binutils-gdb": {
    
    3
    -        "branch": "master",
    
    4
    -        "repo": "https://sourceware.org/git/binutils-gdb.git",
    
    5
    -        "rev": "49c843e6d2d0577200e7c1d2d02855f21a3a9dde",
    
    6
    -        "type": "git"
    
    7
    -    },
    
    8
    -    "gdb-walkers": {
    
    9
    -        "branch": "master",
    
    10
    -        "description": "Bring mdb walkers to gdb, also add other helpful commands.",
    
    11
    -        "homepage": "",
    
    12
    -        "owner": "hardenedapple",
    
    13
    -        "repo": "gdb-walkers",
    
    14
    -        "rev": "c0701c4c87852bd09e21ca313c48dd4a649cfd0d",
    
    15
    -        "sha256": "1sd61a90lg8bkddl8lp15qady1wvbjmhjgm0d3lb813nwimlka9y",
    
    16
    -        "type": "tarball",
    
    17
    -        "url": "https://github.com/hardenedapple/gdb-walkers/archive/c0701c4c87852bd09e21ca313c48dd4a649cfd0d.tar.gz",
    
    18
    -        "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
    
    19
    -    },
    
    20 2
         "niv": {
    
    21 3
             "branch": "master",
    
    22 4
             "description": "Easy dependency management for Nix projects",
    
    23 5
             "homepage": "https://github.com/nmattia/niv",
    
    24 6
             "owner": "nmattia",
    
    25 7
             "repo": "niv",
    
    26
    -        "rev": "82e5cd1ad3c387863f0545d7591512e76ab0fc41",
    
    27
    -        "sha256": "090l219mzc0gi33i3psgph6s2pwsc8qy4lyrqjdj4qzkvmaj65a7",
    
    8
    +        "rev": "e9519949d2b39bc9574b10f6ba216d65f014874e",
    
    9
    +        "sha256": "1mv379lsy030k2kh7000xwxxz4rzqk416yvmccsgsqnczs06r678",
    
    28 10
             "type": "tarball",
    
    29
    -        "url": "https://github.com/nmattia/niv/archive/82e5cd1ad3c387863f0545d7591512e76ab0fc41.tar.gz",
    
    11
    +        "url": "https://github.com/nmattia/niv/archive/e9519949d2b39bc9574b10f6ba216d65f014874e.tar.gz",
    
    30 12
             "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
    
    31 13
         },
    
    32 14
         "nixpkgs": {
    
    33
    -        "branch": "nixos-22.11",
    
    15
    +        "branch": "nixos-25.05",
    
    34 16
             "description": "Nix Packages collection",
    
    35 17
             "homepage": "",
    
    36 18
             "owner": "NixOS",
    
    37 19
             "repo": "nixpkgs",
    
    38
    -        "rev": "2d10e73416ec1449ef74aeac7faf2cf8c556ff5a",
    
    39
    -        "sha256": "00s89np0sqr3jxxp5h9nrpqy30fy4vsrmis6mmryrrmjqh09lpfv",
    
    20
    +        "rev": "ac62194c3917d5f474c1a844b6fd6da2db95077d",
    
    21
    +        "sha256": "0v6bd1xk8a2aal83karlvc853x44dg1n4nk08jg3dajqyy0s98np",
    
    40 22
             "type": "tarball",
    
    41
    -        "url": "https://github.com/NixOS/nixpkgs/archive/2d10e73416ec1449ef74aeac7faf2cf8c556ff5a.tar.gz",
    
    23
    +        "url": "https://github.com/NixOS/nixpkgs/archive/ac62194c3917d5f474c1a844b6fd6da2db95077d.tar.gz",
    
    42 24
             "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
    
    43 25
         },
    
    44 26
         "processor-trace": {
    
    ... ... @@ -47,22 +29,10 @@
    47 29
             "homepage": "",
    
    48 30
             "owner": "01org",
    
    49 31
             "repo": "processor-trace",
    
    50
    -        "rev": "c848a85c3104e2f5780741f85de5c9e65476ece2",
    
    51
    -        "sha256": "1ml8g6pm2brlcqp90yvgc780xf64d6k2km7fiqs88wvhlwsl7vzf",
    
    52
    -        "type": "tarball",
    
    53
    -        "url": "https://github.com/01org/processor-trace/archive/c848a85c3104e2f5780741f85de5c9e65476ece2.tar.gz",
    
    54
    -        "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
    
    55
    -    },
    
    56
    -    "rr": {
    
    57
    -        "branch": "master",
    
    58
    -        "description": "Record and Replay Framework",
    
    59
    -        "homepage": "http://rr-project.org/",
    
    60
    -        "owner": "rr-debugger",
    
    61
    -        "repo": "rr",
    
    62
    -        "rev": "e77b5f8ca4b360daffd31cf72cb6b093fa9e0b62",
    
    63
    -        "sha256": "sha256:1gxphqcv1yw2ffmjp0d2cv0mpccr00pf9jhf44rq57jqdsvlfn2c",
    
    32
    +        "rev": "911e654580e373c5a4d7e30bc84169fc3c50a128",
    
    33
    +        "sha256": "0fak9f7qh8yszb2wyygzp0j0y0wabf0k673vm4j9cl026h2vpx3z",
    
    64 34
             "type": "tarball",
    
    65
    -        "url": "https://github.com/rr-debugger/rr/archive/3f87444659d1f063397fabc7791ed3b13b15c798.tar.gz",
    
    35
    +        "url": "https://github.com/01org/processor-trace/archive/911e654580e373c5a4d7e30bc84169fc3c50a128.tar.gz",
    
    66 36
             "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
    
    67 37
         }
    
    68 38
     }

  • .gitlab/rel_eng/nix/sources.nix
    ... ... @@ -10,33 +10,34 @@ let
    10 10
         let
    
    11 11
           name' = sanitizeName name + "-src";
    
    12 12
         in
    
    13
    -      if spec.builtin or true then
    
    14
    -        builtins_fetchurl { inherit (spec) url sha256; name = name'; }
    
    15
    -      else
    
    16
    -        pkgs.fetchurl { inherit (spec) url sha256; name = name'; };
    
    13
    +    if spec.builtin or true then
    
    14
    +      builtins_fetchurl { inherit (spec) url sha256; name = name'; }
    
    15
    +    else
    
    16
    +      pkgs.fetchurl { inherit (spec) url sha256; name = name'; };
    
    17 17
     
    
    18 18
       fetch_tarball = pkgs: name: spec:
    
    19 19
         let
    
    20 20
           name' = sanitizeName name + "-src";
    
    21 21
         in
    
    22
    -      if spec.builtin or true then
    
    23
    -        builtins_fetchTarball { name = name'; inherit (spec) url sha256; }
    
    24
    -      else
    
    25
    -        pkgs.fetchzip { name = name'; inherit (spec) url sha256; };
    
    22
    +    if spec.builtin or true then
    
    23
    +      builtins_fetchTarball { name = name'; inherit (spec) url sha256; }
    
    24
    +    else
    
    25
    +      pkgs.fetchzip { name = name'; inherit (spec) url sha256; };
    
    26 26
     
    
    27 27
       fetch_git = name: spec:
    
    28 28
         let
    
    29 29
           ref =
    
    30
    -        if spec ? ref then spec.ref else
    
    30
    +        spec.ref or (
    
    31 31
               if spec ? branch then "refs/heads/${spec.branch}" else
    
    32
    -            if spec ? tag then "refs/tags/${spec.tag}" else
    
    33
    -              abort "In git source '${name}': Please specify `ref`, `tag` or `branch`!";
    
    34
    -      submodules = if spec ? submodules then spec.submodules else false;
    
    32
    +          if spec ? tag then "refs/tags/${spec.tag}" else
    
    33
    +          abort "In git source '${name}': Please specify `ref`, `tag` or `branch`!"
    
    34
    +        );
    
    35
    +      submodules = spec.submodules or false;
    
    35 36
           submoduleArg =
    
    36 37
             let
    
    37 38
               nixSupportsSubmodules = builtins.compareVersions builtins.nixVersion "2.4" >= 0;
    
    38 39
               emptyArgWithWarning =
    
    39
    -            if submodules == true
    
    40
    +            if submodules
    
    40 41
                 then
    
    41 42
                   builtins.trace
    
    42 43
                     (
    
    ... ... @@ -44,15 +45,15 @@ let
    44 45
                       + "but your nix's (${builtins.nixVersion}) builtins.fetchGit "
    
    45 46
                       + "does not support them"
    
    46 47
                     )
    
    47
    -                {}
    
    48
    -            else {};
    
    48
    +                { }
    
    49
    +            else { };
    
    49 50
             in
    
    50
    -          if nixSupportsSubmodules
    
    51
    -          then { inherit submodules; }
    
    52
    -          else emptyArgWithWarning;
    
    51
    +        if nixSupportsSubmodules
    
    52
    +        then { inherit submodules; }
    
    53
    +        else emptyArgWithWarning;
    
    53 54
         in
    
    54
    -      builtins.fetchGit
    
    55
    -        ({ url = spec.repo; inherit (spec) rev; inherit ref; } // submoduleArg);
    
    55
    +    builtins.fetchGit
    
    56
    +      ({ url = spec.repo; inherit (spec) rev; inherit ref; } // submoduleArg);
    
    56 57
     
    
    57 58
       fetch_local = spec: spec.path;
    
    58 59
     
    
    ... ... @@ -86,16 +87,16 @@ let
    86 87
           hasNixpkgsPath = builtins.any (x: x.prefix == "nixpkgs") builtins.nixPath;
    
    87 88
           hasThisAsNixpkgsPath = <nixpkgs> == ./.;
    
    88 89
         in
    
    89
    -      if builtins.hasAttr "nixpkgs" sources
    
    90
    -      then sourcesNixpkgs
    
    91
    -      else if hasNixpkgsPath && ! hasThisAsNixpkgsPath then
    
    92
    -        import <nixpkgs> {}
    
    93
    -      else
    
    94
    -        abort
    
    95
    -          ''
    
    96
    -            Please specify either <nixpkgs> (through -I or NIX_PATH=nixpkgs=...) or
    
    97
    -            add a package called "nixpkgs" to your sources.json.
    
    98
    -          '';
    
    90
    +    if builtins.hasAttr "nixpkgs" sources
    
    91
    +    then sourcesNixpkgs
    
    92
    +    else if hasNixpkgsPath && ! hasThisAsNixpkgsPath then
    
    93
    +      import <nixpkgs> { }
    
    94
    +    else
    
    95
    +      abort
    
    96
    +        ''
    
    97
    +          Please specify either <nixpkgs> (through -I or NIX_PATH=nixpkgs=...) or
    
    98
    +          add a package called "nixpkgs" to your sources.json.
    
    99
    +        '';
    
    99 100
     
    
    100 101
       # The actual fetching function.
    
    101 102
       fetch = pkgs: name: spec:
    
    ... ... @@ -115,13 +116,13 @@ let
    115 116
       # the path directly as opposed to the fetched source.
    
    116 117
       replace = name: drv:
    
    117 118
         let
    
    118
    -      saneName = stringAsChars (c: if isNull (builtins.match "[a-zA-Z0-9]" c) then "_" else c) name;
    
    119
    +      saneName = stringAsChars (c: if (builtins.match "[a-zA-Z0-9]" c) == null then "_" else c) name;
    
    119 120
           ersatz = builtins.getEnv "NIV_OVERRIDE_${saneName}";
    
    120 121
         in
    
    121
    -      if ersatz == "" then drv else
    
    122
    -        # this turns the string into an actual Nix path (for both absolute and
    
    123
    -        # relative paths)
    
    124
    -        if builtins.substring 0 1 ersatz == "/" then /. + ersatz else /. + builtins.getEnv "PWD" + "/${ersatz}";
    
    122
    +    if ersatz == "" then drv else
    
    123
    +      # this turns the string into an actual Nix path (for both absolute and
    
    124
    +      # relative paths)
    
    125
    +    if builtins.substring 0 1 ersatz == "/" then /. + ersatz else /. + builtins.getEnv "PWD" + "/${ersatz}";
    
    125 126
     
    
    126 127
       # Ports of functions for older nix versions
    
    127 128
     
    
    ... ... @@ -132,7 +133,7 @@ let
    132 133
       );
    
    133 134
     
    
    134 135
       # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/lists.nix#L295
    
    135
    -  range = first: last: if first > last then [] else builtins.genList (n: first + n) (last - first + 1);
    
    136
    +  range = first: last: if first > last then [ ] else builtins.genList (n: first + n) (last - first + 1);
    
    136 137
     
    
    137 138
       # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/strings.nix#L257
    
    138 139
       stringToCharacters = s: map (p: builtins.substring p 1 s) (range 0 (builtins.stringLength s - 1));
    
    ... ... @@ -143,43 +144,46 @@ let
    143 144
       concatStrings = builtins.concatStringsSep "";
    
    144 145
     
    
    145 146
       # https://github.com/NixOS/nixpkgs/blob/8a9f58a375c401b96da862d969f66429def1d118/lib/attrsets.nix#L331
    
    146
    -  optionalAttrs = cond: as: if cond then as else {};
    
    147
    +  optionalAttrs = cond: as: if cond then as else { };
    
    147 148
     
    
    148 149
       # fetchTarball version that is compatible between all the versions of Nix
    
    149 150
       builtins_fetchTarball = { url, name ? null, sha256 }@attrs:
    
    150 151
         let
    
    151 152
           inherit (builtins) lessThan nixVersion fetchTarball;
    
    152 153
         in
    
    153
    -      if lessThan nixVersion "1.12" then
    
    154
    -        fetchTarball ({ inherit url; } // (optionalAttrs (!isNull name) { inherit name; }))
    
    155
    -      else
    
    156
    -        fetchTarball attrs;
    
    154
    +    if lessThan nixVersion "1.12" then
    
    155
    +      fetchTarball ({ inherit url; } // (optionalAttrs (name != null) { inherit name; }))
    
    156
    +    else
    
    157
    +      fetchTarball attrs;
    
    157 158
     
    
    158 159
       # fetchurl version that is compatible between all the versions of Nix
    
    159 160
       builtins_fetchurl = { url, name ? null, sha256 }@attrs:
    
    160 161
         let
    
    161 162
           inherit (builtins) lessThan nixVersion fetchurl;
    
    162 163
         in
    
    163
    -      if lessThan nixVersion "1.12" then
    
    164
    -        fetchurl ({ inherit url; } // (optionalAttrs (!isNull name) { inherit name; }))
    
    165
    -      else
    
    166
    -        fetchurl attrs;
    
    164
    +    if lessThan nixVersion "1.12" then
    
    165
    +      fetchurl ({ inherit url; } // (optionalAttrs (name != null) { inherit name; }))
    
    166
    +    else
    
    167
    +      fetchurl attrs;
    
    167 168
     
    
    168 169
       # Create the final "sources" from the config
    
    169 170
       mkSources = config:
    
    170
    -    mapAttrs (
    
    171
    -      name: spec:
    
    172
    -        if builtins.hasAttr "outPath" spec
    
    173
    -        then abort
    
    174
    -          "The values in sources.json should not have an 'outPath' attribute"
    
    175
    -        else
    
    176
    -          spec // { outPath = replace name (fetch config.pkgs name spec); }
    
    177
    -    ) config.sources;
    
    171
    +    mapAttrs
    
    172
    +      (
    
    173
    +        name: spec:
    
    174
    +          if builtins.hasAttr "outPath" spec
    
    175
    +          then
    
    176
    +            abort
    
    177
    +              "The values in sources.json should not have an 'outPath' attribute"
    
    178
    +          else
    
    179
    +            spec // { outPath = replace name (fetch config.pkgs name spec); }
    
    180
    +      )
    
    181
    +      config.sources;
    
    178 182
     
    
    179 183
       # The "config" used by the fetchers
    
    180 184
       mkConfig =
    
    181 185
         { sourcesFile ? if builtins.pathExists ./sources.json then ./sources.json else null
    
    182
    -    , sources ? if isNull sourcesFile then {} else builtins.fromJSON (builtins.readFile sourcesFile)
    
    186
    +    , sources ? if sourcesFile == null then { } else builtins.fromJSON (builtins.readFile sourcesFile)
    
    183 187
         , system ? builtins.currentSystem
    
    184 188
         , pkgs ? mkPkgs sources system
    
    185 189
         }: rec {
    
    ... ... @@ -191,4 +195,4 @@ let
    191 195
         };
    
    192 196
     
    
    193 197
     in
    
    194
    -mkSources (mkConfig {}) // { __functor = _: settings: mkSources (mkConfig settings); }
    198
    +mkSources (mkConfig { }) // { __functor = _: settings: mkSources (mkConfig settings); }

  • .gitlab/rel_eng/upload.sh
    1
    -#!/usr/bin/bash
    
    1
    +#!/usr/bin/env bash
    
    2 2
     #! nix-shell -i bash -p moreutils lzip zip lftp gnupg
    
    3 3
     
    
    4 4
     set -Eeuo pipefail
    

  • configure.ac
    ... ... @@ -22,7 +22,7 @@ AC_INIT([The Glorious Glasgow Haskell Compilation System], [9.12.4], [glasgow-ha
    22 22
     AC_CONFIG_MACRO_DIRS([m4])
    
    23 23
     
    
    24 24
     # Set this to YES for a released version, otherwise NO
    
    25
    -: ${RELEASE=YES}
    
    25
    +: ${RELEASE=NO}
    
    26 26
     
    
    27 27
     # The primary version (e.g. 7.5, 7.4.1) is set in the AC_INIT line
    
    28 28
     # above.  If this is not a released version, then we will append the
    

  • hadrian/bootstrap/plan-9_12_5.jsonhadrian/bootstrap/plan-9_12_4.json

  • hadrian/bootstrap/plan-bootstrap-9_12_5.jsonhadrian/bootstrap/plan-bootstrap-9_12_4.json