From transfire at gmail.com Thu Mar 8 15:47:07 2007 From: transfire at gmail.com (TRANS) Date: Thu, 8 Mar 2007 15:47:07 -0500 Subject: [Rake-devel] extra verbose Message-ID: <4b6f054f0703081247i7847d20ej5cd2ffd89c07dfb4@mail.gmail.com> It would be nice to have three levels (silent, normal and verbose) of verbosity rather than just the current two. (Currently -s just menas not -v). In my tasks I feel that I should make silent more completely devoid of output. But that leaves me only with the "normal/verbose" mode to work with. Sometimes I need an extra verbose mode. T. From transfire at gmail.com Sat Mar 10 15:41:00 2007 From: transfire at gmail.com (TRANS) Date: Sat, 10 Mar 2007 15:41:00 -0500 Subject: [Rake-devel] extra verbose In-Reply-To: <4b6f054f0703081247i7847d20ej5cd2ffd89c07dfb4@mail.gmail.com> References: <4b6f054f0703081247i7847d20ej5cd2ffd89c07dfb4@mail.gmail.com> Message-ID: <4b6f054f0703101241w6b004c0bkd4fc695e04b6997a@mail.gmail.com> On 3/8/07, TRANS wrote: > It would be nice to have three levels (silent, normal and verbose) of > verbosity rather than just the current two. (Currently -s just menas > not -v). > > In my tasks I feel that I should make silent more completely devoid of > output. But that leaves me only with the "normal/verbose" mode to work > with. Sometimes I need an extra verbose mode. Will it help if I give the usecase? I have a test task, in normal mode I just want it to say "tests passed" or "tests failed", in verbose mode I want to iterate through evey test and tell me if each one passed or failed. T. From jim at weirichhouse.org Sun Mar 11 00:15:27 2007 From: jim at weirichhouse.org (Jim Weirich) Date: Sun, 11 Mar 2007 00:15:27 -0500 Subject: [Rake-devel] extra verbose In-Reply-To: <4b6f054f0703101241w6b004c0bkd4fc695e04b6997a@mail.gmail.com> References: <4b6f054f0703081247i7847d20ej5cd2ffd89c07dfb4@mail.gmail.com> <4b6f054f0703101241w6b004c0bkd4fc695e04b6997a@mail.gmail.com> Message-ID: <45F3906F.3010503@weirichhouse.org> TRANS wrote: > On 3/8/07, TRANS wrote: >> It would be nice to have three levels (silent, normal and verbose) of >> verbosity rather than just the current two. (Currently -s just menas >> not -v). >> >> In my tasks I feel that I should make silent more completely devoid of >> output. But that leaves me only with the "normal/verbose" mode to work >> with. Sometimes I need an extra verbose mode. > > Will it help if I give the usecase? I have a test task, in normal mode > I just want it to say "tests passed" or "tests failed", in verbose > mode I want to iterate through evey test and tell me if each one > passed or failed. rake test TESTOPTS='-vverbose' will do that. In general, the -v option is for the rake itself, not for user-written tasks. -- -- Jim Weirich jim at weirichhouse.org http://onestepback.org -- In theory, practice and theory are the same. -- In practice, they are different. From transfire at gmail.com Sun Mar 11 01:10:44 2007 From: transfire at gmail.com (TRANS) Date: Sun, 11 Mar 2007 01:10:44 -0500 Subject: [Rake-devel] extra verbose In-Reply-To: <45F3906F.3010503@weirichhouse.org> References: <4b6f054f0703081247i7847d20ej5cd2ffd89c07dfb4@mail.gmail.com> <4b6f054f0703101241w6b004c0bkd4fc695e04b6997a@mail.gmail.com> <45F3906F.3010503@weirichhouse.org> Message-ID: <4b6f054f0703102210m2402f002xc3ce7e1f721ed912@mail.gmail.com> On 3/11/07, Jim Weirich wrote: > TRANS wrote: > > On 3/8/07, TRANS wrote: > >> It would be nice to have three levels (silent, normal and verbose) of > >> verbosity rather than just the current two. (Currently -s just menas > >> not -v). > >> > >> In my tasks I feel that I should make silent more completely devoid of > >> output. But that leaves me only with the "normal/verbose" mode to work > >> with. Sometimes I need an extra verbose mode. > > > > Will it help if I give the usecase? I have a test task, in normal mode > > I just want it to say "tests passed" or "tests failed", in verbose > > mode I want to iterate through evey test and tell me if each one > > passed or failed. > > rake test TESTOPTS='-vverbose' > > will do that. > > In general, the -v option is for the rake itself, not for user-written > tasks. I see, yes thats a bettter idea. Thanks. T. From aknight at cs.ucsb.edu Mon Mar 26 14:10:26 2007 From: aknight at cs.ucsb.edu (Allan Knight) Date: Mon, 26 Mar 2007 11:10:26 -0700 Subject: [Rake-devel] Rules with Multiple Prerequisites Message-ID: <3060A062-E4C7-40A9-BA9C-39C126A0B6B8@cs.ucsb.edu> Hi, I recently came across what I believe is a bug in rake, however, I could be wrong. Here is the behavior in question. When I right a rule with two prerequisites everything works fine if both prerequisites exists. The problem occurs when the second or both prerequisites do not exist. In this case the first prerequisite task is invoked twice and the second task not at all. For example, the following Rakefile demonstrates the described behavior ============================ Rakefile ============================ rule '.avi' => ['.wmv'] do |t| sh %{touch #{t.name}} end rule '.aac' => ['.avi'] do |t| sh %{touch #{t.name}} end rule '.h264' => ['.avi'] do |t| sh %{touch #{t.name}} end rule '.mp4' => ['.aac', '.h264'] do |t| sh %{touch #{t.name}} end =========================== End Rakefile ========================== The output for the command 'test.mp4' given that test.wmv exits is: ============================= Output ============================= (in /Users/aknight/rake) touch test.avi touch test.aac touch test.aac touch test.mp4 ============================ End Output ========================== The output illustrates the improper behavior. Rather than touching 'test.h264', Rake touches test.aac twice. First, the test.aac task should not be invoked twice, and second, the test.h264 task is never invoked. Is this the desired behavior for Rake? I've tried a similar setup in Make and it seems to work as I would expect and invokes tasks for both the .aac and .h264 file. My argument is not that Rake should work like Make, but I just wanted to see if my thinking was completely stupid or not. I've found where the bug is (if it acutally is a bug), created a patch and tested it. The patch seems to make Rake work in the desired way. If you also agree that Rake should be have in this way, let me know and I'll submit the patch. It's a quick fix. I've tested the patch with different combinations of files existing and it seems to work. Also, I've tested it with more than two prerequisites and the unpatched behavior is similar, and the patch also creates the desired behavior in this case. Thanks Allan Knight