summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Morrow <andrew.morrow@viam.com>2024-02-05 18:13:35 (GMT)
committerAndrew Morrow <andrew.morrow@viam.com>2024-02-05 18:14:31 (GMT)
commite0272d22c5d34346548d40ed092ffcfc4e156542 (patch)
tree1f2488ba3254589c793850d05d7f18b7bd1cb1cd
parentd5084ec4b04033670568933e99d7b6c86a072e07 (diff)
downloadSCons-e0272d22c5d34346548d40ed092ffcfc4e156542.zip
SCons-e0272d22c5d34346548d40ed092ffcfc4e156542.tar.gz
SCons-e0272d22c5d34346548d40ed092ffcfc4e156542.tar.bz2
Partially revert "cache push on any thread"
This partially reverts commit 8a6b5e4b12254afbba8cf4aadb78300a92a42de7 to restore `Node.cached` field.
-rw-r--r--SCons/Node/NodeTests.py2
-rw-r--r--SCons/Node/__init__.py2
-rw-r--r--SCons/Taskmaster/__init__.py3
3 files changed, 7 insertions, 0 deletions
diff --git a/SCons/Node/NodeTests.py b/SCons/Node/NodeTests.py
index fc98104..42fae01 100644
--- a/SCons/Node/NodeTests.py
+++ b/SCons/Node/NodeTests.py
@@ -1296,6 +1296,7 @@ class NodeTestCase(unittest.TestCase):
n.includes = 'testincludes'
n.Tag('found_includes', {'testkey':'testvalue'})
n.implicit = 'testimplicit'
+ n.cached = 1
x = MyExecutor()
n.set_executor(x)
@@ -1303,6 +1304,7 @@ class NodeTestCase(unittest.TestCase):
n.clear()
assert n.includes is None, n.includes
+ assert n.cached == 0, n.cached
assert x.cleaned_up
def test_get_subst_proxy(self) -> None:
diff --git a/SCons/Node/__init__.py b/SCons/Node/__init__.py
index 08e1254..3da4faf 100644
--- a/SCons/Node/__init__.py
+++ b/SCons/Node/__init__.py
@@ -588,6 +588,7 @@ class Node(metaclass=NoSlotsPyPy):
self.pseudo = False
self.noclean = 0
self.nocache = 0
+ self.cached = 0 # is this node pulled from cache?
self.always_build = None
self.includes = None
self.attributes = self.Attrs() # Generic place to stick information about the Node.
@@ -863,6 +864,7 @@ class Node(metaclass=NoSlotsPyPy):
delattr(self, attr)
except AttributeError:
pass
+ self.cached = 0
self.includes = None
def clear_memoized_values(self) -> None:
diff --git a/SCons/Taskmaster/__init__.py b/SCons/Taskmaster/__init__.py
index 33e9118..4d768ee 100644
--- a/SCons/Taskmaster/__init__.py
+++ b/SCons/Taskmaster/__init__.py
@@ -246,6 +246,9 @@ class Task(ABC):
self.targets[0].build()
for t in self.targets:
t.push_to_cache()
+ else:
+ for t in cached_targets:
+ t.cached = 1
except SystemExit:
exc_value = sys.exc_info()[1]
raise SCons.Errors.ExplicitExit(self.targets[0], exc_value.code)