summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2005-11-06 23:00:32 (GMT)
committerSteven Knight <knight@baldmt.com>2005-11-06 23:00:32 (GMT)
commite2f5354d117a41c5fe8895b5011e9d4b74ab8701 (patch)
treec9a710f51a09c3eb79f627e78c279e828c0bc713 /src
parent6afaf715856f74f8d688167328755e892b380857 (diff)
downloadSCons-e2f5354d117a41c5fe8895b5011e9d4b74ab8701.zip
SCons-e2f5354d117a41c5fe8895b5011e9d4b74ab8701.tar.gz
SCons-e2f5354d117a41c5fe8895b5011e9d4b74ab8701.tar.bz2
Do not throw an exception if the type of a stored implicit dependency has changed since last run. (Dobes Vandermeer)
Diffstat (limited to 'src')
-rw-r--r--src/CHANGES.txt4
-rw-r--r--src/engine/SCons/Node/__init__.py17
2 files changed, 19 insertions, 2 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt
index 8bf385f..4e8e377 100644
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -739,6 +739,10 @@ RELEASE 0.97 - XXX
external environment, or settable internally) to put a shortened
SCons execution line in the Visual Studio project file.
+ - Don't throw an exception if the configuration changes and a stored
+ implicit dependency now has a different type (File or Dir) than it
+ did last time.
+
From Greg Ward:
- Fix a misplaced line in the man page.
diff --git a/src/engine/SCons/Node/__init__.py b/src/engine/SCons/Node/__init__.py
index b04284d..e73e5f3 100644
--- a/src/engine/SCons/Node/__init__.py
+++ b/src/engine/SCons/Node/__init__.py
@@ -516,8 +516,21 @@ class Node:
implicit = self.get_stored_implicit()
if implicit:
factory = build_env.get_factory(self.builder.source_factory)
- implicit = map(factory, implicit)
- self._add_child(self.implicit, self.implicit_dict, implicit)
+ nodes = []
+ for i in implicit:
+ try:
+ n = factory(i)
+ except TypeError:
+ # The implicit dependency was cached as one type
+ # of Node last time, but the configuration has
+ # changed (probably) and it's a different type
+ # this time. Just ignore the mismatch and go
+ # with what our current configuration says the
+ # Node is.
+ pass
+ else:
+ nodes.append(n)
+ self._add_child(self.implicit, self.implicit_dict, nodes)
calc = build_env.get_calculator()
if implicit_deps_unchanged or self.current(calc):
return