From a04720e68ce45943ce0eae3d477f9d554b0d63a4 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Mon, 14 Aug 2023 08:10:39 -0400 Subject: [PATCH] Rename `optOutputPath` to `optStaticOutputPath` This choice of variable name makes it more clear what is going on. Co-authored-by: Robert Hensing --- src/libexpr/eval.cc | 12 ++++++------ src/libexpr/eval.hh | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc index 3e521b732..063e34c56 100644 --- a/src/libexpr/eval.cc +++ b/src/libexpr/eval.cc @@ -1031,12 +1031,12 @@ void EvalState::mkOutputString( Value & value, const StorePath & drvPath, const std::string outputName, - std::optional optOutputPath, + std::optional optStaticOutputPath, const ExperimentalFeatureSettings & xpSettings) { value.mkString( - optOutputPath - ? store->printStorePath(*std::move(optOutputPath)) + optStaticOutputPath + ? store->printStorePath(*std::move(optStaticOutputPath)) /* Downstream we would substitute this for an actual path once we build the floating CA derivation */ : DownstreamPlaceholder::unknownCaOutput(drvPath, outputName, xpSettings).render(), @@ -2349,10 +2349,10 @@ SingleDerivedPath EvalState::coerceToSingleDerivedPath(const PosIdx pos, Value & auto i = drv.outputs.find(b.output); if (i == drv.outputs.end()) throw Error("derivation '%s' does not have output '%s'", b.drvPath->to_string(*store), b.output); - auto optOutputPath = i->second.path(*store, drv.name, b.output); + auto optStaticOutputPath = i->second.path(*store, drv.name, b.output); // This is testing for the case of CA derivations - return optOutputPath - ? store->printStorePath(*optOutputPath) + return optStaticOutputPath + ? store->printStorePath(*optStaticOutputPath) : DownstreamPlaceholder::fromSingleDerivedPathBuilt(b).render(); }, [&](const SingleDerivedPath::Built & o) { diff --git a/src/libexpr/eval.hh b/src/libexpr/eval.hh index 0268a2a12..662c123b9 100644 --- a/src/libexpr/eval.hh +++ b/src/libexpr/eval.hh @@ -685,7 +685,7 @@ public: * * @param outputName Name of the output * - * @param optOutputPath Optional output path for that string. Must + * @param optStaticOutputPath Optional output path for that string. Must * be passed if and only if output store object is input-addressed. * Will be printed to form string if passed, otherwise a placeholder * will be used (see `DownstreamPlaceholder`). @@ -696,7 +696,7 @@ public: Value & value, const StorePath & drvPath, const std::string outputName, - std::optional optOutputPath, + std::optional optStaticOutputPath, const ExperimentalFeatureSettings & xpSettings = experimentalFeatureSettings); void concatLists(Value & v, size_t nrLists, Value * * lists, const PosIdx pos, std::string_view errorCtx);