Fix build

This commit is contained in:
Eelco Dolstra
2020-07-08 12:50:02 +02:00
parent 6c9e407bee
commit 7985757a1d
6 changed files with 11 additions and 16 deletions

View File

@ -46,7 +46,7 @@ std::string getEnvOrDie(const std::string & key)
State::State()
: config(std::make_unique<::Config>())
: config(std::make_unique<HydraConfig>())
, maxUnsupportedTime(config->getIntOption("max_unsupported_time", 0))
, dbPool(config->getIntOption("max_db_connections", 128))
, memoryTokens(config->getIntOption("nar_buffer_size", getMemSize() / 2))

View File

@ -272,7 +272,7 @@ bool State::getQueuedBuilds(Connection & conn,
try {
createBuild(build);
} catch (Error & e) {
e.addPrefix(fmt("while loading build %1%: ", build->id));
e.addTrace({}, hintfmt("while loading build %d: ", build->id));
throw;
}
@ -458,8 +458,7 @@ Step::ptr State::createStep(ref<Store> destStore,
for (auto & i : step->drv->outputs)
if (!destStore->isValidPath(i.second.path)) {
valid = false;
missing.insert_or_assign(i.first,
DerivationOutput { i.second.path, i.second.hashAlgo, i.second.hash });
missing.insert_or_assign(i.first, i.second);
}
/* Try to copy the missing paths from the local store or from

View File

@ -292,14 +292,14 @@ struct Machine
};
class Config;
class HydraConfig;
class State
{
private:
std::unique_ptr<Config> config;
std::unique_ptr<HydraConfig> config;
// FIXME: Make configurable.
const unsigned int maxTries = 5;