From c8268ca9917061466a3448028ea524d9842e1ac9 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 1 Nov 2003 23:29:02 +0000 Subject: [PATCH] * Fast builds. --- src/libnix/normalise.cc | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/libnix/normalise.cc b/src/libnix/normalise.cc index 0ce38d68a..d3978ac2c 100644 --- a/src/libnix/normalise.cc +++ b/src/libnix/normalise.cc @@ -127,24 +127,17 @@ Path normaliseNixExpr(const Path & _nePath, PathSet pending) i != ne.derivation.env.end(); i++) env[i->first] = i->second; - /* We can skip running the builder if we can expand all output - paths from their ids. */ - bool fastBuild = false; -#if 0 + /* We can skip running the builder if all output paths are already + valid. */ bool fastBuild = true; for (PathSet::iterator i = ne.derivation.outputs.begin(); i != ne.derivation.outputs.end(); i++) { - try { - expandId(i->second, i->first, "/", pending); - } catch (Error & e) { - debug(format("fast build failed for `%1%': %2%") - % i->first % e.what()); + if (!isValidPath(*i)) { fastBuild = false; break; } } -#endif if (!fastBuild) {