Allow Dependency objects to be marshaled
When an exception is raised in the build process, it is marshaled and sent to the main process over a pipe. The marshaled exception has a reference to the formula, so the formula and all objects it references are marshaled as well. Previously this did not include dependencies, as they were stored only on the class and not referenced by an instance variable. However, now they are stored on SoftwareSpec instances, to which the formula *does* have a direct reference, so they must be marshalable.
This commit is contained in:
parent
29d204c697
commit
a2c949bfb7
@ -63,6 +63,15 @@ class Dependency
|
||||
"#<#{self.class}: #{name.inspect} #{tags.inspect}>"
|
||||
end
|
||||
|
||||
# Define marshaling semantics because we cannot serialize @env_proc
|
||||
def _dump(*)
|
||||
Marshal.dump([name, tags])
|
||||
end
|
||||
|
||||
def self._load(marshaled)
|
||||
new(*Marshal.load(marshaled))
|
||||
end
|
||||
|
||||
class << self
|
||||
# Expand the dependencies of dependent recursively, optionally yielding
|
||||
# [dependent, dep] pairs to allow callers to apply arbitrary filters to
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user