dropEmptyInitThenConcatStringsSep -> concatStringSep: diag

This commit is contained in:
Robert Hensing 2024-07-13 00:13:58 +02:00
parent 75dde71ff9
commit 608a425550
5 changed files with 12 additions and 6 deletions

View file

@ -465,7 +465,7 @@ OutputPathMap resolveDerivedPath(Store & store, const DerivedPath::Built & bfd)
if (!outputsLeft.empty())
throw Error("derivation '%s' does not have an outputs %s",
store.printStorePath(drvPath),
dropEmptyInitThenConcatStringsSep(", ", quoteStrings(std::get<OutputsSpec::Names>(bfd.outputs.raw))));
concatStringsSep(", ", quoteStrings(std::get<OutputsSpec::Names>(bfd.outputs.raw))));
return outputMap;
}

View file

@ -64,6 +64,8 @@
#include <grp.h>
#include <iostream>
#include "strings.hh"
namespace nix {
void handleDiffHook(
@ -840,7 +842,7 @@ void LocalDerivationGoal::startBuilder()
/* Run the builder. */
printMsg(lvlChatty, "executing builder '%1%'", drv->builder);
printMsg(lvlChatty, "using builder args '%1%'", dropEmptyInitThenConcatStringsSep(" ", drv->args));
printMsg(lvlChatty, "using builder args '%1%'", concatStringsSep(" ", drv->args));
for (auto & i : drv->env)
printMsg(lvlVomit, "setting builder env variable '%1%'='%2%'", i.first, i.second);
@ -1063,7 +1065,7 @@ void LocalDerivationGoal::startBuilder()
e.addTrace({}, "while waiting for the build environment for '%s' to initialize (%s, previous messages: %s)",
worker.store.printStorePath(drvPath),
statusToString(status),
dropEmptyInitThenConcatStringsSep("|", msgs));
concatStringsSep("|", msgs));
throw;
}
}();

View file

@ -97,7 +97,7 @@ void printClosureDiff(
items.push_back(fmt("%s → %s", showVersions(removed), showVersions(added)));
if (showDelta)
items.push_back(fmt("%s%+.1f KiB" ANSI_NORMAL, sizeDelta > 0 ? ANSI_RED : ANSI_GREEN, sizeDelta / 1024.0));
logger->cout("%s%s: %s", indent, name, dropEmptyInitThenConcatStringsSep(", ", items));
logger->cout("%s%s: %s", indent, name, concatStringsSep(", ", items));
}
}
}

View file

@ -17,6 +17,8 @@
#include <regex>
#include <iomanip>
#include "strings.hh"
using namespace nix;
struct ProfileElementSource
@ -472,7 +474,7 @@ struct CmdProfileInstall : InstallablesCommand, MixDefaultProfile
originalConflictingFilePath,
newConflictingFilePath,
originalEntryName,
dropEmptyInitThenConcatStringsSep(" ", newConflictingRefs),
concatStringsSep(" ", newConflictingRefs),
conflictError.priority,
conflictError.priority - 1,
conflictError.priority + 1

View file

@ -15,6 +15,8 @@
#include <fstream>
#include <nlohmann/json.hpp>
#include "strings.hh"
using namespace nix;
using json = nlohmann::json;
@ -96,7 +98,7 @@ struct CmdSearch : InstallableValueCommand, MixJSON
auto attrPathS = state->symbols.resolve(attrPath);
Activity act(*logger, lvlInfo, actUnknown,
fmt("evaluating '%s'", dropEmptyInitThenConcatStringsSep(".", attrPathS)));
fmt("evaluating '%s'", concatStringsSep(".", attrPathS)));
try {
auto recurse = [&]()
{