[Rake-devel] shhh

Alex Chaffee alexch at gmail.com
Fri Mar 13 13:48:24 EDT 2009


Rake is too loud.

It's also too quiet when it should be louder, forcing me to run it again
with --trace, which makes it *way* too loud.

Please let me explain.

Here's what a successful test run looks like for my current project:


Pepper:moodlog chaffee$ rake
(in /Users/chaffee/dev/moodlog)
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
-I"/Users/chaffee/dev/moodlog/lib" -I"/Users/chaffee/dev/moodlog/test"
"/Library/Ruby/Gems/1.8/gems/rake-0.8.4/lib/rake/rake_test_loader.rb"
"test/unit/address_test.rb" "test/unit/address_widget_test.rb"
"test/unit/color_test.rb" "test/unit/feeler_test.rb"
"test/unit/line_test.rb" "test/unit/mailman_test.rb"
"test/unit/moment_test.rb" "test/unit/mood_test.rb"
"test/unit/person_mailer_test.rb" "test/unit/person_test.rb"
"test/unit/schedule_feeler_test.rb" "test/unit/schedule_test.rb"
"test/unit/urlencode_test.rb"
Loaded suite
/Library/Ruby/Gems/1.8/gems/rake-0.8.4/lib/rake/rake_test_loader
Started
....................................................................................................................................................
Finished in 2.343631 seconds.

148 tests, 2416 assertions, 0 failures, 0 errors
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
-I"/Users/chaffee/dev/moodlog/lib" -I"/Users/chaffee/dev/moodlog/test"
"/Library/Ruby/Gems/1.8/gems/rake-0.8.4/lib/rake/rake_test_loader.rb"
"test/functional/addresses_controller_test.rb"
"test/functional/colors_controller_test.rb"
"test/functional/feelers_controller_test.rb"
"test/functional/home_controller_test.rb"
"test/functional/moments_controller_test.rb"
"test/functional/moods_controller_test.rb"
"test/functional/people_controller_test.rb"
"test/functional/schedules_controller_test.rb"
"test/functional/sessions_controller_test.rb"
Loaded suite
/Library/Ruby/Gems/1.8/gems/rake-0.8.4/lib/rake/rake_test_loader
Started
..........................................................................................
Finished in 1.911496 seconds.

90 tests, 221 assertions, 0 failures, 0 errors
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
-I"/Users/chaffee/dev/moodlog/lib" -I"/Users/chaffee/dev/moodlog/test"
"/Library/Ruby/Gems/1.8/gems/rake-0.8.4/lib/rake/rake_test_loader.rb"


And here's what I'd like it to look like:

Pepper:moodlog chaffee$ rake
Running unit tests.
Started
....................................................................................................................................................
Finished in 2.343631 seconds.

148 tests, 2416 assertions, 0 failures, 0 errors

Running functional tests.
Started
..........................................................................................
Finished in 1.911496 seconds.

90 tests, 221 assertions, 0 failures, 0 errors


See what I mean?

Also, when there's a test failure, I'd like to see it and its stack trace
immediately, without having to rerun with "--trace".

As I see it, rake has kind of mixed up the expected meanings of the --quiet,
--silent, --verbose and --trace flags, and the Rake Test task mixes them up
even further, and outputs a bunch of stuff we rarely if ever care about
while suppressing stuff we always care about.

I'd be happy to take a crack at a proposal and a solution in code, but I'd
like to get an opinion from this group (and hopefully Jim Weirich) first.

The most important thing, in my opinion, is to disentangle the two meanings
of "--trace", since my preference is to be able to show backtraces but *not*
show task traces. Next up would be to take out the current directory and
full list of test.rb targets except in case of emergency verbosity. (Really,
are they ever useful except when debugging your rakefile or rake itself?)

 - Alex

P.S. Is Jim even using this list anymore? I notice there was a release
recently without an announcement on this list.

---
Alex Chaffee - alex at stinky.com
Stalk me: http://friendfeed.com/alexch | http://twitter.com/alexch |
http://alexch.tumblr.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rake-devel/attachments/20090313/3313e236/attachment.html>


More information about the Rake-devel mailing list