From 249988a787d26046bf7b389594ff25029229e3d9 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 21 Jul 2003 20:07:12 +0000 Subject: * Allow the output/expression id to be forced to a certain value; this potentially dangerous feature enables better sharing for those paths for which the content is known in advance (e.g., because a content hash is given). * Fast builds: if we can expand all output paths of a derive expression, we don't have to build. --- src/normalise.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/normalise.cc') diff --git a/src/normalise.cc b/src/normalise.cc index fcb9c4d0d3..d06c8bf360 100644 --- a/src/normalise.cc +++ b/src/normalise.cc @@ -88,19 +88,18 @@ Slice normaliseFState(FSId id) /* We can skip running the builder if we can expand all output paths from their ids. */ - bool fastBuild = false; -#if 0 + bool fastBuild = true; for (OutPaths::iterator i = outPaths.begin(); i != outPaths.end(); i++) { try { expandId(i->second, i->first); - } catch (...) { + } catch (Error & e) { + debug(format("fast build failed: %1%") % e.what()); fastBuild = false; break; } } -#endif if (!fastBuild) { -- cgit 1.4.1