Skip to content

Commit

Permalink
Parents must be marked as needed during parallel dry run.
Browse files Browse the repository at this point in the history
  • Loading branch information
quix committed Sep 16, 2008
1 parent 69ac58e commit 6d2acf3
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lib/rake.rb
Expand Up @@ -398,6 +398,8 @@ def initialize(value, tail)
@tail = tail
end

attr_reader :value # :nodoc:

def member?(obj)
@value == obj || @tail.member?(obj)
end
Expand Down Expand Up @@ -614,6 +616,20 @@ def invoke_with_call_chain(task_args, invocation_chain) # :nodoc:
else
# gather tasks for batch execution
application.parallel_tasks[name] = [task_args, prereqs]

#
# Since this is a dry run, parents must be manually marked
# as needed. Files are not created or modified, so the
# the 'needed?' flag does not propagate.
#
unless invocation_chain == InvocationChain::EMPTY or
invocation_chain.value.needed?
invocation_chain.value.instance_eval {
def needed?
true
end
}
end
end
end
end
Expand Down

0 comments on commit 6d2acf3

Please sign in to comment.