Hi,

Anyone who has modified the flow of tasks when building rail apps or
who have built their own tasks that rely on rails tasks is going to be
bitten. For example, almost all of my rails apps have something
similar to the example below. Also - almost all of my custom tasks
will depend upon rails tasks by name and they will probably break.
Adding a backwards portability layer layer will not really work in
many circumstances (like example below) unless the new-style tasks
invoke the old-style tasks to do the work which is just messy.

However IMHO the benefit is worth the break as long as it is well
documented in changelog.

----------------------------------------------------------------
module Rake
  class Task
    def remove_prerequisite(task_name)
      name = task_name.to_s
      @prerequisites.delete(name)
    end
  end
end

Rake::Task.lookup(:test_units).remove_prerequisite(:prepare_test_database)
Rake::Task.lookup(:test_functional).remove_prerequisite(:prepare_test_database)

Rake::Task.lookup(:test_units).enhance([:environment])
Rake::Task.lookup(:test_functional).enhance([:environment])
----------------------------------------------------------------

On 2/27/06, David Heinemeier Hansson <[EMAIL PROTECTED]> wrote:
> > Include a backwards-compatability task library with the old names that
> > just delegates to the new modularized ones? Might be overkill if it's
> > not going to be a serious problem but it's relatively easy to do.
>
> The problem is what a mess that'll make of "rake -T". So before making
> such a mess, I want to have some good reasons for doing so ;)
> --
> David Heinemeier Hansson
> http://www.loudthinking.com -- Broadcasting Brain
> http://www.basecamphq.com   -- Online project management
> http://www.backpackit.com   -- Personal information manager
> http://www.rubyonrails.com  -- Web-application framework
> _______________________________________________
> Rails-core mailing list
> [email protected]
> http://lists.rubyonrails.org/mailman/listinfo/rails-core
>


--
Cheers,

Peter Donald

Blog: http://www.RealityForge.org
_______________________________________________
Rails-core mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-core

Reply via email to