diff options
Diffstat (limited to 'engine/SCons/Taskmaster.py')
| -rw-r--r-- | engine/SCons/Taskmaster.py | 19 | 
1 files changed, 14 insertions, 5 deletions
diff --git a/engine/SCons/Taskmaster.py b/engine/SCons/Taskmaster.py index 5dfc03e..421e2b2 100644 --- a/engine/SCons/Taskmaster.py +++ b/engine/SCons/Taskmaster.py @@ -1,5 +1,5 @@  # -# Copyright (c) 2001 - 2017 The SCons Foundation +# Copyright (c) 2001 - 2019 The SCons Foundation  #  # Permission is hereby granted, free of charge, to any person obtaining  # a copy of this software and associated documentation files (the @@ -27,10 +27,10 @@ import sys  __doc__ = """      Generic Taskmaster module for the SCons build engine.      ===================================================== -     +      This module contains the primary interface(s) between a wrapping user      interface and the SCons build engine.  There are two key classes here: -     +      Taskmaster      ----------          This is the main engine for walking the dependency graph and @@ -54,7 +54,7 @@ __doc__ = """          target(s) that it decides need to be evaluated and/or built.  """ -__revision__ = "src/engine/SCons/Taskmaster.py 74b2c53bc42290e911b334a6b44f187da698a668 2017/11/14 13:16:53 bdbaddog" +__revision__ = "src/engine/SCons/Taskmaster.py 72ae09dc35ac2626f8ff711d8c4b30b6138e08e3 2019-08-08 14:50:06 bdeegan"  from itertools import chain  import operator @@ -470,14 +470,23 @@ class Task(object):                  pending_children.discard(t)              for p in t.waiting_parents:                  parents[p] = parents.get(p, 0) + 1 +            t.waiting_parents = set()          for t in targets:              if t.side_effects is not None:                  for s in t.side_effects:                      if s.get_state() == NODE_EXECUTING:                          s.set_state(NODE_NO_STATE) + +                    # The side-effects may have been transferred to +                    # NODE_NO_STATE by executed_with{,out}_callbacks, but was +                    # not taken out of the waiting parents/pending children +                    # data structures. Check for that now. +                    if s.get_state() == NODE_NO_STATE and s.waiting_parents: +                        pending_children.discard(s)                          for p in s.waiting_parents:                              parents[p] = parents.get(p, 0) + 1 +                        s.waiting_parents = set()                      for p in s.waiting_s_e:                          if p.ref_count == 0:                              self.tm.candidates.append(p) @@ -542,7 +551,7 @@ class Task(object):          try:              exc_type, exc_value, exc_traceback = exc          except ValueError: -            exc_type, exc_value = exc +            exc_type, exc_value = exc  # pylint: disable=unbalanced-tuple-unpacking              exc_traceback = None          # raise exc_type(exc_value).with_traceback(exc_traceback)  | 
