Function called without the required argument

I am using flox r98 (from the prerelease environment) and I specified export FLOX_STABILITY=unstable in order to access the latest rust compiler (1_65).

However when I executed flox develop I got this error:

± flox develop                                                                                                                                                                                                                                                                                                             prerelease etorreborre/ockam etorreborre/default
warning: not writing modified lock file of flake 'git+file:///Users/etorreborre/projects/rust/ockam':
• Updated input 'flox-floxpkgs/nixpkgs/nixpkgs':
    'github:flox/nixpkgs/2788904d26dda6cfa1921c5abb7a2466ffe3cb8c' (2022-11-22)
  → 'github:flox/nixpkgs/40f79f003b6377bd2f4ed4027dde1f8f922995dd' (2022-12-17)
error: 'buildVscodeExtension' at /nix/store/5nl9sdpbqcgiq4qjd6ah5hms5kh6j4x3-source/pkgs/applications/editors/vscode/extensions/vscode-utils.nix:3:26 called without required argument 'vscodeExtPublisher'

       at /nix/store/wjm4yy93cbn06micyn3g1yd1as0w98l1-source/default.nix:186:5:

          185|     in
          186|     pkgs.vscode-utils.buildVscodeExtension {
             |     ^
          187|       name = "rust-analyzer-${rust-analyzer-rev}";
(use '--show-trace' to show detailed location information)

My workaround was to use export FLOX_STABILITY=staging and I was lucky enough that rust 1_65 moved there. But if that hadn’t been the case, how could have had fixed this issue?

Looks like there might have been a change upstream: vscode-with-extensions: define extensions.json · NixOS/nixpkgs@66a6cd1 · GitHub. Not sure if that caused a regression or not. Are you calling buildVscodeExtension directly or did someone else craft that call?

I am using the rustPlatform so I guess it comes from a transitive dependency. Is there a command I can run to trace the dependencies?

Hmm maybe there is a regression then. What do you get if you run flox develop --show-trace?

I was exactly doing that :-).


       at /nix/store/wjm4yy93cbn06micyn3g1yd1as0w98l1-source/default.nix:186:5:

          185|     in
          186|     pkgs.vscode-utils.buildVscodeExtension {
             |     ^
          187|       name = "rust-analyzer-${rust-analyzer-rev}";

       … while evaluating the attribute 'rust-analyzer-vscode-extension'

       at /nix/store/wjm4yy93cbn06micyn3g1yd1as0w98l1-source/default.nix:180:3:

          179|
          180|   rust-analyzer-vscode-extension =
             |   ^
          181|     let

       … while evaluating 'isDerivation'

       at /nix/store/nv78zywp4j59l8lkmzbw881i5r3swwda-source/lib/attrsets.nix:446:18:

          445|   */
          446|   isDerivation = x: x.type or null == "derivation";
             |                  ^
          447|

       … from call site

       at /nix/store/wjm4yy93cbn06micyn3g1yd1as0w98l1-source/flake.nix:42:16:

           41|           (k: v:
           42|             if isDerivation v then
             |                ^
           43|               [ (nameValuePair k v) ]

       … while evaluating anonymous lambda

       at /nix/store/wjm4yy93cbn06micyn3g1yd1as0w98l1-source/flake.nix:41:15:

           40|         (system: listToAttrs (concatLists (mapAttrsToList
           41|           (k: v:
             |               ^
           42|             if isDerivation v then

       … from call site

       at /nix/store/nv78zywp4j59l8lkmzbw881i5r3swwda-source/lib/attrsets.nix:375:16:

          374|   mapAttrsToList = f: attrs:
          375|     map (name: f name attrs.${name}) (attrNames attrs);
             |                ^
          376|

       … while evaluating anonymous lambda

       at /nix/store/nv78zywp4j59l8lkmzbw881i5r3swwda-source/lib/attrsets.nix:375:10:

          374|   mapAttrsToList = f: attrs:
          375|     map (name: f name attrs.${name}) (attrNames attrs);
             |          ^
          376|

       … from call site

       … while evaluating anonymous lambda

       at /nix/store/wjm4yy93cbn06micyn3g1yd1as0w98l1-source/flake.nix:40:10:

           39|         ]
           40|         (system: listToAttrs (concatLists (mapAttrsToList
             |          ^
           41|           (k: v:

       … from call site

       at /nix/store/nv78zywp4j59l8lkmzbw881i5r3swwda-source/lib/attrsets.nix:433:43:

          432|   genAttrs = names: f:
          433|     listToAttrs (map (n: nameValuePair n (f n)) names);
             |                                           ^
          434|

       … while evaluating the attribute 'x86_64-darwin'

       at /nix/store/nv78zywp4j59l8lkmzbw881i5r3swwda-source/lib/attrsets.nix:331:41:

          330|   */
          331|   nameValuePair = name: value: { inherit name value; };
             |                                         ^
          332|

       … while evaluating anonymous lambda

       at /nix/store/l9sc7vqyq6b2glrp2rksps23vzbbwzvf-source/lib/capacitate/capacitate.nix:200:12:

          199|       lib.mapAttrs (
          200|         _: flakeInput:
             |            ^
          201|           flakeInput.${system} or flakeInput

       … from call site

       … while evaluating 'optionalString'

       at /nix/store/nv78zywp4j59l8lkmzbw881i5r3swwda-source/lib/strings.nix:213:5:

          212|     # String to return if condition is true
          213|     string: if cond then string else "";
             |     ^
          214|

       … from call site

       at /nix/store/pkwm4cr2j0y6r58i6nbpk88p7d9421ix-source/pkgs/ockam/cargo-tarpaulin-darwin.nix:24:18:

           23|
           24|    postInstall = lib.optionalString stdenv.isDarwin ''
             |                  ^
           25|     wrapProgram $out/bin/cargo-tarpaulin --set PATH "${inputs.fenix.packages.latest.cargo}/bin:${inputs.fenix.packages.latest.rustc}/bin:$PATH"

       … while evaluating the attribute 'postInstall' of the derivation 'cargo-tarpaulin-develop'

       at /nix/store/5nl9sdpbqcgiq4qjd6ah5hms5kh6j4x3-source/pkgs/stdenv/generic/make-derivation.nix:270:7:

          269|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
          270|       name =
             |       ^
          271|         let

       … while evaluating the attribute 'nativeBuildInputs' of the derivation 'ockam-0.77.0'

       at /nix/store/5nl9sdpbqcgiq4qjd6ah5hms5kh6j4x3-source/pkgs/stdenv/generic/make-derivation.nix:270:7:

          269|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
          270|       name =
             |       ^

This file seems to be involved, so probably not a flox regression but some incorrect following of dependencies?

Yep so you use fenix which builds a VSCode extension. There was a change in nixpkgs which I linked earlier which changed the API for buildVscodeExtension. Fortunately it appears fenix fixed that a few days ago with Specify name and publisher when building VS Code extension · nix-community/fenix@d6ea240 · GitHub. So if I had to guess you should be able to fix it on your end with a flox flake update

Let me know if that does it!

1 Like

Marking as solved but feel free to re-open if there’s still an issue. Thanks for the report!

Sorry I forgot to update you. Yes it works fine now, thanks.

1 Like