* Fast builds.

This commit is contained in:
Eelco Dolstra 2003-11-01 23:29:02 +00:00
parent 7de1b2a698
commit c8268ca991

View file

@ -127,24 +127,17 @@ Path normaliseNixExpr(const Path & _nePath, PathSet pending)
i != ne.derivation.env.end(); i++) i != ne.derivation.env.end(); i++)
env[i->first] = i->second; env[i->first] = i->second;
/* We can skip running the builder if we can expand all output /* We can skip running the builder if all output paths are already
paths from their ids. */ valid. */
bool fastBuild = false;
#if 0
bool fastBuild = true; bool fastBuild = true;
for (PathSet::iterator i = ne.derivation.outputs.begin(); for (PathSet::iterator i = ne.derivation.outputs.begin();
i != ne.derivation.outputs.end(); i++) i != ne.derivation.outputs.end(); i++)
{ {
try { if (!isValidPath(*i)) {
expandId(i->second, i->first, "/", pending);
} catch (Error & e) {
debug(format("fast build failed for `%1%': %2%")
% i->first % e.what());
fastBuild = false; fastBuild = false;
break; break;
} }
} }
#endif
if (!fastBuild) { if (!fastBuild) {