Skip to content

When there's a dependency on a task that does nothing, -j2 reexecutes target anyway #2

Description

@FooBarWidget

The problem is best explained with a test case:

file 'foo.txt' => :libev do
    sh 'touch foo.txt'
end

task :libev => 'libev.txt'

file 'libev.txt' do
    sh 'touch libev.txt'
end

Run:

$ rake foo.txt
touch libev.txt
touch foo.txt
$ rake foo.txt     # Does nothing, as expected.
$ drake foo.txt    # Does nothing, as expected.

But:

$ drake -j2 foo.txt
touch foo.txt

Phusion Passenger depends on this pattern: we have a :libev task which depends on libev.a, or does nothing, depends on whether the user has set the USE_VENDORED_LIBEV flag.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions