Skip to content
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

Change serialization of OneEraGenTxId to treat it as though it's simply a ShortByteString #1311

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

simplify Inject WrapGenTxId and make it match Inject WrapHeaderHash

9089409
Select commit
Loading
Failed to load commit list.
Open

Change serialization of OneEraGenTxId to treat it as though it's simply a ShortByteString #1311

simplify Inject WrapGenTxId and make it match Inject WrapHeaderHash
9089409
Select commit
Loading
Failed to load commit list.
IOG Hydra / ci/eval failed Jan 21, 2025 in 0s

Evaluation failed

Details

Evaluation error:

hydra-eval-jobs returned exit code 1:
warning: ignoring --gc-roots-dir (just supported for compatibility)
still evaluating after 5s… 
info: evaluation failed
warning: ignoring untrusted flake configuration setting 'allow-import-from-derivation'.
Pass '--accept-flake-config' to trust it
warning: ignoring untrusted flake configuration setting 'extra-substituters'.
Pass '--accept-flake-config' to trust it
warning: ignoring untrusted flake configuration setting 'extra-trusted-public-keys'.
Pass '--accept-flake-config' to trust it
trace: WARNING: No sha256 found for source-repository-package https://github.com/input-output-hk/ouroboros-network ref=(unspecified) rev=320dcf4d260761484f8cf3114c340b66635f4985 download may fail in restricted mode (hydra)
error:
       … while calling anonymous lambda
         at «string»:68:1:
           67| };
           68| flake: let
             | ^
           69|   job = let

       … while calling the 'listToAttrs' builtin
         at «string»:131:5:
          130|   in
          131|     builtins.listToAttrs (
             |     ^
          132|       map (path: {

       … while calling the 'map' builtin
         at «string»:132:7:
          131|     builtins.listToAttrs (
          132|       map (path: {
             |       ^
          133|         name = lib.showAttrPath path;

       … from call site
         at «string»:129:20:
          128|
          129|     jobAttrPaths = lib.collectAttrPaths lib.isDerivation jobAttrs;
             |                    ^
          130|   in

       … while calling 'collectAttrPaths'
         at «string»:20:33:
           19|
           20|   collectAttrPaths = predicate: attrs: let
             |                                 ^
           21|     internal = path: attrs: let

       … from call site
         at «string»:53:5:
           52|   in
           53|     internal [] attrs;
             |     ^
           54|

       … while calling 'internal'
         at «string»:21:22:
           20|   collectAttrPaths = predicate: attrs: let
           21|     internal = path: attrs: let
             |                      ^
           22|       inherit

       … from call site
         at «string»:36:11:
           35|         then
           36|           flattenDepth 1 (
             |           ^
           37|             map

       … while calling 'flattenDepth'
         at «string»:6:25:
            5|
            6|   flattenDepth = depth: x:
             |                         ^
            7|     if builtins.isList x && (depth == null || depth >= 0)

       … while calling the 'concatMap' builtin
         at «string»:9:7:
            8|     then
            9|       builtins.concatMap
             |       ^
           10|       (flattenDepth (

       … while calling 'flattenDepth'
         at «string»:6:25:
            5|
            6|   flattenDepth = depth: x:
             |                         ^
            7|     if builtins.isList x && (depth == null || depth >= 0)

       … while evaluating a branch condition
         at «string»:7:5:
            6|   flattenDepth = depth: x:
            7|     if builtins.isList x && (depth == null || depth >= 0)
             |     ^
            8|     then

       … in the left operand of the AND (&&) operator
         at «string»:7:26:
            6|   flattenDepth = depth: x:
            7|     if builtins.isList x && (depth == null || depth >= 0)
             |                          ^
            8|     then

       … while calling the 'isList' builtin
         at «string»:7:8:
            6|   flattenDepth = depth: x:
            7|     if builtins.isList x && (depth == null || depth >= 0)
             |        ^
            8|     then

       … while calling anonymous lambda
         at «string»:39:15:
           38|             (
           39|               attrName:
             |               ^
           40|                 internal

       … from call site
         at «string»:40:17:
           39|               attrName:
           40|                 internal
             |                 ^
           41|                 (path ++ [attrName])

       (11 duplicate frames omitted)

       … while calling the 'map' builtin
         at «string»:32:7:
           31|     in
           32|       map (attrName: path ++ [attrName]) right
             |       ^
           33|       ++ (

       … while calling the 'partition' builtin
         at «string»:24:11:
           23|         (
           24|           builtins.partition
             |           ^
           25|           (attrName: predicate attrs.${attrName})

       … while calling anonymous lambda
         at «string»:25:12:
           24|           builtins.partition
           25|           (attrName: predicate attrs.${attrName})
             |            ^
           26|           (builtins.attrNames attrs)

       … from call site
         at «string»:25:22:
           24|           builtins.partition
           25|           (attrName: predicate attrs.${attrName})
             |                      ^
           26|           (builtins.attrNames attrs)

       … while calling 'isDerivation'
         at «string»:4:18:
            3|   # copied from nixpkgs
            4|   isDerivation = value: value.type or null == "derivation";
             |                  ^
            5|

       … while evaluating the attribute 'haskell96'
         at /nix/store/g2ysyzdx76m4z7lnmyddcwdz25lx7kn1-source/lib/attrsets.nix:984:20:
          983|     value:
          984|     { inherit name value; };
             |                    ^
          985|

       … while evaluating a branch condition
         at /nix/store/g2ysyzdx76m4z7lnmyddcwdz25lx7kn1-source/lib/attrsets.nix:690:13:
          689|           (nameValuePair name (
          690|             if isAttrs v then filterAttrsRecursive pred v
             |             ^
          691|             else v

       … while calling the 'isAttrs' builtin
         at /nix/store/g2ysyzdx76m4z7lnmyddcwdz25lx7kn1-source/lib/attrsets.nix:690:16:
          689|           (nameValuePair name (
          690|             if isAttrs v then filterAttrsRecursive pred v
             |                ^
          691|             else v

       … while evaluating the attribute 'haskell96'
         at /nix/store/qqjslniv4mcad73sl4c2l9n935cr5r4h-source/nix/ci.nix:40:7:
           39|     native = {
           40|       haskell96 = mkHaskellJobsFor pkgs.hsPkgs;
             |       ^
           41|     } // lib.optionalAttrs (buildSystem == "x86_64-linux") {

       … from call site
         at /nix/store/qqjslniv4mcad73sl4c2l9n935cr5r4h-source/nix/ci.nix:40:19:
           39|     native = {
           40|       haskell96 = mkHaskellJobsFor pkgs.hsPkgs;
             |                   ^
           41|     } // lib.optionalAttrs (buildSystem == "x86_64-linux") {

       … while calling 'mkHaskellJobsFor'
         at /nix/store/qqjslniv4mcad73sl4c2l9n935cr5r4h-source/nix/ci.nix:8:22:
            7|
            8|   mkHaskellJobsFor = hsPkgs:
             |                      ^
            9|     let

       … in the right operand of the update (//) operator
         at /nix/store/qqjslniv4mcad73sl4c2l9n935cr5r4h-source/nix/ci.nix:31:7:
           30|         haskellLib.collectChecks' projectHsPkgs;
           31|     } // lib.optionalAttrs noCross {
             |       ^
           32|       devShell =

       … from call site
         at /nix/store/qqjslniv4mcad73sl4c2l9n935cr5r4h-source/nix/ci.nix:31:10:
           30|         haskellLib.collectChecks' projectHsPkgs;
           31|     } // lib.optionalAttrs noCross {
             |          ^
           32|       devShell =

       … while calling 'optionalAttrs'
         at /nix/store/g2ysyzdx76m4z7lnmyddcwdz25lx7kn1-source/lib/attrsets.nix:1352:5:
         1351|     cond:
         1352|     as:
             |     ^
         1353|     if cond then as else {};

       … while evaluating a branch condition
         at /nix/store/g2ysyzdx76m4z7lnmyddcwdz25lx7kn1-source/lib/attrsets.nix:1353:5:
         1352|     as:
         1353|     if cond then as else {};
             |     ^
         1354|

       … while evaluating the attribute 'hsPkgs'
         at /nix/store/qqjslniv4mcad73sl4c2l9n935cr5r4h-source/nix/haskell.nix:59:11:
           58| {
           59|   inherit hsPkgs;
             |           ^
           60| }

       … from call site
         at /nix/store/qqjslniv4mcad73sl4c2l9n935cr5r4h-source/nix/haskell.nix:15:12:
           14|   };
           15|   hsPkgs = haskell-nix.cabalProject {
             |            ^
           16|     src = ./..;

       … while calling 'cabalProject'
         at /nix/store/1ab5mjxdr6rj1gj9ix6c7hw3ky4qbn8v-source/overlays/haskell.nix:927:24:
          926|
          927|         cabalProject = args: let p = cabalProject' args;
             |                        ^
          928|             in p.hsPkgs // p;

       … in the left operand of the update (//) operator
         at /nix/store/1ab5mjxdr6rj1gj9ix6c7hw3ky4qbn8v-source/overlays/haskell.nix:928:25:
          927|         cabalProject = args: let p = cabalProject' args;
          928|             in p.hsPkgs // p;
             |                         ^
          929|

       … while evaluating the attribute 'hsPkgs'
         at /nix/store/1ab5mjxdr6rj1gj9ix6c7hw3ky4qbn8v-source/overlays/haskell.nix:725:15:
          724|               # Haskell packages
          725|               hsPkgs = final.lib.mapAttrs (packageName: package':
             |               ^
          726|                 if package' == null

       … while calling the 'mapAttrs' builtin
         at /nix/store/1ab5mjxdr6rj1gj9ix6c7hw3ky4qbn8v-source/overlays/haskell.nix:725:24:
          724|               # Haskell packages
          725|               hsPkgs = final.lib.mapAttrs (packageName: package':
             |                        ^
          726|                 if package' == null

       … while calling the 'removeAttrs' builtin
         at /nix/store/1ab5mjxdr6rj1gj9ix6c7hw3ky4qbn8v-source/overlays/haskell.nix:759:20:
          758|                     }
          759|                 ) (builtins.removeAttrs rawProject.hsPkgs
             |                    ^
          760|                   # These are functions not packages

       … while evaluating the attribute 'hsPkgs'
         at /nix/store/1ab5mjxdr6rj1gj9ix6c7hw3ky4qbn8v-source/overlays/haskell.nix:693:44:
          692|               project = addProjectAndPackageAttrs rec {
          693|                   inherit (pkg-set.config) hsPkgs;
             |                                            ^
          694|                   inherit pkg-set;

       … while evaluating a branch condition
         at /nix/store/1ab5mjxdr6rj1gj9ix6c7hw3ky4qbn8v-source/overlays/haskell.nix:664:25:
          663|                 else project;
          664|               pkg-set = if plan-pkgs ? configurationError
             |                         ^
          665|                 then {

       … from call site
         at /nix/store/1ab5mjxdr6rj1gj9ix6c7hw3ky4qbn8v-source/overlays/haskell.nix:658:27:
          657|               callProjectResults = callCabalProjectToNix config;
          658|               plan-pkgs = importAndFilterProject {
             |                           ^
          659|                 inherit (callProjectResults) projectNix sourceRepos src;

       … while calling anonymous lambda
         at /nix/store/1ab5mjxdr6rj1gj9ix6c7hw3ky4qbn8v-source/lib/import-and-filter-project.nix:5:1:
            4| { pkgs, haskellLib }:
            5| { projectNix, sourceRepos, src }:
             | ^
            6| let

       … in the left operand of the update (//) operator
         at /nix/store/1ab5mjxdr6rj1gj9ix6c7hw3ky4qbn8v-source/lib/import-and-filter-project.nix:17:12:
           16|   project = import "${projectNix}${projectSubDir'}";
           17| in project // {
             |            ^
           18|     extras = hackage: let

       … while calling the 'import' builtin
         at /nix/store/1ab5mjxdr6rj1gj9ix6c7hw3ky4qbn8v-source/lib/import-and-filter-project.nix:16:13:
           15|   projectSubDir' = src.origSubDir or "";                                     # With leading /          # Without / # With trailing /
           16|   project = import "${projectNix}${projectSubDir'}";
             |             ^
           17| in project // {

       … while realising the context of a path

       … while calling the 'getAttr' builtin
         at <nix/derivation-internal.nix>:44:19:
           43|       value = commonAttrs // {
           44|         outPath = builtins.getAttr outputName strict;
             |                   ^
           45|         drvPath = strict.drvPath;

       … while calling the 'derivationStrict' builtin
         at <nix/derivation-internal.nix>:34:12:
           33|
           34|   strict = derivationStrict drvAttrs;
             |            ^
           35|

       … while evaluating derivation 'haskell-project-plan-to-nix-pkgs'
         whose name attribute is located at /nix/store/g2ysyzdx76m4z7lnmyddcwdz25lx7kn1-source/pkgs/stdenv/generic/make-derivation.nix:331:7

       … while evaluating attribute 'buildCommand' of derivation 'haskell-project-plan-to-nix-pkgs'
         at /nix/store/g2ysyzdx76m4z7lnmyddcwdz25lx7kn1-source/pkgs/build-support/trivial-builders/default.nix:68:17:
           67|         enableParallelBuilding = true;
           68|         inherit buildCommand name;
             |                 ^
           69|         passAsFile = [ "buildCommand" ]

       … while evaluating the attribute 'makeFixedProjectFile'
         at /nix/store/1ab5mjxdr6rj1gj9ix6c7hw3ky4qbn8v-source/lib/call-cabal-project-to-nix.nix:270:7:
          269|       inherit (repoResult) repos extra-hackages;
          270|       makeFixedProjectFile = ''
             |       ^
          271|         HOME=$(mktemp -d)

       … while calling the 'getAttr' builtin
         at <nix/derivation-internal.nix>:44:19:
           43|       value = commonAttrs // {
           44|         outPath = builtins.getAttr outputName strict;
             |                   ^
           45|         drvPath = strict.drvPath;

       … while calling the 'derivationStrict' builtin
         at <nix/derivation-internal.nix>:34:12:
           33|
           34|   strict = derivationStrict drvAttrs;
             |            ^
           35|

       … while evaluating derivation 'cabal.project'
         whose name attribute is located at /nix/store/g2ysyzdx76m4z7lnmyddcwdz25lx7kn1-source/pkgs/stdenv/generic/make-derivation.nix:331:7

       … while evaluating attribute 'text' of derivation 'cabal.project'
         at /nix/store/g2ysyzdx76m4z7lnmyddcwdz25lx7kn1-source/pkgs/build-support/trivial-builders/default.nix:103:17:
          102|       ({
          103|         inherit text executable checkPhase allowSubstitutes preferLocalBuild;
             |                 ^
          104|         passAsFile = [ "text" ]

       … from call site
         at /nix/store/1ab5mjxdr6rj1gj9ix6c7hw3ky4qbn8v-source/lib/call-cabal-project-to-nix.nix:236:9:
          235|         sourceRepoPackageResult.initialText +
          236|         pkgs.lib.strings.concatMapStrings (block:
             |         ^
          237|             if block ? sourceRepo

       … while calling 'concatMapStrings'
         at /nix/store/g2ysyzdx76m4z7lnmyddcwdz25lx7kn1-source/lib/strings.nix:60:25:
           59|   */
           60|   concatMapStrings = f: list: concatStrings (map f list);
             |                         ^
           61|

       … while calling the 'concatStringsSep' builtin
         at /nix/store/g2ysyzdx76m4z7lnmyddcwdz25lx7kn1-source/lib/strings.nix:60:31:
           59|   */
           60|   concatMapStrings = f: list: concatStrings (map f list);
             |                               ^
           61|

       … while calling anonymous lambda
         at /nix/store/1ab5mjxdr6rj1gj9ix6c7hw3ky4qbn8v-source/lib/call-cabal-project-to-nix.nix:236:44:
          235|         sourceRepoPackageResult.initialText +
          236|         pkgs.lib.strings.concatMapStrings (block:
             |                                            ^
          237|             if block ? sourceRepo

       … while calling the 'getAttr' builtin
         at <nix/derivation-internal.nix>:44:19:
           43|       value = commonAttrs // {
           44|         outPath = builtins.getAttr outputName strict;
             |                   ^
           45|         drvPath = strict.drvPath;

       … while calling the 'derivationStrict' builtin
         at <nix/derivation-internal.nix>:34:12:
           33|
           34|   strict = derivationStrict drvAttrs;
             |            ^
           35|

       … while evaluating derivation 'source-repository-package'
         whose name attribute is located at /nix/store/g2ysyzdx76m4z7lnmyddcwdz25lx7kn1-source/pkgs/stdenv/generic/make-derivation.nix:331:7

       … while evaluating attribute 'buildCommand' of derivation 'source-repository-package'
         at /nix/store/g2ysyzdx76m4z7lnmyddcwdz25lx7kn1-source/pkgs/build-support/trivial-builders/default.nix:68:17:
           67|         enableParallelBuilding = true;
           68|         inherit buildCommand name;
             |                 ^
           69|         passAsFile = [ "buildCommand" ]

       … while calling the 'trace' builtin
         at /nix/store/1ab5mjxdr6rj1gj9ix6c7hw3ky4qbn8v-source/lib/call-cabal-project-to-nix.nix:208:18:
          207|                 // pkgs.lib.optionalAttrs (repoData ? rev) { inherit (repoData) rev; };
          208|               in __trace "WARNING: No sha256 found for source-repository-package ${repoData.url} ref=${repoData.ref or "(unspecified)"} rev=${repoData.rev or "(unspecified)"} download may fail in restricted mode (hydra)"
             |                  ^
          209|                 (__trace "Consider adding `--sha256: ${hashPath drv}` to the ${cabalProjectFileName} file or passing in a sha256map argument"

       … while calling the 'trace' builtin
         at /nix/store/1ab5mjxdr6rj1gj9ix6c7hw3ky4qbn8v-source/lib/call-cabal-project-to-nix.nix:209:18:
          208|               in __trace "WARNING: No sha256 found for source-repository-package ${repoData.url} ref=${repoData.ref or "(unspecified)"} rev=${repoData.rev or "(unspecified)"} download may fail in restricted mode (hydra)"
          209|                 (__trace "Consider adding `--sha256: ${hashPath drv}` to the ${cabalProjectFileName} file or passing in a sha256map argument"
             |                  ^
          210|                  drv);

       … from call site
         at /nix/store/1ab5mjxdr6rj1gj9ix6c7hw3ky4qbn8v-source/lib/call-cabal-project-to-nix.nix:209:56:
          208|               in __trace "WARNING: No sha256 found for source-repository-package ${repoData.url} ref=${repoData.ref or "(unspecified)"} rev=${repoData.rev or "(unspecified)"} download may fail in restricted mode (hydra)"
          209|                 (__trace "Consider adding `--sha256: ${hashPath drv}` to the ${cabalProjectFileName} file or passing in a sha256map argument"
             |                                                        ^
          210|                  drv);

       … while calling 'hashPath'
         at /nix/store/1ab5mjxdr6rj1gj9ix6c7hw3ky4qbn8v-source/lib/call-cabal-project-to-nix.nix:184:14:
          183|
          184|   hashPath = path:
             |              ^
          185|     builtins.readFile (pkgs.runCommand "hash-path" { preferLocalBuild = true; }

       … while calling the 'readFile' builtin
         at /nix/store/1ab5mjxdr6rj1gj9ix6c7hw3ky4qbn8v-source/lib/call-cabal-project-to-nix.nix:185:5:
          184|   hashPath = path:
          185|     builtins.readFile (pkgs.runCommand "hash-path" { preferLocalBuild = true; }
             |     ^
          186|       "echo -n $(${pkgs.nix}/bin/nix-hash --type sha256 --base32 ${path}) > $out");

       … while calling the 'getAttr' builtin
         at <nix/derivation-internal.nix>:44:19:
           43|       value = commonAttrs // {
           44|         outPath = builtins.getAttr outputName strict;
             |                   ^
           45|         drvPath = strict.drvPath;

       … while calling the 'derivationStrict' builtin
         at <nix/derivation-internal.nix>:34:12:
           33|
           34|   strict = derivationStrict drvAttrs;
             |            ^
           35|

       … while evaluating derivation 'hash-path'
         whose name attribute is located at /nix/store/g2ysyzdx76m4z7lnmyddcwdz25lx7kn1-source/pkgs/stdenv/generic/make-derivation.nix:331:7

       … while evaluating attribute 'buildCommand' of derivation 'hash-path'
         at /nix/store/g2ysyzdx76m4z7lnmyddcwdz25lx7kn1-source/pkgs/build-support/trivial-builders/default.nix:68:17:
           67|         enableParallelBuilding = true;
           68|         inherit buildCommand name;
             |                 ^
           69|         passAsFile = [ "buildCommand" ]

       … in the left operand of the update (//) operator
         at /nix/store/1ab5mjxdr6rj1gj9ix6c7hw3ky4qbn8v-source/lib/call-cabal-project-to-nix.nix:207:17:
          206|                 # we have to omit the argument completely.
          207|                 // pkgs.lib.optionalAttrs (repoData ? rev) { inherit (repoData) rev; };
             |                 ^
          208|               in __trace "WARNING: No sha256 found for source-repository-package ${repoData.url} ref=${repoData.ref or "(unspecified)"} rev=${repoData.rev or "(unspecified)"} download may fail in restricted mode (hydra)"

       … while calling the 'fetchGit' builtin
         at /nix/store/1ab5mjxdr6rj1gj9ix6c7hw3ky4qbn8v-source/lib/call-cabal-project-to-nix.nix:203:25:
          202|             else
          203|               let drv = builtins.fetchGit
             |                         ^
          204|                 { inherit (repoData) url ; ref = repoData.ref or null; }

       error: fetchTree argument 'ref' is null while a string, Boolean or integer is expected
info: max RSS: 582238208 bytes / 555.27 MiB / 0.54 GiB