You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by gi...@apache.org on 2020/12/29 13:22:23 UTC
[buildstream] 33/33: Revert "WIP: pickle: rm special cases,
plugins pickle now"
This is an automated email from the ASF dual-hosted git repository.
github-bot pushed a commit to branch aevri/picklable_jobs
in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit 54c5c3a2fa58bca02786665110cccd2e50c3128e
Author: Angelos Evripiotis <je...@bloomberg.net>
AuthorDate: Wed Apr 10 13:11:04 2019 +0100
Revert "WIP: pickle: rm special cases, plugins pickle now"
This reverts commit 0a9b85460c2ad1298449a1eea936a2ca30220ffd.
---
src/buildstream/_artifactcache.py | 6 ++++++
src/buildstream/_sourcecache.py | 2 ++
2 files changed, 8 insertions(+)
diff --git a/src/buildstream/_artifactcache.py b/src/buildstream/_artifactcache.py
index 091b44d..7ba043f 100644
--- a/src/buildstream/_artifactcache.py
+++ b/src/buildstream/_artifactcache.py
@@ -70,6 +70,12 @@ class ArtifactCache(BaseCache):
self.cas.add_reachable_directories_callback(self._reachable_directories)
self.cas.add_reachable_digests_callback(self._reachable_digests)
+ def __getstate__(self):
+ state = self.__dict__.copy()
+ # TODO: actually pickle the elements, resolving to the same objects.
+ state['_required_elements'] = set()
+ return state
+
# mark_required_elements():
#
# Mark elements whose artifacts are required for the current run.
diff --git a/src/buildstream/_sourcecache.py b/src/buildstream/_sourcecache.py
index 23dc8e9..e067f04 100644
--- a/src/buildstream/_sourcecache.py
+++ b/src/buildstream/_sourcecache.py
@@ -60,6 +60,8 @@ class SourceCache(BaseCache):
def __getstate__(self):
state = self.__dict__.copy()
+ # TODO: actually pickle the sources, resolving to the same objects.
+ state['_required_sources'] = set()
return state
# mark_required_sources()