aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/eval.hh
AgeCommit message (Collapse)Author
2020-12-22Move <nix/fetchurl.nix> into the nix binaryEelco Dolstra
This makes the statically linked nix binary just work, without needing any additional files.
2020-09-21Don't include <regex> in header filesEelco Dolstra
This reduces compilation time by ~15 seconds (CPU time). Issue #4045.
2020-08-25Add getDoc() functionEelco Dolstra
2020-08-24Allow primops to have Markdown documentationEelco Dolstra
2020-08-20Remove PrimOp constructorEelco Dolstra
2020-08-19Generate the nix.conf docs from the source codeEelco Dolstra
This means we don't have two (divergent) sets of option descriptions anymore.
2020-08-07Make --no-eval-cache a global settingEelco Dolstra
2020-07-22Parse CA derivations using new output variantsJohn Ericson
We no longer need `ParsedDerivation` because everything libstore needs to know about is in the `BasicDerivation` proper.
2020-07-06Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-06-29EvalCache: Store string contextsEelco Dolstra
2020-06-26Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-06-18Merge branch 'master' into caveman-LOCsBen Burdette
2020-06-18Some backports from the flakes branchEelco Dolstra
2020-06-17Replace struct StorePath with class StorePathMatthew Bauer
also a similar case with struct Goal
2020-05-20print LOC for stdin, string argsBen Burdette
2020-04-27nix search: Search legacyPackages recursivelyEelco Dolstra
2020-04-17Use a more space/time-efficient representation for the eval cacheEelco Dolstra
2020-03-24Misc changes from the flakes branchEelco Dolstra
2020-03-24EvalState::allocAttr(): Add convenience methodEelco Dolstra
(cherry picked from commit c02da997570ac0d9b595d787bea8cb5a4e3cc1f5)
2020-03-20Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-03-13Add missing `#include <regex>`John Ericson
2020-03-11Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-03-11parseExprFromString(): Use std::string_viewEelco Dolstra
2020-03-04Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-03-04builtins.cache: Cache regular expressionsEelco Dolstra
The evaluator was spending about 1% of its time compiling a small number of regexes over and over again.
2020-01-21Pluggable fetchersEelco Dolstra
Flakes are now fetched using an extensible mechanism. Also lots of other flake cleanups.
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-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-22Turn NIX_PATH into a config settingEelco Dolstra
This allows it to be set in nix.conf.
2019-11-20Remove #includeEelco Dolstra
2019-11-20Move #includeEelco Dolstra
2019-11-06Use more stable registry URLEelco Dolstra
2019-11-04Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2019-10-27Merge branch 'tojson-tostring-fix' of https://github.com/mayflower/nixEelco Dolstra
2019-10-27builtins.toJSON: fix __toString usageRobin Gloster
2019-09-20Add flags to disallow dirty Git trees and to turn off warningsEelco Dolstra
2019-09-09Require flake.nix to be an attrset (not a non-trivial thunk)Eelco Dolstra
2019-09-09Don't allow arbitrary computations in flake attributesEelco Dolstra
E.g. you can write 'edition = 201909' but not 'edition = 201909 + 0'. Fixes #3075.
2019-08-30Extract flake dependencies from the 'outputs' argumentsEelco Dolstra
That is, instead of inputs = [ "nixpkgs" ]; outputs = inputs: ... inputs.nixpkgs ...; you can write outputs = { nixpkgs }: ... inputs.nixpkgs ...;
2019-08-29Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2019-08-14Track function start and ends for flame graphsGraham Christensen
With this patch, and this file I called `log.py`: #!/usr/bin/env nix-shell #!nix-shell -i python3 -p python3 --pure import sys from pprint import pprint stack = [] timestack = [] for line in open(sys.argv[1]): components = line.strip().split(" ", 2) if components[0] != "function-trace": continue direction = components[1] components = components[2].rsplit(" ", 2) loc = components[0] _at = components[1] time = int(components[2]) if direction == "entered": stack.append(loc) timestack.append(time) elif direction == "exited": dur = time - timestack.pop() vst = ";".join(stack) print(f"{vst} {dur}") stack.pop() and: nix-instantiate --trace-function-calls -vvvv ../nixpkgs/pkgs/top-level/release.nix -A unstable > log.matthewbauer 2>&1 ./log.py ./log.matthewbauer > log.matthewbauer.folded flamegraph.pl --title matthewbauer-post-pr log.matthewbauer.folded > log.matthewbauer.folded.svg I can make flame graphs like: http://gsc.io/log.matthewbauer.folded.svg --- Includes test cases around function call failures and tryEval. Uses RAII so the finish is always called at the end of the function.
2019-05-29Put flake-related stuff in its own namespaceEelco Dolstra
2019-05-22Fetch the flake registry from the NixOS/flake-registry repoEelco Dolstra
2019-05-07Make the URL/path of the global flake registry configurableEelco Dolstra
2019-04-30Fixed issue #13Nick Van den Broeck
2019-03-27Merge remote-tracking branch 'tweag/flake-registries' into flakesEelco Dolstra
2019-03-26Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra