mirror of
https://gitlab.com/ita1024/waf.git
synced 2025-01-12 19:45:31 +01:00
Reduce the size of the build pickle file
This commit is contained in:
parent
ddaf29b78d
commit
72fda8ae36
@ -813,7 +813,7 @@ class Node(object):
|
||||
the signature calculation relies on an existing attribute. Else the
|
||||
signature is calculated automatically.
|
||||
"""
|
||||
# previous behaviour can be set by returning self.ctx.task_sigs[self.abspath()] when a build node
|
||||
# previous behaviour can be set by returning self.ctx.task_sigs[self] when a build node
|
||||
return Utils.h_file(self.abspath())
|
||||
|
||||
# --------------------------------------------
|
||||
|
@ -607,15 +607,14 @@ class Task(TaskBase):
|
||||
|
||||
# compare the signatures of the outputs
|
||||
for node in self.outputs:
|
||||
p = node.abspath()
|
||||
sig = bld.task_sigs.get(p, None)
|
||||
sig = bld.task_sigs.get(node, None)
|
||||
if not sig:
|
||||
Logs.debug("task: task %r must run: an output node has no signature" % self)
|
||||
return RUN_ME
|
||||
if sig != key:
|
||||
Logs.debug("task: task %r must run: an output node was produced by another task" % self)
|
||||
return RUN_ME
|
||||
if not os.path.exists(p):
|
||||
if not os.path.exists(node.abspath()):
|
||||
Logs.debug("task: task %r must run: an output node does not exist" % self)
|
||||
return RUN_ME
|
||||
|
||||
@ -632,17 +631,14 @@ class Task(TaskBase):
|
||||
bld = self.generator.bld
|
||||
sig = self.signature()
|
||||
for node in self.outputs:
|
||||
# check if the node exists
|
||||
# check if the output actually exists
|
||||
try:
|
||||
os.stat(node.abspath())
|
||||
except OSError:
|
||||
self.hasrun = MISSING
|
||||
self.err_msg = '-> missing file: %r' % node.abspath()
|
||||
raise Errors.WafError(self.err_msg)
|
||||
|
||||
# important, store the signature for the next run
|
||||
bld.task_sigs[node.abspath()] = self.uid() # make sure this task produced the files in question
|
||||
|
||||
bld.task_sigs[node] = self.uid() # make sure this task produced the files in question
|
||||
bld.task_sigs[self.uid()] = self.cache_sig
|
||||
|
||||
def sig_explicit_deps(self):
|
||||
|
@ -301,7 +301,7 @@ class javac(Task.Task):
|
||||
"""
|
||||
"""
|
||||
for node in self.generator.outdir.ant_glob('**/*.class'):
|
||||
bld.task_sigs[node.abspath()] = self.uid()
|
||||
bld.task_sigs[node] = self.uid()
|
||||
self.generator.bld.task_sigs[self.uid()] = self.cache_sig
|
||||
|
||||
@feature('javadoc')
|
||||
@ -351,7 +351,7 @@ class javadoc(Task.Task):
|
||||
def post_run(self):
|
||||
nodes = self.generator.javadoc_output.ant_glob('**')
|
||||
for nodes in nodes:
|
||||
bld.task_sigs[node.abspath()] = self.uid()
|
||||
bld.task_sigs[node] = self.uid()
|
||||
self.generator.bld.task_sigs[self.uid()] = self.cache_sig
|
||||
|
||||
def configure(self):
|
||||
|
Loading…
Reference in New Issue
Block a user