showing a rake task's dependencies and sub-dependencies

1,262 views
Skip to first unread message

Daniel Higginbotham

unread,
May 27, 2010, 1:23:40 PM5/27/10
to boston-r...@googlegroups.com
Is there a way to show all the dependencies and subdependencies for a rake task? With output like:

db:load:import
postload:setup
search:stop
db:drop
db:create

Wyatt Greene

unread,
May 27, 2010, 2:09:57 PM5/27/10
to boston-r...@googlegroups.com
Try rake -P

rake -help shows you the full list of rake options

> --
> You received this message because you are subscribed to the Boston
> Ruby Group mailing list
> To post to this group, send email to boston-r...@googlegroups.com
> To unsubscribe from this group, send email to boston-rubygro...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/boston-rubygroup

Daniel Higginbotham

unread,
May 27, 2010, 2:20:45 PM5/27/10
to boston-r...@googlegroups.com
Doesn't quite do what I want. It shows all tasks and their immediate dependencies, whereas I'd like one task and all its dependencies, and the dependencies' dependencies and so forth.

Sounds like a hackfest project for the new Waltham hack fest :D :D

Tom Cocca

unread,
May 27, 2010, 2:51:36 PM5/27/10
to boston-r...@googlegroups.com
if you  add --trace doesn't it show you everything that is being executed?

~ tom

Wyatt Greene

unread,
May 27, 2010, 3:42:13 PM5/27/10
to boston-r...@googlegroups.com
I hacked up a solution for you. I added an option to Rake that does
what you want: http://gist.github.com/416249

--Wyatt

>> ruby...@googlegroups.com

Daniel Higginbotham

unread,
May 27, 2010, 3:42:50 PM5/27/10
to boston-r...@googlegroups.com
Thanks, looks like rake --trace --dry-run is close enough for now, though the output isn't quite as clean as I'd like.

Daniel Higginbotham

unread,
May 27, 2010, 5:21:22 PM5/27/10
to boston-r...@googlegroups.com
Wow, thanks :) I'll give it a go later tonight, I hope.
Reply all
Reply to author
Forward
0 new messages