1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-10 12:36:01 +01:00

Rename SearchPath to LookupPath and searchPath to lookupPath

This commit is contained in:
Roland Coeurjoly 2024-04-13 17:35:15 +02:00
parent 8c4c2156bd
commit 40a6a9fdb8
29 changed files with 136 additions and 136 deletions

View file

@ -128,10 +128,10 @@ ref<EvalState> EvalCommand::getEvalState()
evalState =
#if HAVE_BOEHMGC
std::allocate_shared<EvalState>(traceable_allocator<EvalState>(),
searchPath, getEvalStore(), getStore())
lookupPath, getEvalStore(), getStore())
#else
std::make_shared<EvalState>(
searchPath, getEvalStore(), getStore())
lookupPath, getEvalStore(), getStore())
#endif
;

View file

@ -125,7 +125,7 @@ MixEvalArgs::MixEvalArgs()
.category = category,
.labels = {"path"},
.handler = {[&](std::string s) {
searchPath.elements.emplace_back(SearchPath::Elem::parse(s));
lookupPath.elements.emplace_back(LookupPath::Elem::parse(s));
}}
});

View file

@ -23,7 +23,7 @@ struct MixEvalArgs : virtual Args, virtual MixRepair
Bindings * getAutoArgs(EvalState & state);
SearchPath searchPath;
LookupPath lookupPath;
std::optional<std::string> evalStoreUrl;

View file

@ -77,7 +77,7 @@ struct NixRepl
std::unique_ptr<ReplInteracter> interacter;
NixRepl(const SearchPath & searchPath, nix::ref<Store> store,ref<EvalState> state,
NixRepl(const LookupPath & lookupPath, nix::ref<Store> store,ref<EvalState> state,
std::function<AnnotatedValues()> getValues);
virtual ~NixRepl() = default;
@ -122,7 +122,7 @@ std::string removeWhitespace(std::string s)
}
NixRepl::NixRepl(const SearchPath & searchPath, nix::ref<Store> store, ref<EvalState> state,
NixRepl::NixRepl(const LookupPath & lookupPath, nix::ref<Store> store, ref<EvalState> state,
std::function<NixRepl::AnnotatedValues()> getValues)
: AbstractNixRepl(state)
, debugTraceIndex(0)
@ -508,7 +508,7 @@ ProcessLineResult NixRepl::processLine(std::string line)
// runProgram redirects stdout to a StringSink,
// using runProgram2 to allow editors to display their UI
runProgram2(RunOptions { .program = editor, .searchPath = true, .args = args });
runProgram2(RunOptions { .program = editor, .lookupPath = true, .args = args });
// Reload right after exiting the editor
state->resetFileCache();
@ -784,11 +784,11 @@ void NixRepl::evalString(std::string s, Value & v)
std::unique_ptr<AbstractNixRepl> AbstractNixRepl::create(
const SearchPath & searchPath, nix::ref<Store> store, ref<EvalState> state,
const LookupPath & lookupPath, nix::ref<Store> store, ref<EvalState> state,
std::function<AnnotatedValues()> getValues)
{
return std::make_unique<NixRepl>(
searchPath,
lookupPath,
openStore(),
state,
getValues
@ -804,9 +804,9 @@ ReplExitStatus AbstractNixRepl::runSimple(
NixRepl::AnnotatedValues values;
return values;
};
SearchPath searchPath = {};
LookupPath lookupPath = {};
auto repl = std::make_unique<NixRepl>(
searchPath,
lookupPath,
openStore(),
evalState,
getValues

View file

@ -20,7 +20,7 @@ struct AbstractNixRepl
typedef std::vector<std::pair<Value*,std::string>> AnnotatedValues;
static std::unique_ptr<AbstractNixRepl> create(
const SearchPath & searchPath, nix::ref<Store> store, ref<EvalState> state,
const LookupPath & lookupPath, nix::ref<Store> store, ref<EvalState> state,
std::function<AnnotatedValues()> getValues);
static ReplExitStatus runSimple(