summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Morrow <andrew.morrow@viam.com>2024-01-26 01:02:32 (GMT)
committerAndrew Morrow <andrew.morrow@viam.com>2024-02-05 18:14:30 (GMT)
commitf27c3cacbd666751de947858dab8be600764874d (patch)
tree05bb644a739d58be7738c1062851fd2ed1fa42a3
parente48e44739c48821002724c5ea24e007af6bb2cee (diff)
downloadSCons-f27c3cacbd666751de947858dab8be600764874d.zip
SCons-f27c3cacbd666751de947858dab8be600764874d.tar.gz
SCons-f27c3cacbd666751de947858dab8be600764874d.tar.bz2
cache push on any thread
-rw-r--r--SCons/Node/NodeTests.py2
-rw-r--r--SCons/Node/__init__.py2
-rw-r--r--SCons/Taskmaster/__init__.py7
3 files changed, 2 insertions, 9 deletions
diff --git a/SCons/Node/NodeTests.py b/SCons/Node/NodeTests.py
index 42fae01..fc98104 100644
--- a/SCons/Node/NodeTests.py
+++ b/SCons/Node/NodeTests.py
@@ -1296,7 +1296,6 @@ 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)
@@ -1304,7 +1303,6 @@ 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 3da4faf..08e1254 100644
--- a/SCons/Node/__init__.py
+++ b/SCons/Node/__init__.py
@@ -588,7 +588,6 @@ 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.
@@ -864,7 +863,6 @@ 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 d3002fa..33e9118 100644
--- a/SCons/Taskmaster/__init__.py
+++ b/SCons/Taskmaster/__init__.py
@@ -244,9 +244,8 @@ class Task(ABC):
SCons.Warnings.warn(SCons.Warnings.CacheCleanupErrorWarning,
"Failed copying all target files from cache, Error while attempting to remove file %s retrieved from cache: %s" % (t.get_internal_path(), e))
self.targets[0].build()
- else:
- for t in cached_targets:
- t.cached = 1
+ for t in self.targets:
+ t.push_to_cache()
except SystemExit:
exc_value = sys.exc_info()[1]
raise SCons.Errors.ExplicitExit(self.targets[0], exc_value.code)
@@ -299,8 +298,6 @@ class Task(ABC):
for side_effect in t.side_effects:
side_effect.set_state(NODE_NO_STATE)
t.set_state(NODE_EXECUTED)
- if not t.cached:
- t.push_to_cache()
t.built()
t.visited()
if (not print_prepare and