mirror of
https://github.com/NixOS/nix
synced 2025-07-06 21:41:48 +02:00
No global eval settings in libnixexpr
Progress on #5638 There is still a global eval settings, but it pushed down into `libnixcmd`, which is a lot less bad a place for this sort of thing.
This commit is contained in:
parent
cb0c868da4
commit
52bfccf8d8
24 changed files with 102 additions and 71 deletions
|
@ -19,14 +19,14 @@ namespace nix {
|
|||
static void SetUpTestSuite() {
|
||||
LibStoreTest::SetUpTestSuite();
|
||||
initGC();
|
||||
evalSettings.nixPath = {};
|
||||
}
|
||||
|
||||
protected:
|
||||
LibExprTest()
|
||||
: LibStoreTest()
|
||||
, state({}, store)
|
||||
, state({}, store, evalSettings, nullptr)
|
||||
{
|
||||
evalSettings.nixPath = {};
|
||||
}
|
||||
Value eval(std::string input, bool forceValue = true) {
|
||||
Value v;
|
||||
|
@ -42,6 +42,8 @@ namespace nix {
|
|||
return state.symbols.create(value);
|
||||
}
|
||||
|
||||
bool readOnlyMode = true;
|
||||
EvalSettings evalSettings{readOnlyMode};
|
||||
EvalState state;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue