lix/src
Eelco Dolstra e5662ba652 Add a flag to start the REPL on evaluation errors
This allows interactively inspecting the state of the evaluator at the
point of failure.

Example:

  $ nix eval path:///home/eelco/Dev/nix/flake2#modules.hello-closure._final --start-repl-on-eval-errors
  error: --- TypeError -------------------------------------------------------------------------------------------------------------------------------------------------------------------- nix
  at: (20:53) in file: /nix/store/4264z41dxfdiqr95svmpnxxxwhfplhy0-source/flake.nix

      19|
      20|           _final = builtins.foldl' (xs: mod: xs // (mod._module.config { config = _final; })) _defaults _allModules;
        |                                                     ^
      21|         };

  attempt to call something which is not a function but a set

  Starting REPL to allow you to inspect the current state of the evaluator.

  The following extra variables are in scope: arg, fun

  Welcome to Nix version 2.4. Type :? for help.

  nix-repl> fun
  error: --- EvalError -------------------------------------------------------------------------------------------------------------------------------------------------------------------- nix
  at: (150:28) in file: /nix/store/4264z41dxfdiqr95svmpnxxxwhfplhy0-source/flake.nix

     149|
     150|           tarballClosure = (module {
        |                            ^
     151|             extends = [ self.modules.derivation ];

  attribute 'derivation' missing

  nix-repl> :t fun
  a set

  nix-repl> builtins.attrNames fun
  [ "tarballClosure" ]

  nix-repl>
2020-08-05 21:26:17 +02:00
..
build-remote unsigned long long -> uint64_t 2020-07-30 13:34:04 +02:00
cpptoml Revert the enum struct change 2020-06-18 22:11:26 +00:00
libexpr Add a flag to start the REPL on evaluation errors 2020-08-05 21:26:17 +02:00
libfetchers Merge remote-tracking branch 'upstream/master' into misc-ca 2020-08-05 14:40:01 +00:00
libmain unsigned long long -> uint64_t 2020-07-30 13:34:04 +02:00
libstore Merge branch 'master' of github.com:NixOS/nix into derivation-primop-floating-output 2020-08-05 14:56:40 +00:00
libutil Merge remote-tracking branch 'upstream/master' into misc-ca 2020-08-05 14:40:01 +00:00
nix Add a flag to start the REPL on evaluation errors 2020-08-05 21:26:17 +02:00
nix-build unsigned long long -> uint64_t 2020-07-30 13:34:04 +02:00
nix-channel Merge branch 'master' into errors-phase-2 2020-05-11 14:35:30 -06:00
nix-collect-garbage unsigned long long -> uint64_t 2020-07-30 13:34:04 +02:00
nix-copy-closure Revert the enum struct change 2020-06-18 22:11:26 +00:00
nix-daemon Remove trailing whitespace 2020-06-15 14:12:39 +02:00
nix-env Get rid of basicDerivation::findOutput 2020-07-23 14:39:02 +00:00
nix-instantiate remove 'format' from Error constructor calls 2020-04-21 17:07:07 -06:00
nix-prefetch-url Merge branch 'hash-always-has-type' into better-ca-parse-errors 2020-07-13 03:02:09 +00:00
nix-store Merge branch 'master' of github.com:NixOS/nix into better-ca-parse-errors 2020-07-30 18:27:25 -04:00
resolve-system-dependencies StorePath: Rewrite in C++ 2020-06-16 14:28:41 +02:00