Commit graph

10252 commits

Author SHA1 Message Date
Ben Burdette cd8c232b55 add cout debugging 2021-09-15 16:16:53 -06:00
Ben Burdette 1e04b2568d remove version.txt 2021-09-14 10:52:43 -06:00
Ben Burdette 2f90d92763 remove docs accidentally added to version control 2021-09-14 10:51:14 -06:00
Ben Burdette 21071bfdeb shared_ptr for StaticEnv 2021-09-14 10:49:22 -06:00
Ben Burdette 176911102c printEnvPosChain 2021-09-13 11:57:25 -06:00
Ben Burdette 310c689d31 remove more explicit valmap code 2021-08-25 13:18:27 -06:00
Ben Burdette d8a977a22e adding all the value names from env.values[0] 2021-08-25 11:19:09 -06:00
Ben Burdette bd3b5329f9 print env bindings 2021-08-24 16:32:54 -06:00
Ben Burdette 4b5f9b35f0 env to bindings 2021-08-18 21:25:26 -06:00
Ben Burdette 2272021536 more error fixes 2021-08-18 20:02:23 -06:00
Ben Burdette e82cf13b1e switch to fakeenvs 2021-08-18 17:53:10 -06:00
Ben Burdette b6eb38016b moving towards env in exceptions 2021-08-17 14:39:50 -06:00
Ben Burdette 030271184f trying env args; but unecessary? 2021-08-09 14:30:47 -06:00
Ben Burdette 89264d20e6 move valmap to hh; add to env 2021-08-06 11:09:27 -06:00
Ben Burdette edb5a28024 hintfmt for eye searing varnames 2021-06-11 18:55:40 -06:00
Ben Burdette 129dd760e6 mapEnvBindings 2021-06-11 18:55:15 -06:00
Ben Burdette d22de1dd0c remove dead code 2021-06-09 15:38:08 -06:00
Ben Burdette 93ca9381da formatting; string arg for throwTypeError 2021-06-08 18:37:28 -06:00
Ben Burdette ebf530d31e line endings 2021-06-08 18:17:58 -06:00
Ben Burdette a8df239752 highlight the extra vars 2021-06-08 14:44:53 -06:00
Ben Burdette ff2e72054f another throwTypeError form 2021-06-08 14:44:41 -06:00
Ben Burdette 99304334ca showType(fun) 2021-05-14 18:09:30 -06:00
Ben Burdette 644567cf7e clean up w LocalNoInline macro 2021-05-14 13:40:00 -06:00
Ben Burdette 17af7dc326 throwAssertionError, throwUndefinedError -> valmap-ized 2021-05-14 11:29:26 -06:00
Ben Burdette d041dd874e throwEvalError form 4 2021-05-14 11:15:24 -06:00
Ben Burdette ed74eaa07f throwEvalError form 3 2021-05-14 11:09:18 -06:00
Ben Burdette 989a4181a8 throwEvalError form 2 2021-05-14 11:06:20 -06:00
Ben Burdette ab19d1685d throwEvalError; mapBindings 2021-05-13 16:00:48 -06:00
Ben Burdette 459bccc750 plain env pointer 2021-05-12 11:33:31 -06:00
Ben Burdette 0c2265da85 unique_ptr for valmap 2021-05-12 09:43:58 -06:00
Ben Burdette e7847ad7a1 map1/2 for stack usage 2021-05-11 15:38:49 -06:00
Ben Burdette a8fef9a6b1 throwTypeError with debugger/env 2021-05-10 18:36:57 -06:00
Ben Burdette 2dd61411af debugger on autoCallFunction error 2021-05-03 14:37:33 -06:00
Ben Burdette f32c687f03 move repl.cc to libcmd for linkage 2021-04-28 15:50:11 -06:00
Ben Burdette 57c2dd5d85 fixes 2021-04-28 09:55:08 -06:00
Ben Burdette b466d51952 Merge branch 'master' into debugger-merge 2021-04-27 12:31:01 -06:00
Domen Kožar e3e78ee2a2
Merge pull request #4751 from Ma27/storepath-pos
primops/storePath: add trace to pure mode error
2021-04-27 19:05:23 +02:00
Maximilian Bosch e6a360a4d9
primops/storePath: add trace to pure mode error
As described in #4745 it's otherwise fairly hard to understand where
this is coming from. Say you have an expression which uses e.g.
`types.package`:

``` nix
{ outputs = { self, nixpkgs }: {
    packages.x86_64-linux.hello = let
      foo = nixpkgs.lib.evalModules {
        modules = [
          {
            options.foo.bar = with nixpkgs.lib; mkOption { type = types.package; };
          }
          {
            foo.bar = ./.;
          }
        ];
      };
    in builtins.trace foo.config.foo.bar.outPath nixpkgs.legacyPackages.x86_64-linux.hello;
    defaultPackage.x86_64-linux = self.packages.x86_64-linux.hello;
  };
}
```

Then you'll get an error trace like this:

```
error: 'builtins.storePath' is not allowed in pure evaluation mode

       at /nix/store/p4h2x6r80njkb0j2rc1xjhhl99yri3zb-source/lib/attrsets.nix:328:15:

          327|     let
          328|       path' = builtins.storePath path;
             |               ^
          329|       res =

       … while evaluating the attribute 'config.foo.bar.outPath'

       at /nix/store/p4h2x6r80njkb0j2rc1xjhhl99yri3zb-source/lib/attrsets.nix:332:11:

          331|           name = sanitizeDerivationName (builtins.substring 33 (-1) (baseNameOf path'));
          332|           outPath = path';
             |           ^
          333|           outputs = [ "out" ];

       … while evaluating the attribute 'packages.x86_64-linux.hello'

       at /nix/store/6c1rfsqzrhjw1235palzjmf5vihcpci7-source/flake.nix:3:5:

            2| { outputs = { self, nixpkgs }: {
            3|     packages.x86_64-linux.hello = let
             |     ^
            4|       foo = nixpkgs.lib.evalModules {
```

Fixes #4745
2021-04-27 17:24:38 +02:00
Eelco Dolstra fe2bf464cf Merge branch 'remove-trailing-spaces' of github.com:NixOS/nix 2021-04-23 15:09:44 +02:00
regnat 31313d1401 Replace the trailing markdown spaces by a backslash
They are equivalent according to
<https://spec.commonmark.org/0.29/#hard-line-breaks>,
and the trailing spaces tend to be a pain (because the make git
complain, editors tend to want to remove them − the `.editorconfig`
actually specifies that − etc..).
2021-04-23 14:37:21 +02:00
Eelco Dolstra 4549d65b4f
Merge pull request #4732 from NixOS/4725-always-register-the-realisations
Aways register the realisations
2021-04-23 14:22:03 +02:00
Eelco Dolstra 3996ca42cf
Merge pull request #4735 from NixOS/document-ca-derivations
(briefly) document how to build ca derivations
2021-04-23 14:21:25 +02:00
Eelco Dolstra 788008385e Use lowdown 0.8.4 2021-04-23 14:20:32 +02:00
Eelco Dolstra e65f604ea9 Set more man sections 2021-04-23 14:20:28 +02:00
Eelco Dolstra 5a1feddfe7 Merge branch 'man1' of https://github.com/alyssais/nix 2021-04-23 14:20:17 +02:00
Alyssa Ross 29132f99c5
doc: fix section in nix3 man page metadata
These man pages said they were in section 7, even though we were
installing them to section 1 (which is the right place for them).
2021-04-23 10:52:54 +00:00
Eelco Dolstra 293220bed5
Merge pull request #4440 from Ma27/misc-pos-fixes
Miscellaneous improvements for positioning in eval-errors
2021-04-23 11:10:59 +02:00
regnat 2207018df5 (briefly) document how to build ca derivations 2021-04-23 10:28:26 +02:00
regnat d3df747cb6 Revert "Make nix shell fallback to static outputs when needed"
This reverts commit 8d66f5f110.

This fix isn't needed anymore now that the realisations are always
properly registered
2021-04-23 09:34:43 +02:00
regnat 6ea9c65aec fixup! Add a regression test for #4725 2021-04-23 09:34:16 +02:00