1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 14:21:48 +02:00

Merge pull request #10913 from NixOS/no-global-eval-settings-in-libexpr

No global eval settings in `libnixexpr`
This commit is contained in:
Robert Hensing 2024-06-24 18:52:19 +02:00 committed by GitHub
commit c66f1e7660
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 102 additions and 71 deletions

View file

@ -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;
};