diff options
author | William Deegan <bill@baddogconsulting.com> | 2019-04-02 19:49:00 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2019-04-02 19:49:00 (GMT) |
commit | 50c9c963970a5b377b2202e884f7b0d8498f0a66 (patch) | |
tree | a8874791d6cc7939fcb4ae89fdcb212b200ca4cc /src/engine | |
parent | a06f5a80a882e4e2e3937b375c4096605ae251d8 (diff) | |
download | SCons-50c9c963970a5b377b2202e884f7b0d8498f0a66.zip SCons-50c9c963970a5b377b2202e884f7b0d8498f0a66.tar.gz SCons-50c9c963970a5b377b2202e884f7b0d8498f0a66.tar.bz2 |
Fix issue #2811 spurious rebuilds due to incorrect waiting_parents on nodes when builder has more than one target and source file generated
Diffstat (limited to 'src/engine')
-rw-r--r-- | src/engine/SCons/Node/__init__.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/engine/SCons/Node/__init__.py b/src/engine/SCons/Node/__init__.py index 131953b..e4c8e6c 100644 --- a/src/engine/SCons/Node/__init__.py +++ b/src/engine/SCons/Node/__init__.py @@ -784,6 +784,25 @@ class Node(object, with_metaclass(NoSlotsPyPy)): for parent in self.waiting_parents: parent.implicit = None + # Handle issue where builder emits more than one target and + # the source file for the builder is generated. + # in that case only the first target was getting it's .implicit + # cleared when the source file is built (second scan). + # leaving only partial implicits from scan before source file is generated + # typically the compiler only. Then scanned files are appended + # This is persisted to sconsign and rebuild causes false rebuilds + # because the ordering of the implicit list then changes to what it + # should have been. + # This is at least the following bugs + # https://github.com/SCons/scons/issues/2811 + # https://jira.mongodb.org/browse/SERVER-33111 + try: + for peer in parent.attributes.target_peers: + peer.implicit = None + except AttributeError as e: + pass + + self.clear() if self.pseudo: |