coq-community / coq-nix-toolbox

Nix helper scripts to automate local builds and CI [maintainers=@CohenCyril,@Zimmi48]
MIT License
32 stars 10 forks source link

Error with `attribute = "coq"`. #42

Closed Zimmi48 closed 3 years ago

Zimmi48 commented 3 years ago

I've got the same error in both the Coq repository and the toolbox repository when trying to use a bundle with a development version of the Coq derivation.

In the toolbox repository, I tried adding a bundle overriding the version of coq (set as the main attribute with attribute = coq; or with the main-job setup) to a development version (master or v8.14). In the Coq repository, I tried relying on the updated nixpkgs derivation (again with attribute = coq).

In both cases, the command nix-shell --arg do-nothing true (or with the proper --argstr bundle if this is not the default bundle) fails. The trace is:

error: while evaluating the attribute 'jsonAction' of the derivation 'coqdev-coq-dev' at /nix/store/kmmgkhj7wbcknj8d75n1i0xhscwcyk4l-source/pkgs/stdenv/generic/make-derivation.nix:201:11:
while evaluating 'mkJobs' at /home/theo/git/coq-nix-toolbox/action.nix:62:12, called from /home/theo/git/coq-nix-toolbox/action.nix:73:53:
while evaluating 'foldl' at /nix/store/kmmgkhj7wbcknj8d75n1i0xhscwcyk4l-source/lib/lists.nix:80:20, called from /home/theo/git/coq-nix-toolbox/action.nix:63:5:
while evaluating 'foldl'' at /nix/store/kmmgkhj7wbcknj8d75n1i0xhscwcyk4l-source/lib/lists.nix:82:16, called from /nix/store/kmmgkhj7wbcknj8d75n1i0xhscwcyk4l-source/lib/lists.nix:86:8:
while evaluating 'foldAttrs' at /nix/store/kmmgkhj7wbcknj8d75n1i0xhscwcyk4l-source/lib/attrsets.nix:154:24, called from /home/theo/git/coq-nix-toolbox/config-parser-1.0.0/default.nix:68:14:
while evaluating 'foldr' at /nix/store/kmmgkhj7wbcknj8d75n1i0xhscwcyk4l-source/lib/lists.nix:52:20, called from /nix/store/kmmgkhj7wbcknj8d75n1i0xhscwcyk4l-source/lib/attrsets.nix:155:5:
while evaluating 'fold'' at /nix/store/kmmgkhj7wbcknj8d75n1i0xhscwcyk4l-source/lib/lists.nix:55:15, called from /nix/store/kmmgkhj7wbcknj8d75n1i0xhscwcyk4l-source/lib/lists.nix:59:8:
while evaluating anonymous function at /nix/store/kmmgkhj7wbcknj8d75n1i0xhscwcyk4l-source/lib/attrsets.nix:155:14, called from /nix/store/kmmgkhj7wbcknj8d75n1i0xhscwcyk4l-source/lib/lists.nix:58:14:
while evaluating 'foldr' at /nix/store/kmmgkhj7wbcknj8d75n1i0xhscwcyk4l-source/lib/lists.nix:52:20, called from /nix/store/kmmgkhj7wbcknj8d75n1i0xhscwcyk4l-source/lib/attrsets.nix:156:9:
while evaluating 'fold'' at /nix/store/kmmgkhj7wbcknj8d75n1i0xhscwcyk4l-source/lib/lists.nix:55:15, called from /nix/store/kmmgkhj7wbcknj8d75n1i0xhscwcyk4l-source/lib/lists.nix:59:8:
while evaluating anonymous function at /home/theo/git/coq-nix-toolbox/config-parser-1.0.0/default.nix:64:38, called from /nix/store/kmmgkhj7wbcknj8d75n1i0xhscwcyk4l-source/lib/attrsets.nix:314:43:
while evaluating the attribute 'pkgsRevDepsSet.coq' at undefined position:
while evaluating anonymous function at /home/theo/git/coq-nix-toolbox/deps.nix:23:10, called from undefined position:
while evaluating 'foldl' at /nix/store/kmmgkhj7wbcknj8d75n1i0xhscwcyk4l-source/lib/lists.nix:80:20, called from /home/theo/git/coq-nix-toolbox/deps.nix:17:27:
while evaluating 'foldl'' at /nix/store/kmmgkhj7wbcknj8d75n1i0xhscwcyk4l-source/lib/lists.nix:82:16, called from /nix/store/kmmgkhj7wbcknj8d75n1i0xhscwcyk4l-source/lib/lists.nix:86:8:
while evaluating 'reverseList' at /nix/store/kmmgkhj7wbcknj8d75n1i0xhscwcyk4l-source/lib/lists.nix:393:17, called from /home/theo/git/coq-nix-toolbox/deps.nix:21:11:
while evaluating 'toposort' at /nix/store/kmmgkhj7wbcknj8d75n1i0xhscwcyk4l-source/lib/lists.nix:454:22, called from /home/theo/git/coq-nix-toolbox/deps.nix:16:17:
while evaluating 'listDfs' at /nix/store/kmmgkhj7wbcknj8d75n1i0xhscwcyk4l-source/lib/lists.nix:415:35, called from /nix/store/kmmgkhj7wbcknj8d75n1i0xhscwcyk4l-source/lib/lists.nix:456:17:
while evaluating 'dfs'' at /nix/store/kmmgkhj7wbcknj8d75n1i0xhscwcyk4l-source/lib/lists.nix:417:27, called from /nix/store/kmmgkhj7wbcknj8d75n1i0xhscwcyk4l-source/lib/lists.nix:430:8:
while evaluating anonymous function at /nix/store/kmmgkhj7wbcknj8d75n1i0xhscwcyk4l-source/lib/lists.nix:420:26, called from /nix/store/kmmgkhj7wbcknj8d75n1i0xhscwcyk4l-source/lib/lists.nix:420:15:
while evaluating anonymous function at /home/theo/git/coq-nix-toolbox/deps.nix:16:30, called from /nix/store/kmmgkhj7wbcknj8d75n1i0xhscwcyk4l-source/lib/lists.nix:420:29:
while evaluating the attribute 'coq' at undefined position:
while evaluating anonymous function at /home/theo/git/coq-nix-toolbox/deps.nix:13:33, called from undefined position:
while evaluating 'flatten' at /nix/store/kmmgkhj7wbcknj8d75n1i0xhscwcyk4l-source/lib/lists.nix:137:13, called from /home/theo/git/coq-nix-toolbox/deps.nix:14:9:
while evaluating anonymous function at /nix/store/kmmgkhj7wbcknj8d75n1i0xhscwcyk4l-source/lib/lists.nix:139:21, called from /nix/store/kmmgkhj7wbcknj8d75n1i0xhscwcyk4l-source/lib/lists.nix:139:10:
while evaluating 'flatten' at /nix/store/kmmgkhj7wbcknj8d75n1i0xhscwcyk4l-source/lib/lists.nix:137:13, called from /nix/store/kmmgkhj7wbcknj8d75n1i0xhscwcyk4l-source/lib/lists.nix:139:24:
while evaluating 'findInput' at /home/theo/git/coq-nix-toolbox/deps.nix:10:19, called from undefined position:
value is a list while a set was expected, at /home/theo/git/coq-nix-toolbox/deps.nix:10:44
CohenCyril commented 3 years ago

I think it comes from optional (versionAtLeast "8.14") [ ocamlPackages.dune_2 ] which produces a list of list ...

CohenCyril commented 3 years ago

I did not know this was allowed and did not anticipate the case in map findInput (v.buildInputs ++ v.propagatedBuildInputs) (deps.nix)

CohenCyril commented 3 years ago

maybe we should have a "deep flattening" function and use it there