Dirk, and others: I tracked down my spurious rebuild to the addition of
caching changed-status in File.changed() in Node/FS.py.  If I remove that
caching code I don't get the rebuilds:

diff --git a/src/engine/SCons/Node/FS.py b/src/engine/SCons/Node/FS.py
--- a/src/engine/SCons/Node/FS.py
+++ b/src/engine/SCons/Node/FS.py
@@ -3043,13 +3043,15 @@
         but we allow the return value to get cached after the reference
         to the Executor got released in release_target_info().
         """
-        if node is None:
+        allow_caching = False
+        if node is None and allow_caching: # try this
             try:
                 return self._memo['changed']
             except KeyError:
                 pass

         has_changed = SCons.Node.Node.changed(self, node)
+        if allow_caching:
         self._memo['changed'] = has_changed
         return has_changed

I also had to add this code to fix an exception when the file doesn't have
an executor.

diff --git a/src/engine/SCons/Node/__init__.py
b/src/engine/SCons/Node/__init__.py
--- a/src/engine/SCons/Node/__init__.py
+++ b/src/engine/SCons/Node/__init__.py
@@ -1090,7 +1090,10 @@
                 if t: Trace(': %s changed' % child)
                 result = True

+        if self.get_executor():
         contents = self.get_executor().get_contents()
+        else:
+            contents = None
         if self.has_builder():
             import SCons.Util
             newsig = SCons.Util.MD5signature(contents)

Dirk, what do you think?  I'll play with this version for a while.

Also, Anatoly: there's already a fair amount of changed/up-to-date tracing
logic in Node/__init__.py and Node/FS.py.  Let me see if I can clean it up
a bit and expose it via cmd line.  (And just FYI, the simplest way to get
notification of switching from SConscript-reading to build phase is to put
a print stmt at the end of your SConstruct.)



On Fri, Jan 10, 2014 at 3:39 PM, Gary Oberbrunner <[email protected]>wrote:

> On Fri, Jan 10, 2014 at 2:54 PM, Kenny, Jason L 
> <[email protected]>wrote:
>
>>  I have seen this since SCons 2.0
>>
>>
>> OK, so it's not a regression caused by the 2.3.0 changes.  Good to know.
>
> --
> Gary
>



-- 
Gary
_______________________________________________
Scons-dev mailing list
[email protected]
http://two.pairlist.net/mailman/listinfo/scons-dev

Reply via email to