class Rake::Task

def invoke_with_call_chain(task_args, invocation_chain)

circular dependencies.
Same as invoke, but explicitly pass a call chain to detect
def invoke_with_call_chain(task_args, invocation_chain)
  new_chain = InvocationChain.append(self, invocation_chain)
  @lock.synchronize do
    if application.options.trace
      puts "** Invoke #{name} #{format_trace_flags}"
    end
    return if @already_invoked
    @already_invoked = true
    invoke_prerequisites(task_args, new_chain)
    execute(task_args) if needed?
  end
end