From a7c0cff07f3e1af60bdbcd5bf7e13f8ae768da90 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Wed, 11 Jan 2023 02:00:44 -0500 Subject: Rename `OutputPath` -> `ExtendedOutputPath` Do this prior to making a new more limitted `OutputPath` we will use in more places. --- src/libcmd/installables.cc | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/libcmd/installables.cc') diff --git a/src/libcmd/installables.cc b/src/libcmd/installables.cc index ce40986d0..b80ae4df1 100644 --- a/src/libcmd/installables.cc +++ b/src/libcmd/installables.cc @@ -446,19 +446,19 @@ struct InstallableAttrPath : InstallableValue SourceExprCommand & cmd; RootValue v; std::string attrPath; - OutputsSpec outputsSpec; + ExtendedOutputsSpec extendedOutputsSpec; InstallableAttrPath( ref state, SourceExprCommand & cmd, Value * v, const std::string & attrPath, - OutputsSpec outputsSpec) + ExtendedOutputsSpec extendedOutputsSpec) : InstallableValue(state) , cmd(cmd) , v(allocRootValue(v)) , attrPath(attrPath) - , outputsSpec(std::move(outputsSpec)) + , extendedOutputsSpec(std::move(extendedOutputsSpec)) { } std::string what() const override { return attrPath; } @@ -490,10 +490,10 @@ struct InstallableAttrPath : InstallableValue std::set outputsToInstall; - if (auto outputNames = std::get_if(&outputsSpec)) + if (auto outputNames = std::get_if(&extendedOutputsSpec)) outputsToInstall = *outputNames; else - for (auto & output : drvInfo.queryOutputs(false, std::get_if(&outputsSpec))) + for (auto & output : drvInfo.queryOutputs(false, std::get_if(&extendedOutputsSpec))) outputsToInstall.insert(output.first); auto derivedPath = byDrvPath.emplace(*drvPath, DerivedPath::Built { .drvPath = *drvPath }).first; @@ -581,7 +581,7 @@ InstallableFlake::InstallableFlake( ref state, FlakeRef && flakeRef, std::string_view fragment, - OutputsSpec outputsSpec, + ExtendedOutputsSpec extendedOutputsSpec, Strings attrPaths, Strings prefixes, const flake::LockFlags & lockFlags) @@ -589,7 +589,7 @@ InstallableFlake::InstallableFlake( flakeRef(flakeRef), attrPaths(fragment == "" ? attrPaths : Strings{(std::string) fragment}), prefixes(fragment == "" ? Strings{} : prefixes), - outputsSpec(std::move(outputsSpec)), + extendedOutputsSpec(std::move(extendedOutputsSpec)), lockFlags(lockFlags) { if (cmd && cmd->getAutoArgs(*state)->size()) @@ -657,7 +657,7 @@ DerivedPathsWithInfo InstallableFlake::toDerivedPaths() priority = aPriority->getInt(); } - if (outputsToInstall.empty() || std::get_if(&outputsSpec)) { + if (outputsToInstall.empty() || std::get_if(&extendedOutputsSpec)) { outputsToInstall.clear(); if (auto aOutputs = attr->maybeGetAttr(state->sOutputs)) for (auto & s : aOutputs->getListOfStrings()) @@ -667,7 +667,7 @@ DerivedPathsWithInfo InstallableFlake::toDerivedPaths() if (outputsToInstall.empty()) outputsToInstall.insert("out"); - if (auto outputNames = std::get_if(&outputsSpec)) + if (auto outputNames = std::get_if(&extendedOutputsSpec)) outputsToInstall = *outputNames; return {{ @@ -680,7 +680,7 @@ DerivedPathsWithInfo InstallableFlake::toDerivedPaths() .originalRef = flakeRef, .resolvedRef = getLockedFlake()->flake.lockedRef, .attrPath = attrPath, - .outputsSpec = outputsSpec, + .extendedOutputsSpec = extendedOutputsSpec, } }}; } @@ -797,12 +797,12 @@ std::vector> SourceExprCommand::parseInstallables( } for (auto & s : ss) { - auto [prefix, outputsSpec] = OutputsSpec::parse(s); + auto [prefix, extendedOutputsSpec] = ExtendedOutputsSpec::parse(s); result.push_back( std::make_shared( state, *this, vFile, prefix == "." ? "" : prefix, - outputsSpec)); + extendedOutputsSpec)); } } else { @@ -837,13 +837,13 @@ std::vector> SourceExprCommand::parseInstallables( } try { - auto [flakeRef, fragment, outputsSpec] = parseFlakeRefWithFragmentAndOutputsSpec(s, absPath(".")); + auto [flakeRef, fragment, extendedOutputsSpec] = parseFlakeRefWithFragmentAndExtendedOutputsSpec(s, absPath(".")); result.push_back(std::make_shared( this, getEvalState(), std::move(flakeRef), fragment, - outputsSpec, + extendedOutputsSpec, getDefaultFlakeAttrPaths(), getDefaultFlakeAttrPathPrefixes(), lockFlags)); -- cgit v1.2.3