Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Disallow multiple actions of a task #84

zimbatm opened this Issue · 5 comments

4 participants


As a followup of issue #82 and issue #83.

It's handy to add new dependencies after the fact as a grouping mechanism, but multiple actions can easily be expressed by adding a new dependency to an existing task.

A definition like below, where both tasks are defined in different files would have the advantage of breaking, thus exposing the issue. It more likely that in a case like that you have a namespace conflict.

file "file1" do

task "file1" do

It is not uncommon for me to stack multiple actions on the same task name, even on those that mix task and file.


What if instead you had to give new tasks and add them as dependencies of the existing task ? I don't really see the use case where you would do that.


My impression is this behavior has been in rake since day 1, and I never understood why it was a good idea. If the task is a file, generating it more than once is surely pointless - just use the last definition. If the task is not a file, you can name it however you want. If you think the pieces are sufficiently independent to be defined separately, why not give them different names as well? "undefine rake task/rename rake task" bits have a permanent home in probably all of my non-trivial projects.


Through dependencies adds actions that happen before the task. Stacking a task atop a file cause the extra actions to run after. Your proposal removes this feature.

If you have an actual problem please open a new ticket (unless #82 and #83 cover it) describing it.

@drbrain drbrain closed this

+1 for closing. I rely on the behavior of a stacked task being executed even if the stacked file already exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.