summaryrefslogtreecommitdiffstats
path: root/src/libexpr/eval.cc
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-12-18Replace Value type setters with mk* functionsSilvan Mosberger
Move clearValue inside Value mkInt instead of setInt mkBool instead of setBool mkString instead of setString mkPath instead of setPath mkNull instead of setNull mkAttrs instead of setAttrs mkList instead of setList* mkThunk instead of setThunk mkApp instead of setApp mkLambda instead of setLambda mkBlackhole instead of setBlackhole mkPrimOp instead of setPrimOp mkPrimOpApp instead of setPrimOpApp mkExternal instead of setExternal mkFloat instead of setFloat Add note that the static mk* function should be removed eventually
2020-12-17Rename Value::normalType() -> Value::type()Silvan Mosberger
2020-12-17Rename ValueType -> InternalType, NormalType -> ValueTypeSilvan Mosberger
And Value::type to Value::internalType, such that type() can be used in the next commit to get the new ValueType
2020-12-12Make Value::type privateSilvan Mosberger
This is an implementation detail and shouldn't be used. Use normalType() and the various is<Type> functions instead
2020-12-12Add ValueType checking functions for types that have the same NormalTypeSilvan Mosberger
2020-12-12Use Value::normalType on all forced values instead of Value::typeSilvan Mosberger
2020-12-12Introduce Value type setters and make use of themSilvan Mosberger
2020-12-12Introduce NormalType for the normal type of a ValueSilvan Mosberger
This will be useful to abstract over the ValueType implementation details Make use of it already to replace the showType(ValueType) function
2020-11-12Fix default nix-pathChristian Höppner
The default nix-path values for nixpkgs and root channels were incorrect.
2020-11-05Merge pull request #4206 from hercules-ci/fix-coroutine-gcEelco Dolstra
Fix memory corruption caused by GC-invisible coroutine stacks
2020-11-03Fix error message 'assertion failed at'Eelco Dolstra
2020-10-30BoehmGCStackAllocator: increase stack size to 8MBRobert Hensing
The default stack size was not based on the normal stack size and was too small.
2020-10-30Fix memory corruption caused by GC-invisible coroutine stacksRobert Hensing
Crucially this introduces BoehmGCStackAllocator, but it also adds a bunch of wiring to avoid making libutil depend on bdw-gc. Part of the solutions for #4178, #4200
2020-10-26isTrivial(): Support trivial listsEelco Dolstra
2020-10-06Remove static variable name clashesEelco Dolstra
This was useful for an experiment with building Nix as a single compilation unit. It's not very useful otherwise but also doesn't hurt...
2020-09-21Don't include <regex> in header filesEelco Dolstra
This reduces compilation time by ~15 seconds (CPU time). Issue #4045.
2020-09-16Fix doc generationEelco Dolstra
2020-09-14Escape `${` in strings when printing Nix expressionsregnat
Otherwise the result of the printing can't be parsed back correctly by Nix (because the unescaped `${` will be parsed as the begining of an anti-quotation). Fix #3989
2020-09-11Fix auto argument passing for more auto arguments than formalsSilvan Mosberger
The change in 626200713bb3cc844a9feb6af583c9b6b42c6dbc didn't account for when the number of auto arguments is bigger than the number of formal arguments. This causes the following: $ nix-instantiate --eval -E '{ ... }@args: args.foo' --argstr foo foo nix-instantiate: src/libexpr/attr-set.hh:55: void nix::Bindings::push_back(const nix::Attr&): Assertion `size_ < capacity_' failed. Aborted (core dumped)
2020-08-31Merge remote-tracking branch 'origin/master' into markdownEelco Dolstra
2020-08-27Pass all args when auto-calling a function with an ellipsisGriffin Smith
The command line options --arg and --argstr that are used by a bunch of CLI commands to pass arguments to top-level functions in files go through the same code-path as auto-calling top-level functions with their default arguments - this, however, was only passing the arguments that were *explicitly* mentioned in the formals of the function - in the case of an as-pattern with an ellipsis (eg args @ { ... }) extra passed arguments would get omitted. This fixes that to instead pass *all* specified auto args in the case that our function has an ellipsis. Fixes #598
2020-08-25Add getDoc() functionEelco Dolstra
2020-08-24Don't barf if corepkgs is in the store but not a valid pathEelco Dolstra
This can happen when using a dummy store (or indeed any non-local store).
2020-08-24Allow primops to have Markdown documentationEelco Dolstra
2020-08-20Remove PrimOp constructorEelco Dolstra
2020-08-05Merge remote-tracking branch 'obsidian/misc-ca' into ↵John Ericson
derivation-primop-floating-output
2020-08-05TypoEelco 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-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