mirror of
https://github.com/NixOS/nix.git
synced 2025-11-11 21:16:02 +01:00
Merge pull request #14525 from NixOS/reset-positions-repl
libexpr: Clear PosTable contents in EvalState::resetFileCache
This commit is contained in:
commit
60667e9e5a
2 changed files with 11 additions and 0 deletions
|
|
@ -1113,6 +1113,7 @@ void EvalState::resetFileCache()
|
|||
importResolutionCache->clear();
|
||||
fileEvalCache->clear();
|
||||
inputCache->clear();
|
||||
positions.clear();
|
||||
}
|
||||
|
||||
void EvalState::eval(Expr * e, Value & v)
|
||||
|
|
|
|||
|
|
@ -111,6 +111,16 @@ public:
|
|||
return o->origin;
|
||||
return std::monostate{};
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove all origins from the table.
|
||||
*/
|
||||
void clear()
|
||||
{
|
||||
auto lines = linesCache.lock();
|
||||
lines->clear();
|
||||
origins.clear();
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace nix
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue