aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/attr-path.cc
AgeCommit message (Collapse)Author
2021-07-19Rename findDerivationFilename -> findPackageFilenameRobert Hensing
It does not operate on a derivation and does not return a derivation path. Instead it works at the language level, where a distinct term "package" is more appropriate to distinguish the parent object of `meta.position`; an attribute which doesn't even make it into the derivation.
2021-07-01Prefer to throw specific errorsPamplemousse
Signed-off-by: Pamplemousse <xav.maso@gmail.com>
2021-01-08string2Int(): Return std::optionalEelco Dolstra
2020-12-17Rename Value::normalType() -> Value::type()Silvan Mosberger
2020-12-12Use Value::normalType on all forced values instead of Value::typeSilvan Mosberger
2020-06-18Merge branch 'master' into caveman-LOCsBen Burdette
2020-06-18Some backports from the flakes branchEelco Dolstra
2020-06-15Remove trailing whitespaceEelco Dolstra
2020-05-20print LOC for stdin, string argsBen Burdette
2020-04-21remove 'format' from Error constructor callsBen Burdette
2020-04-02libexpr: remove unused attrErrorAndreas Rammhold
The attrError variable is no longer used but still allocated on every call to the findAlongAttrPath function.
2020-03-24nix edit: Support non-derivation attributesEelco Dolstra
E.g. $ nix edit .#nixosConfigurations.bla now works. (cherry picked from commit d2032edb2f86e955a8a7724a27c0c3225f386500)
2020-03-24findAlongAttrPath(): Return positionEelco Dolstra
(cherry picked from commit 0b013a54dc570395bed887369f8dd622b8ce337b)
2020-03-24findAlongAttrPath(): Throw AttrPathNotFoundEelco Dolstra
(cherry picked from commit 6b0ca8e803710342af70e257935724c5ad84ca04)
2019-10-28findDerivationFilename: add FIXMEzimbatm
2019-10-28libexpr: findDerivationFilename return Pos instead of tuplezimbatm
2019-10-23libexpr: add findDerivationFilenamezimbatm
extract the derivation to filename:lineno heuristic
2017-07-30Replace Unicode quotes in user-facing strings by ASCIIJörg Thalheim
Relevant RFC: NixOS/rfcs#4 $ ag -l | xargs sed -i -e "/\"/s/’/'/g;/\"/s/‘/'/g"
2016-11-26Revert "Get rid of unicode quotes (#1140)"Eelco Dolstra
This reverts commit f78126bfd6b6c8477fcdbc09b2f98772dbe9a1e7. There really is no need for such a massive change...
2016-11-25Get rid of unicode quotes (#1140)Guillaume Maudoux
2015-07-23Optimize small listsEelco Dolstra
The value pointers of lists with 1 or 2 elements are now stored in the list value itself. In particular, this makes the "concatMap (x: if cond then [(f x)] else [])" idiom cheaper.
2015-07-17OCD: foreach -> C++11 ranged forEelco Dolstra
2014-08-20Use proper quotes everywhereEelco Dolstra
2013-11-18Support quoted attribute names in -AEelco Dolstra
This is requires if you have attribute names with dots in them. So you can now say: $ nix-instantiate '<nixos>' -A 'config.systemd.units."postgresql.service".text' --eval-only Fixes #151.
2013-10-24Rename "attribute sets" to "sets"Eelco Dolstra
We don't have any other kind of sets so calling them attribute sets is unnecessarily verbose.
2013-09-03Work on Values instead of ExprsEelco Dolstra
This prevents some duplicate evaluation in nix-env and nix-instantiate. Also, when traversing ~/.nix-defexpr, only read regular files with the extension .nix. Previously it was reading files like .../channels/binary-caches/<name>. The only reason this didn't cause problems is pure luck (namely, <name> shadows an actual Nix expression, the binary-caches files happen to be syntactically valid Nix expressions, and we iterate over the directory contents in just the right order).
2013-09-02Get rid of a signedness warningEelco Dolstra
2013-09-02Fix whitespaceEelco Dolstra
2012-09-19Templatise tokenizeString()Eelco Dolstra
2012-03-05Fix compilation on FreeBSDEelco Dolstra
http://hydra.nixos.org/build/2213576 Not sure why compilation doesn't fail on other platforms...
2010-10-24* Store attribute sets as a vector instead of a map (i.e. a red-blackEelco Dolstra
tree). This saves a lot of memory. The vector should be sorted so that names can be looked up using binary search, but this is not the case yet. (Surprisingly, looking up attributes using linear search doesn't have a big impact on performance.) Memory consumption for $ nix-instantiate /etc/nixos/nixos/tests -A bittorrent.test --readonly-mode on x86_64-linux with GC enabled is now 185 MiB (compared to 946 MiB on the trunk).
2010-10-22* Store Value nodes outside of attribute sets. I.e., Attr now storesEelco Dolstra
a pointer to a Value, rather than the Value directly. This improves the effectiveness of garbage collection a lot: if the Value is stored inside the set directly, then any live pointer to the Value causes all other attributes in the set to be live as well.
2010-05-07* Keep track of the source positions of attributes.Eelco Dolstra
2010-04-15* Store lists as lists of pointers to values rather than as lists ofEelco Dolstra
values. This improves sharing and gives another speed up. Evaluation of the NixOS system attribute is now almost 7 times faster than the old evaluator.
2010-04-13* Use a symbol table to represent identifiers and attribute namesEelco Dolstra
efficiently. The symbol table ensures that there is only one copy of each symbol, thus allowing symbols to be compared efficiently using a pointer equality test.
2010-04-12* Don't use ATerms for the abstract syntax trees anymore. NotEelco Dolstra
finished yet.
2010-04-07* Update autoCallFunction() and findAlongAttrPath().Eelco Dolstra
2010-03-29* Started integrating the new evaluator.Eelco Dolstra
2007-01-13* Cleanup.Eelco Dolstra
2006-09-04* Use a proper namespace.Eelco Dolstra
* Optimise header file usage a bit. * Compile the parser as C++.
2006-08-23* Pass the autoArgs to findAlongAttrPath so that "nix-instantiateEelco Dolstra
foo.nix -A attr --arg name value" will work if (name, value) is needed in the evaluation leading up to "attr".
2006-07-28* `nix-instantiate ... --arg NAME VALUE': allow arguments to be passedEelco Dolstra
to functions from the command line. * nix-build: started removing backticks.
2006-07-26* Refactoring: get the selection path stuff out of getDerivations()Eelco Dolstra
and put it into a separate function findAlongAttrPath().