aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/eval.cc
AgeCommit message (Collapse)Author
2020-07-14Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-07-13toStorePath(): Return a StorePath and the suffixEelco Dolstra
2020-07-06Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-07-02move showTrace to new loggerSettingsBen Burdette
2020-06-30double addtrace for 'called from'Ben Burdette
2020-06-29EvalCache: Store string contextsEelco Dolstra
2020-06-26Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-06-24convenience form of addTraceBen Burdette
2020-06-23use plain errPos instead of nixCode; fix testsBen Burdette
2020-06-19addErrorTraceBen Burdette
2020-06-18Some backports from the flakes branchEelco Dolstra
2020-06-18Remove unneeded #includeEelco Dolstra
2020-06-18Make constant primops lazyEelco Dolstra
(cherry picked from commit aa0e2a2e70a3519a9dcb9b1da000a13c01aa6cc1)
2020-06-17Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-06-15Get rid of explicit ErrorInfo constructorsEelco Dolstra
2020-06-15Disambiguate BaseError(Args) constructorEelco Dolstra
This means that 'throw Error({ ... ErrorInfo ... })' now works.
2020-06-03Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-05-29Merge remote-tracking branch 'upstream/master' into errors-phase-2Ben Burdette
2020-05-26Merge remote-tracking branch 'origin/master' into enum-FileIngestionMethodCarlo Nucera
2020-05-12move pos to the first arg, to indicate its not used in a fmt templateBen Burdette
2020-05-12new pos format for more errorsBen Burdette
2020-05-11Merge branch 'master' into errors-phase-2Ben Burdette
2020-05-08add pos to errorinfo, remove from hintsBen Burdette
2020-04-27nix search: Search legacyPackages recursivelyEelco Dolstra
2020-04-23Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-04-21remove 'format' from Error constructor callsBen Burdette
2020-04-18Merge pull request #3502 from NixOS/more-posDomen Kožar
pass Pos to forceValue to improve infinite recursion error
2020-04-17Use a more space/time-efficient representation for the eval cacheEelco Dolstra
2020-04-16Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-04-16Add function to allocate a Value in traceable memoryEelco Dolstra
2020-04-16pass Pos to forceValue to improve infinite recursion errorDomen Kožar
2020-04-09Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-04-09Attach pos to if expression errorsDomen Kožar
2020-04-08datatransfer.{cc,hh} -> filetransfer.{cc,hh}Nikola Knezevic
2020-04-08Rename src/lib/download.* to src/lib/datatransfer.*Nikola Knezevic
2020-03-29Replace some `bool recursive` with a new `FileIngestionMethod` enumJohn Ericson
2020-03-17Require shallow clones to be requested explicitlyEelco Dolstra
If you do a fetchTree on a Git repository, whether the result contains a revCount attribute should not depend on whether that repository happens to be a shallow clone or not. That would complicate caching a lot and would be semantically messy. So applying fetchTree/fetchGit to a shallow repository is now an error unless you pass the attribute 'shallow = true'. If 'shallow = true', we don't return revCount, even if the repository is not actually shallow. Note that Nix itself is not doing shallow clones at the moment. But it could do so as an optimisation if the user specifies 'shallow = true'. Issue #2988.
2020-01-21Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-01-13Tweak error messageEelco Dolstra
2020-01-11libexpr: show expression in assertion errorsDaiderd Jordan
Includes the expression of the condition in the assertion message if the assertion failed, making assertions much easier to debug. eg. error: assertion (withPython -> (python2Packages != null)) failed at pkgs/tools/security/nmap/default.nix:11:1
2020-01-06Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-01-05Hide FunctionCallTrace constructor/destructorEelco Dolstra
This prevents them from being inlined. On gcc 9, this reduces the stack size needed for nix-instantiate '<nixpkgs>' -A texlive.combined.scheme-full --dry-run from 12.9 MiB to 4.8 MiB.
2019-12-11Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2019-12-10Make the Store API more type-safeEelco Dolstra
Most functions now take a StorePath argument rather than a Path (which is just an alias for std::string). The StorePath constructor ensures that the path is syntactically correct (i.e. it looks like <store-dir>/<base32-hash>-<name>). Similarly, functions like buildPaths() now take a StorePathWithOutputs, rather than abusing Path by adding a '!<outputs>' suffix. Note that the StorePath type is implemented in Rust. This involves some hackery to allow Rust values to be used directly in C++, via a helper type whose destructor calls the Rust type's drop() function. The main issue is the dynamic nature of C++ move semantics: after we have moved a Rust value, we should not call the drop function on the original value. So when we move a value, we set the original value to bitwise zero, and the destructor only calls drop() if the value is not bitwise zero. This should be sufficient for most types. Also lots of minor cleanups to the C++ API to make it more modern (e.g. using std::optional and std::string_view in some places).
2019-12-10EvalState::callFunction(): Make FunctionCallTrace use less stack spaceEelco Dolstra
The FunctionCallTrace object consumes a few hundred bytes of stack space, even when tracing is disabled. This was causing stack overflows: $ nix-instantiate '<nixpkgs> -A texlive.combined.scheme-full --dry-run error: stack overflow (possible infinite recursion) This is with the default stack size of 8 MiB. Putting the object on the heap reduces stack usage to < 5 MiB.
2019-12-05Move #includeEelco Dolstra
(cherry picked from commit 8beedd44861d1fe7208609ee8d231ca1c02dedf6)
2019-12-04Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2019-11-28Remove builtins.valueSizeEelco Dolstra
Fixes #3246.
2019-11-25Ensure enough space in attrset bindings when using both __overrides and ↵Puck Meerburg
dynamic attributes
2019-11-22Turn NIX_PATH into a config settingEelco Dolstra
This allows it to be set in nix.conf.