1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 09:31:16 +02:00
nix/src/libexpr
John Ericson 5576d5e987 Parse string context elements properly
Prior to this change, we had a bunch of ad-hoc string manipulation code
scattered around. This made it hard to figure out what data model for
string contexts is.

Now, we still store string contexts most of the time as encoded strings
--- I was wary of the performance implications of changing that --- but
whenever we parse them we do so only through the
`NixStringContextElem::parse` method, which handles all cases. This
creates a data type that is very similar to `DerivedPath` but:

 - Represents the funky `=<drvpath>` case as properly distinct from the
   others.

 - Only encodes a single output, no wildcards and no set, for the
   "built" case.

(I would like to deprecate `=<path>`, after which we are in spitting
distance of `DerivedPath` and could maybe get away with fewer types, but
that is another topic for another day.)
2023-01-10 13:10:49 -05:00
..
flake Make clear that StorePathWithOutputs is a deprecated type 2023-01-10 11:27:19 -05:00
primops Parse string context elements properly 2023-01-10 13:10:49 -05:00
tests Parse string context elements properly 2023-01-10 13:10:49 -05:00
value Parse string context elements properly 2023-01-10 13:10:49 -05:00
attr-path.cc Merge remote-tracking branch 'origin/master' into coerce-string 2022-04-29 00:12:25 +02:00
attr-path.hh replace most Pos objects/ptrs with indexes into a position table 2022-04-21 21:46:06 +02:00
attr-set.cc Don't pass Symbol by reference 2022-04-26 13:25:17 +02:00
attr-set.hh Don't pass Symbol by reference 2022-04-26 13:25:17 +02:00
eval-cache.cc Parse string context elements properly 2023-01-10 13:10:49 -05:00
eval-cache.hh Make nix::eval_cache::int_t more idiomatic 2022-05-16 16:36:21 +02:00
eval-inline.hh Rework error throwing, and test it 2022-10-25 01:46:10 +02:00
eval.cc Parse string context elements properly 2023-01-10 13:10:49 -05:00
eval.hh Parse string context elements properly 2023-01-10 13:10:49 -05:00
fetchurl.nix fetchurl.nix: change other use of __impure 2022-09-16 01:54:24 -07:00
function-trace.cc Revert the enum struct change 2020-06-18 22:11:26 +00:00
function-trace.hh replace most Pos objects/ptrs with indexes into a position table 2022-04-21 21:46:06 +02:00
get-drvs.cc Merge remote-tracking branch 'origin/master' into coerce-string 2023-01-02 20:53:39 +01:00
get-drvs.hh Remove pre-C++11 hackiness 2022-05-26 12:40:01 +02:00
imported-drv-to-derivation.nix Move some corepkgs into the nix binary 2020-03-11 16:57:48 +01:00
json-to-value.cc return string_views from forceString* 2022-01-27 17:15:43 +01:00
json-to-value.hh return string_views from forceString* 2022-01-27 17:15:43 +01:00
lexer.l Handle EOFs in string literals correctly 2022-05-25 17:58:13 +02:00
local.mk Parse string context elements properly 2023-01-10 13:10:49 -05:00
nix-expr.pc.in pkg-config files: Use c++17 2019-03-14 14:11:12 +01:00
nixexpr.cc Restore display of source lines for stdin/string inputs 2022-12-13 16:00:44 +01:00
nixexpr.hh Merge remote-tracking branch 'origin/master' into coerce-string 2023-01-02 20:53:39 +01:00
parser.y Merge remote-tracking branch 'origin/master' into coerce-string 2023-01-02 20:53:39 +01:00
primops.cc Parse string context elements properly 2023-01-10 13:10:49 -05:00
primops.hh replace most Pos objects/ptrs with indexes into a position table 2022-04-21 21:46:06 +02:00
symbol-table.hh EvalCache AttrKey: Use Symbol instead of std::string 2022-04-26 14:16:20 +02:00
value-to-json.cc EvalState::copyPathToStore(): Return a StorePath 2022-12-20 14:58:39 +01:00
value-to-json.hh Replace src/libutil/json.cc with nlohmann json generation 2022-11-16 16:50:50 +01:00
value-to-xml.cc Introduce AbstractPos 2022-12-13 00:50:43 +01:00
value-to-xml.hh replace most Pos objects/ptrs with indexes into a position table 2022-04-21 21:46:06 +02:00
value.hh Parse string context elements properly 2023-01-10 13:10:49 -05:00