style(3p/nix): Final act in the brace-wrapping saga
This last change set was generated by a full clang-tidy run (including
compilation):
clang-tidy -p ~/projects/nix-build/ \
-checks=-*,readability-braces-around-statements -fix src/*/*.cc
Actually running clang-tidy requires some massaging to make it play
nice with Nix + meson, I'll be adding a wrapper or something for that soon.
This commit is contained in:
parent
cf40d08908
commit
3908732181
84 changed files with 2601 additions and 1554 deletions
17
third_party/nix/src/build-remote/build-remote.cc
vendored
17
third_party/nix/src/build-remote/build-remote.cc
vendored
|
|
@ -39,10 +39,11 @@ static AutoCloseFD openSlotLock(const Machine& m, unsigned long long slot) {
|
|||
}
|
||||
|
||||
static bool allSupportedLocally(const std::set<std::string>& requiredFeatures) {
|
||||
for (auto& feature : requiredFeatures)
|
||||
for (auto& feature : requiredFeatures) {
|
||||
if (!settings.systemFeatures.get().count(feature)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -172,10 +173,11 @@ static int _main(int argc, char** argv) {
|
|||
}
|
||||
|
||||
if (!bestSlotLock) {
|
||||
if (rightType && !canBuildLocally)
|
||||
if (rightType && !canBuildLocally) {
|
||||
std::cerr << "# postpone\n";
|
||||
else
|
||||
} else {
|
||||
std::cerr << "# decline\n";
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -194,8 +196,9 @@ static int _main(int argc, char** argv) {
|
|||
if (hasPrefix(bestMachine->storeUri, "ssh://")) {
|
||||
storeParams["max-connections"] = "1";
|
||||
storeParams["log-fd"] = "4";
|
||||
if (bestMachine->sshKey != "")
|
||||
if (bestMachine->sshKey != "") {
|
||||
storeParams["ssh-key"] = bestMachine->sshKey;
|
||||
}
|
||||
}
|
||||
|
||||
sshStore = openStore(bestMachine->storeUri, storeParams);
|
||||
|
|
@ -254,15 +257,17 @@ static int _main(int argc, char** argv) {
|
|||
|
||||
auto result = sshStore->buildDerivation(drvPath, drv);
|
||||
|
||||
if (!result.success())
|
||||
if (!result.success()) {
|
||||
throw Error("build of '%s' on '%s' failed: %s", drvPath, storeUri,
|
||||
result.errorMsg);
|
||||
}
|
||||
|
||||
PathSet missing;
|
||||
for (auto& path : outputs)
|
||||
for (auto& path : outputs) {
|
||||
if (!store->isValidPath(path)) {
|
||||
missing.insert(path);
|
||||
}
|
||||
}
|
||||
|
||||
if (!missing.empty()) {
|
||||
DLOG(INFO) << "copying outputs from '" << storeUri << "'";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue