mirror of
https://github.com/NixOS/nix.git
synced 2025-11-20 09:19:36 +01:00
Add an (always empty) eval cache to the attr sets
This commit is contained in:
parent
891390d76f
commit
074e0678bd
7 changed files with 581 additions and 16 deletions
|
|
@ -1699,18 +1699,6 @@ string EvalState::forceString(Value & v, const Pos & pos)
|
|||
}
|
||||
|
||||
|
||||
/* Decode a context string ‘!<name>!<path>’ into a pair <path,
|
||||
name>. */
|
||||
std::pair<string, string> decodeContext(std::string_view s)
|
||||
{
|
||||
if (s.at(0) == '!') {
|
||||
size_t index = s.find("!", 1);
|
||||
return {std::string(s.substr(index + 1)), std::string(s.substr(1, index - 1))};
|
||||
} else
|
||||
return {s.at(0) == '/' ? std::string(s) : std::string(s.substr(1)), ""};
|
||||
}
|
||||
|
||||
|
||||
void copyContext(const Value & v, PathSet & context)
|
||||
{
|
||||
if (v.string.context)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue