From schapht at gmail.com Fri Jun 8 14:36:51 2007 From: schapht at gmail.com (Mat Schaffer) Date: Fri, 8 Jun 2007 14:36:51 -0400 Subject: [Rake-devel] Rake circular dependency patch Message-ID: <2B312F86-6DC8-4399-9493-E7C38EFF2FC6@gmail.com> Hi, folks. I read Assaf Arkin's June 6 post about Rake and circular task dependencies and felt like hacking ruby for a bit. So I put together a patch against rake's trunk for the code he worked out. Original post: http://blog.labnotes.org/2007/06/06/rake-hack-im-not-sleeping-just- caught-in-a-circular-dependency/ Patch on trunk is attached. I modified it slightly because (a) his code wasn't against trunk and (b) it looks like separate threads are already getting separate stacks without Asaf's modification of the MultiTask class. Hope attaching the file is sufficient. Let me know if you'd prefer and inline patch or some other kind of patch. This just 'svn diff'. -Mat -------------- next part -------------- A non-text attachment was scrubbed... Name: circular_dependency.patch Type: application/octet-stream Size: 2370 bytes Desc: not available Url : http://rubyforge.org/pipermail/rake-devel/attachments/20070608/741fea73/attachment.obj From assaf at labnotes.org Fri Jun 8 17:03:15 2007 From: assaf at labnotes.org (Assaf Arkin) Date: Fri, 8 Jun 2007 14:03:15 -0700 Subject: [Rake-devel] Rake circular dependency patch In-Reply-To: <2B312F86-6DC8-4399-9493-E7C38EFF2FC6@gmail.com> References: <2B312F86-6DC8-4399-9493-E7C38EFF2FC6@gmail.com> Message-ID: <5037b6e40706081403t1e6a4946x41083f37a4edf119@mail.gmail.com> On 6/8/07, Mat Schaffer wrote: > > Hi, folks. I read Assaf Arkin's June 6 post about Rake and circular > task dependencies and felt like hacking ruby for a bit. So I put > together a patch against rake's trunk for the code he worked out. > > Original post: > http://blog.labnotes.org/2007/06/06/rake-hack-im-not-sleeping-just- > caught-in-a-circular-dependency/ > > Patch on trunk is attached. I modified it slightly because (a) his > code wasn't against trunk and (b) it looks like separate threads are > already getting separate stacks without Asaf's modification of the > MultiTask class. Mat, Thanks. We have some test cases [1] (RSpec, only the first set is relevant). Each thread indeed gets a new stack, but without the change to MultiTask, each of the parallel tasks will start from a fresh stack, and won't be able to detect circular dependencies that started before the multitask. The last test in [1] checks that and will fail without this change to MultiTask. Assaf [1] http://www.intalio.org/buildr/trunk/test/rake_ext.rb Hope attaching the file is sufficient. Let me know if you'd prefer > and inline patch or some other kind of patch. This just 'svn diff'. > > -Mat > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rake-devel/attachments/20070608/0b3e69fd/attachment.html From schapht at gmail.com Fri Jun 8 17:13:32 2007 From: schapht at gmail.com (Mat Schaffer) Date: Fri, 8 Jun 2007 17:13:32 -0400 Subject: [Rake-devel] Rake circular dependency patch In-Reply-To: <5037b6e40706081403t1e6a4946x41083f37a4edf119@mail.gmail.com> References: <2B312F86-6DC8-4399-9493-E7C38EFF2FC6@gmail.com> <5037b6e40706081403t1e6a4946x41083f37a4edf119@mail.gmail.com> Message-ID: <46B482B3-1F37-44C3-8A5F-32B2CF5B3A6A@gmail.com> On Jun 8, 2007, at 5:03 PM, Assaf Arkin wrote: > We have some test cases [1] (RSpec, only the first set is > relevant). Each thread indeed gets a new stack, but without the > change to MultiTask, each of the parallel tasks will start from a > fresh stack, and won't be able to detect circular dependencies that > started before the multitask. > > The last test in [1] checks that and will fail without this change > to MultiTask. > > Assaf > > [1] http://www.intalio.org/buildr/trunk/test/rake_ext.rb Righto. Sorry for the oversight. I'll get that in there soon. -Mat -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rake-devel/attachments/20070608/201b8aa7/attachment.html From schapht at gmail.com Fri Jun 8 23:54:57 2007 From: schapht at gmail.com (Mat Schaffer) Date: Fri, 8 Jun 2007 23:54:57 -0400 Subject: [Rake-devel] Rake circular dependency patch In-Reply-To: <5037b6e40706081403t1e6a4946x41083f37a4edf119@mail.gmail.com> References: <2B312F86-6DC8-4399-9493-E7C38EFF2FC6@gmail.com> <5037b6e40706081403t1e6a4946x41083f37a4edf119@mail.gmail.com> Message-ID: On Jun 8, 2007, at 5:03 PM, Assaf Arkin wrote: > We have some test cases [1] (RSpec, only the first set is > relevant). Each thread indeed gets a new stack, but without the > change to MultiTask, each of the parallel tasks will start from a > fresh stack, and won't be able to detect circular dependencies that > started before the multitask. > > The last test in [1] checks that and will fail without this change > to MultiTask. I think I got it this time. Please disregard the previous circular_dependency.patch file. -Mat -------------- next part -------------- A non-text attachment was scrubbed... Name: circular_dependency_r2.patch Type: application/octet-stream Size: 2913 bytes Desc: not available Url : http://rubyforge.org/pipermail/rake-devel/attachments/20070608/0b80c33d/attachment.obj -------------- next part -------------- From jay.turpin at intel.com Tue Jun 12 00:45:07 2007 From: jay.turpin at intel.com (Turpin, Jay) Date: Mon, 11 Jun 2007 21:45:07 -0700 Subject: [Rake-devel] task - block vs. to_proc Message-ID: <89A6759556B59846929AD26843A1050D04732E77@azsmsx411.amr.corp.intel.com> I am probably missing something obvious, but I don't understand why this won't work. I have created a BaseTask class that I use to simplify the creation of custom Rake tasks. I'd like to let the developer create a new task like this: class SampleTask < BaseTask attr_accessor :name, :directory def initialize(params) super params end setup_task logger.info "Running Task #{task_name}" puts "Name: #{name}" puts "directory: #{directory}" end end and then convert the method to a Proc in the base class and assign it to the task: class BaseTask < Rake::TaskLib attr_accessor :task_name def initialize(params=:my_task_name) @task_name = case params when Hash task params.keys[0] => params[params.keys[0]] params.keys[0] else params end yield self if block_given? create_task end def create_task task task_name, method(:setup_task).to_proc self end end It doesn't work. I get a wrong number of parameters error. However, if I define setup_task() as a method that accepts a block, I can save that block in a variable and then assign it. Something like this: setup_task(&block) @setup_task = block end def create_task task task_name, &@setup_task self end During inspection, they both resolve to Proc objects, so I am confused. Any help would be appreciated. Thanks! Regards, Jay Turpin "Respect cannot be learned, purchased, or acquired; it can only be earned." - Bits & Pieces -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rake-devel/attachments/20070611/d4877993/attachment-0001.html From assaf at labnotes.org Tue Jun 12 01:05:58 2007 From: assaf at labnotes.org (Assaf Arkin) Date: Mon, 11 Jun 2007 22:05:58 -0700 Subject: [Rake-devel] task - block vs. to_proc In-Reply-To: <89A6759556B59846929AD26843A1050D04732E77@azsmsx411.amr.corp.intel.com> References: <89A6759556B59846929AD26843A1050D04732E77@azsmsx411.amr.corp.intel.com> Message-ID: <5037b6e40706112205r5c4ae31bo367179f25347a6d1@mail.gmail.com> Jay, In Ruby there's an argument list, and a separate way to receive a block. When you call a method with { ... }, it passes that as a block, separate from the argument list. You can also pass a method/proc, etc in place of a block, by putting it last on the argument list and prefixing with an ampersand. Try this instead: task task_name, &method(:setup_task).to_proc Assaf On 6/11/07, Turpin, Jay wrote: > > I am probably missing something obvious, but I don't understand why this > won't work. I have created a BaseTask class that I use to simplify the > creation of custom Rake tasks. I'd like to let the developer create a new > task like this: > > class SampleTask < BaseTask > > attr_accessor :name, :directory > > > > def initialize(params) > > super params > > end > > setup_task > > logger.info "Running Task #{task_name}" > > puts "Name: #{name}" > > puts "directory: #{directory}" > > end > > end > > and then convert the method to a Proc in the base class and assign it to > the task: > > class BaseTask < Rake::TaskLib > > attr_accessor :task_name > > > > def initialize(params=:my_task_name) > > @task_name = case params > > when Hash > > task params.keys[0] => params[params.keys[0]] > > params.keys[0] > > else > > params > > end > > yield self if block_given? > > create_task > > end > > > > def create_task > > task task_name, method(:setup_task).to_proc > > self > > end > > end > > It doesn't work. I get a wrong number of parameters error. However, if I > define setup_task() as a method that accepts a block, I can save that > block in a variable and then assign it. Something like this: > > setup_task(&block) > > @setup_task = block > > end > > def create_task > > task task_name, &@setup_task > > self > > end > > During inspection, they both resolve to Proc objects, so I am confused. > Any help would be appreciated. Thanks! > > Regards,******** > > *Jay Turpin* > > *******"Respect cannot be learned, purchased, or acquired; it can only be > earned." - Bits & Pieces* > > > _______________________________________________ > Rake-devel mailing list > Rake-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rake-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rake-devel/attachments/20070611/138b756a/attachment.html From jay.turpin at intel.com Wed Jun 13 01:46:30 2007 From: jay.turpin at intel.com (Turpin, Jay) Date: Tue, 12 Jun 2007 22:46:30 -0700 Subject: [Rake-devel] task - block vs. to_proc In-Reply-To: <5037b6e40706112205r5c4ae31bo367179f25347a6d1@mail.gmail.com> References: <89A6759556B59846929AD26843A1050D04732E77@azsmsx411.amr.corp.intel.com> <5037b6e40706112205r5c4ae31bo367179f25347a6d1@mail.gmail.com> Message-ID: <89A6759556B59846929AD26843A1050D04732E7F@azsmsx411.amr.corp.intel.com> Assaf, Thanks for the reply. I tried your suggestion, but still got the same issue. However, I looked at the error more closely and realized what the problem really is. Rake is calling the block and passing in an instance of self as a parameter. The method I defined did not have any parameters defined, so it was throwing an error. As soon as I change the method to the following, it worked fine: setup_task(task) logger.info "Running Task #{task_name}" puts "Name: #{name}" puts "directory: #{directory}" end Thanks again Regards, Jay Turpin "Advice is what we ask for when we already know the answer but wish we didn't." - Erica Jong From: rake-devel-bounces at rubyforge.org [mailto:rake-devel-bounces at rubyforge.org] On Behalf Of Assaf Arkin Sent: Monday, June 11, 2007 10:06 PM To: Rake Development and Discussion Subject: Re: [Rake-devel] task - block vs. to_proc Jay, In Ruby there's an argument list, and a separate way to receive a block. When you call a method with { ... }, it passes that as a block, separate from the argument list. You can also pass a method/proc, etc in place of a block, by putting it last on the argument list and prefixing with an ampersand. Try this instead: task task_name, &method(:setup_task).to_proc Assaf On 6/11/07, Turpin, Jay wrote: I am probably missing something obvious, but I don 't understand why this won' t work. I have created a Base Task class that I use to simplify the creation of cus tom Rake tasks. I' d like to let the developer create a new task like this: class SampleTask < BaseTask attr_accessor :name, :directory def initialize(params) super params end setup_task logger.info "Running Task #{task_name}" puts "Name: #{name}" puts "directory: #{directory}" end end and then convert the method to a Proc in the base class and as sign it to the task: class BaseTask < Rake::TaskLib attr_accessor :task_name def initialize(params=:my_task_name) @task_name = case params w hen Hash task params.keys[0] => params[params.keys[0]] params.keys[0] else params end yield self if block_given? create_task end def create_task task task_name, method(:setup_task).to_proc self end end It doesn' t work. I get a wrong number of parameters error. However, if I define setup_tas k() as a method that accepts a block, I can save that block in a variable and then assign it. Something like this: setup_task(&block) @setup_task = block e nd def create_task task task_name, &@setup_task self end During inspection, they both resolve to Proc objects, so I am confused. Any help would be appreciated. Thanks! Regards, Jay Turpin "Respect cannot be learned, purchased, or acquired; it can only be earned." - Bits & Pieces _______________________________________________ Rake-devel mailing list Rake-devel at rubyforge.org http://rubyforge.org/mailman/listinfo/rake-devel -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rake-devel/attachments/20070612/f40a4d5e/attachment-0001.html From schapht at gmail.com Mon Jun 18 09:41:28 2007 From: schapht at gmail.com (Mat Schaffer) Date: Mon, 18 Jun 2007 09:41:28 -0400 Subject: [Rake-devel] Rake circular dependency patch In-Reply-To: <3EA2CC79-5979-433E-8474-151AA17D9F9A@weirichhouse.org> References: <50812557-5E46-46AD-B148-361F64A7A3BB@gmail.com> <3EA2CC79-5979-433E-8474-151AA17D9F9A@weirichhouse.org> Message-ID: <402F54B6-4DD1-4DFA-B8BB-77C7CD4F65AD@gmail.com> (Note, side Assaf is the original author here, I've CC'd him on this as well. Assaf, let me know if you're on the ML already) On Jun 18, 2007, at 8:39 AM, Jim Weirich wrote: > (1) I am uncomfortable with the use of the Thread.current[] hash. > The thread current hash is essentially a global variable, and I > have already moved a number of global resources into the > Rake::Application object in previous release cycles. The current > circ-dep implementation is thread safe, but does not support > multiple applications. However, the only time that would be a > problem is if one application object invoked tasks in a different > application object within the same thread. This is such a small > edgecase that I'm trying to decide if I'm being unreasonable in my > discomfort. Feedback is welcome. While I'm not one for over-optimization, it seems like satisfying this would come down to keeping the stack in a Rake::Application hash, keyed on the current thread. If so, it doesn't sound like it'd be difficult to add. > (2) I'm wondering about a stack implementation that might be > inherently thread safe in that it is never modified. If you kept a > linked list chain of previous task invokers and only added yourself > to the head of the list. The list itself is never modified and each > task invocation (not each task object) must keep a reference to the > head of its own list. For this to work, I'm thinking that the > chain of previous task invocations must be passed as an argument to > each call to invoke. Since existing (non-rake) software tends to > call invoke for their own purposes, I'm not sure how this can be > done without breaking backwards compatibility. Again, feedback is > welcome on this item. Sounds like (1) is the safer option here. I don't get the feeling this sort of check is worth breaking backwards compatibility. But I like the concept of inherently thread-safe data structures. -Mat From hgs at dmu.ac.uk Wed Jun 20 07:44:39 2007 From: hgs at dmu.ac.uk (Hugh Sasse) Date: Wed, 20 Jun 2007 12:44:39 +0100 (WEST) Subject: [Rake-devel] Tasks to aid installation? Message-ID: I've just tried to install glark on a Windows box and failed. I've asked Jeff Pace about making this easier before, and I think I'll have to contribute something to make this happen. The logical step, given that glark is ruby based and a Makefile already exists, is to provide a Rakefile that doesn't step on the toes of the Makefile. So, I'm looking for facilities in Rake that will allow me to pickup the platform and installation directories. Yes, Rake is Ruby and I can do this in Ruby, but given the tools for creating packages already built into Rake I suspect I've missed something that already encapsulates this particular can of worms. I have looked around: http://rake.rubyforge.org/ and the features mentioned include: "A library of prepackaged tasks to make building rakefiles easier." I can't actually find where these are defined.. Maybe this could have some links put in it? I also can't see any Rake methods to get at installation and configuration data, in the way that many of the File handling facilities are adopted by Rake itself. Have I missed that too? Thank you, Hugh From schapht at gmail.com Wed Jun 20 12:42:32 2007 From: schapht at gmail.com (Mat Schaffer) Date: Wed, 20 Jun 2007 12:42:32 -0400 Subject: [Rake-devel] Tasks to aid installation? In-Reply-To: References: Message-ID: What's the goal here? Being able to build Glark on windows? You probably need cygwin. If you're trying to build an installer for windows for other people, you might want to consider just a zip file of pre-compiled binaries or something like that. Either way, I don't get the feeling rake is the magic bullet you're looking for. Also any specific error messages, or feedback from the glark people might help. -Mat On Jun 20, 2007, at 7:44 AM, Hugh Sasse wrote: > I've just tried to install glark on a Windows box and failed. I've > asked Jeff Pace about making this easier before, and I think I'll > have to contribute something to make this happen. The logical step, > given that glark is ruby based and a Makefile already exists, is to > provide a Rakefile that doesn't step on the toes of the Makefile. > > So, I'm looking for facilities in Rake that will allow me to pickup > the platform and installation directories. Yes, Rake is Ruby and I > can do this in Ruby, but given the tools for creating packages > already built into Rake I suspect I've missed something that already > encapsulates this particular can of worms. > > I have looked around: > > http://rake.rubyforge.org/ > > and the features mentioned include: > > "A library of prepackaged tasks to make building rakefiles easier." > > I can't actually find where these are defined.. Maybe this could > have some links put in it? I also can't see any Rake methods to > get at > installation and configuration data, in the way that many of the File > handling facilities are adopted by Rake itself. Have I missed that > too? > > Thank you, > Hugh > _______________________________________________ > Rake-devel mailing list > Rake-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rake-devel From hgs at dmu.ac.uk Wed Jun 20 14:04:19 2007 From: hgs at dmu.ac.uk (Hugh Sasse) Date: Wed, 20 Jun 2007 19:04:19 +0100 (WEST) Subject: [Rake-devel] Tasks to aid installation? In-Reply-To: References: Message-ID: On Wed, 20 Jun 2007, Mat Schaffer wrote: > What's the goal here? Being able to build Glark on windows? You My immediate goal is to build it on *native* windows. But it would help me, and would be the next step, if I could leave things so that is it easier for others to build glark on Windows. [In particular, if I can send patches that are accepted, then I can pass the next release to someone and say "take these few steps to install it" then use it in helping them with the problem that got me here in the first place.] > probably need cygwin. If you're trying to build an installer for > windows for other people, you might want to consider just a zip file Yes, a Zip file is part of my plan. Currently glark is distributed as a tar file and an RPM. > of pre-compiled binaries or something like that. Either way, I don't Binaries, AFAICS are not needed, glark is pure ruby. It's getting rake to put things in the right place on a system that is not my own that is the issue for me at the moment. So therefore my questions about tasks that come with Rake which I can't immediately see. > get the feeling rake is the magic bullet you're looking for. It's not a magic bullet, it is an alternative to Make, which is how I am trying to use it. Having decided to use it, I'd like to use it effectively. > > Also any specific error messages, or feedback from the glark people > might help. There are no error messages: I've not used their installer because it is clearly stated therein that it is for systems that use RPMs, such as Linux: PACKAGE=glark VERSION=1.8.0 # defaults to nothing; set by RPM during building of RPMs DESTDIR ?= And having read the existing Makefile, converting it to Windows whilst keeping it compatible would be a pain. I also aim NOT to break anything. Adding a Rakefile for used instead of a Makefile leaves existing infrastructure intact. This seems to follow "first, do no harm". I've already stated that I emailed Jeff about this in the past, but since he hasn't addressed the Windows case, the best way to proceed would be to attempt this myself. He has accepted constructive suggestions and the odd patch from me before. I'm probably the only person pestering him about Windows anyway. > -Mat > From schapht at gmail.com Thu Jun 21 09:15:02 2007 From: schapht at gmail.com (Mat Schaffer) Date: Thu, 21 Jun 2007 09:15:02 -0400 Subject: [Rake-devel] Tasks to aid installation? In-Reply-To: References: Message-ID: <13043983-8906-4680-8754-FB7BBF509B3A@gmail.com> On Jun 20, 2007, at 2:04 PM, Hugh Sasse wrote: > On Wed, 20 Jun 2007, Mat Schaffer wrote: >> of pre-compiled binaries or something like that. Either way, I don't > > Binaries, AFAICS are not needed, glark is pure ruby. It's getting > rake to put things in the right place on a system that is not my own > that is the issue for me at the moment. So therefore my questions > about tasks that come with Rake which I can't immediately see. Ahhh... right. I should have looked closer. Sorry. >> get the feeling rake is the magic bullet you're looking for. > > It's not a magic bullet, it is an alternative to Make, which is > how I am trying to use it. Having decided to use it, I'd like > to use it effectively. > And having read the existing Makefile, converting it to Windows > whilst keeping it compatible would be a pain. I also aim NOT to > break anything. Adding a Rakefile for used instead of a Makefile > leaves existing infrastructure intact. This seems to follow "first, > do no harm". Okay, now I see what you're trying to do. Have you considered repackaging glark as a gem? You should be able to do it with just a Rakefile. The downside is that automagic gem creation tools (e.g., hoe) usually assume a different directory structure than what's in the glark package. Tough to say how much magic you can squeeze out of it without disturbing the directory structure. But see if Jeff is interested in using rubygems to install. If so, the new gem file would work on any platform that had rubygems available (The common windows ruby installer has it pre-bundled). -Mat From hgs at dmu.ac.uk Thu Jun 21 09:37:31 2007 From: hgs at dmu.ac.uk (Hugh Sasse) Date: Thu, 21 Jun 2007 14:37:31 +0100 (WEST) Subject: [Rake-devel] Tasks to aid installation? In-Reply-To: <13043983-8906-4680-8754-FB7BBF509B3A@gmail.com> References: <13043983-8906-4680-8754-FB7BBF509B3A@gmail.com> Message-ID: On Thu, 21 Jun 2007, Mat Schaffer wrote: > On Jun 20, 2007, at 2:04 PM, Hugh Sasse wrote: > > It's not a magic bullet, it is an alternative to Make, which is > > how I am trying to use it. Having decided to use it, I'd like > > to use it effectively. > > And having read the existing Makefile, converting it to Windows > > whilst keeping it compatible would be a pain. I also aim NOT to > > break anything. Adding a Rakefile for used instead of a Makefile > > leaves existing infrastructure intact. This seems to follow "first, > > do no harm". > > Okay, now I see what you're trying to do. > > Have you considered repackaging glark as a gem? You should be able Yes, it's been considered. But Jeff hasn't decided to do this yet, and it's his project. I think that would be too big a change to contribute at the moment, and... > to do it with just a Rakefile. The downside is that automagic gem ...to do that I'd still want to use rake effectively, so I'd need be able to find out about these tasks that I can't see links to. > creation tools (e.g., hoe) usually assume a different directory > structure than what's in the glark package. Tough to say how much So I DO still need to know what tools exist to help me make this platform agnostic. > magic you can squeeze out of it without disturbing the directory > structure. > > But see if Jeff is interested in using rubygems to install. If so, > the new gem file would work on any platform that had rubygems > available (The common windows ruby installer has it pre-bundled). > -Mat That's a selling point, but I'd still be inflicting the learning curve on him. And gems assumes some fluency in Rake, which is what my question was about. Hugh From schapht at gmail.com Thu Jun 21 10:27:52 2007 From: schapht at gmail.com (Mat Schaffer) Date: Thu, 21 Jun 2007 10:27:52 -0400 Subject: [Rake-devel] Tasks to aid installation? In-Reply-To: References: <13043983-8906-4680-8754-FB7BBF509B3A@gmail.com> Message-ID: On Jun 21, 2007, at 9:37 AM, Hugh Sasse wrote: > Yes, it's been considered. But Jeff hasn't decided to do this yet, > and it's his project. I think that would be too big a change to > contribute at the moment, and... Again, I think you can do it without upsetting the current tree. You just get less magic. > ...to do that I'd still want to use rake effectively, so I'd need be > able to find out about these tasks that I can't see links to. links? >> creation tools (e.g., hoe) usually assume a different directory >> structure than what's in the glark package. Tough to say how much > > So I DO still need to know what tools exist to help me make this > platform agnostic. Rubygems does that. You tell the gem where the ruby libs and the bins are (possibly man pages too, not sure though) and rubygems handles the installation. >> magic you can squeeze out of it without disturbing the directory >> structure. >> >> But see if Jeff is interested in using rubygems to install. If so, >> the new gem file would work on any platform that had rubygems >> available (The common windows ruby installer has it pre-bundled). >> -Mat > > That's a selling point, but I'd still be inflicting the learning > curve on him. And gems assumes some fluency in Rake, which is > what my question was about. Sorry if I misunderstood the original question. Good luck either way. Rake isn't hard and if the author is really averse to it, you can do it yourself. Just make a Rakefile that builds the .gem, then pass the gem around to people that need it. -Mat From hgs at dmu.ac.uk Thu Jun 21 10:38:08 2007 From: hgs at dmu.ac.uk (Hugh Sasse) Date: Thu, 21 Jun 2007 15:38:08 +0100 (WEST) Subject: [Rake-devel] Tasks to aid installation? In-Reply-To: References: <13043983-8906-4680-8754-FB7BBF509B3A@gmail.com> Message-ID: On Thu, 21 Jun 2007, Mat Schaffer wrote: > > On Jun 21, 2007, at 9:37 AM, Hugh Sasse wrote: > > Yes, it's been considered. But Jeff hasn't decided to do this yet, > > and it's his project. I think that would be too big a change to > > contribute at the moment, and... > > Again, I think you can do it without upsetting the current tree. You > just get less magic. > > > ...to do that I'd still want to use rake effectively, so I'd need be > > able to find out about these tasks that I can't see links to. > > links? http://rake.rubyforge.org/files/README.html Supporting Rake version: 0.7.x This package contains Rake, a simple ruby build program with capabilities similar to make. Rake has the following features: [...] * A library of prepackaged tasks to make building rakefiles easier. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ I can't see where they are documented. Hence my request that links be put there, to point at docs for said prepackaged tasks. [other stuff trimmed, as its relevance rather depends on what those libraries will give me] Hugh From schapht at gmail.com Thu Jun 21 10:51:33 2007 From: schapht at gmail.com (Mat Schaffer) Date: Thu, 21 Jun 2007 10:51:33 -0400 Subject: [Rake-devel] Tasks to aid installation? In-Reply-To: References: <13043983-8906-4680-8754-FB7BBF509B3A@gmail.com> Message-ID: <5607B288-7B57-422F-B63D-0E8330BC4D00@gmail.com> On Jun 21, 2007, at 10:38 AM, Hugh Sasse wrote: > http://rake.rubyforge.org/files/README.html > > > Supporting Rake version: 0.7.x > > This package contains Rake, a simple ruby build program with > capabilities similar to make. > > Rake has the following features: > [...] > * A library of prepackaged tasks to make building rakefiles > easier. > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > > I can't see where they are documented. Hence my request that links > be put there, to point at docs for said prepackaged tasks. > > [other stuff trimmed, as its relevance rather depends on what those > libraries will give me] OOooooo...... I'm pretty sure that's referring to the *Task classes (that aren't core classes): Rake::FileCreationTask Rake::FileTask Rake::GemPackageTask Rake::PackageTask Rake::RDocTask Rake::TestTask Rake::MakefileLoader <-- not a task, but might also help. I don't see how I can link directly to them thanks to the frames (the one thing I hate about rdocs), but you can get at them here: http:// rake.rubyforge.org/ -Mat From hgs at dmu.ac.uk Thu Jun 21 11:24:04 2007 From: hgs at dmu.ac.uk (Hugh Sasse) Date: Thu, 21 Jun 2007 16:24:04 +0100 (WEST) Subject: [Rake-devel] Tasks to aid installation? In-Reply-To: <5607B288-7B57-422F-B63D-0E8330BC4D00@gmail.com> References: <13043983-8906-4680-8754-FB7BBF509B3A@gmail.com> <5607B288-7B57-422F-B63D-0E8330BC4D00@gmail.com> Message-ID: On Thu, 21 Jun 2007, Mat Schaffer wrote: > > On Jun 21, 2007, at 10:38 AM, Hugh Sasse wrote: > > http://rake.rubyforge.org/files/README.html > > > > > > Supporting Rake version: 0.7.x > > > > This package contains Rake, a simple ruby build program with > > capabilities similar to make. > > > > Rake has the following features: > > [...] > > * A library of prepackaged tasks to make building rakefiles > > easier. > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > > > > > I can't see where they are documented. Hence my request that links > > be put there, to point at docs for said prepackaged tasks. > > > > [other stuff trimmed, as its relevance rather depends on what those > > libraries will give me] > > OOooooo...... > > I'm pretty sure that's referring to the *Task classes (that aren't > core classes): [moved down ] Oh, OK, that would be a sensible way to package them... > > I don't see how I can link directly to them thanks to the frames (the You can grab the links for the Rdocs -- which I've done below. How to get this into the rdoc text though... * A library of prepackaged tasks [1,2,3,4,5,6,7] to make building rakefiles with the links wired up... Oh, maybe the form label[url], can be used for this with a relative URL. [1[http:/../classes/Rake/FileCreationTask.html], 2[http:/../classes/Rake/FileTask.htm],...] > one thing I hate about rdocs), but you can get at them here: http:// > Rake::FileCreationTask http://rake.rubyforge.org/classes/Rake/FileCreationTask.html > Rake::FileTask http://rake.rubyforge.org/classes/Rake/FileTask.html > Rake::GemPackageTask http://rake.rubyforge.org/classes/Rake/GemPackageTask.html > Rake::PackageTask http://rake.rubyforge.org/classes/Rake/PackageTask.html > Rake::RDocTask http://rake.rubyforge.org/classes/Rake/RDocTask.html > Rake::TestTask http://rake.rubyforge.org/classes/Rake/TestTask.html > > Rake::MakefileLoader <-- not a task, but might also help. http://rake.rubyforge.org/classes/Rake/MakefileLoader.html > > rake.rubyforge.org/ > -Mat > Thank you, Hugh From murray_bishop at yahoo.com.au Thu Jun 28 18:35:27 2007 From: murray_bishop at yahoo.com.au (Murray Bishop) Date: Thu, 28 Jun 2007 15:35:27 -0700 (PDT) Subject: [Rake-devel] Could the usage message mention setting variables as well as tasks Message-ID: <825047.13705.qm@web30302.mail.mud.yahoo.com> Hello there, I've just started using rake. I really like it. Thanks! Yesterday, I was wanting to pass in the name of an executable to run, so I did rake --help and didn't see a way to get it in. After a while, I saw in rake.rb if arg =~ /^(\w+)=(.*)$/ ENV[$1] = $2 and then I knew how to do it. I'm writing to say that it would have helped me if the usage message was a bit different. Here's a suggested change relative to the trunk Index: lib/rake.rb =================================================================== --- lib/rake.rb (revision 602) +++ lib/rake.rb (working copy) @@ -1907,7 +1907,7 @@ # Display the program usage line. def usage - puts "rake [-f rakefile] {options} targets..." + puts "Usage: rake [option ...] [{ VAR=VALUE | taskname } ...]" end # Display the rake command line help. Thanks again, Murray Bishop ____________________________________________________________________________________ Yahoo!7 Mail has just got even bigger and better with unlimited storage on all webmail accounts. http://au.docs.yahoo.com/mail/unlimitedstorage.html -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rake-devel/attachments/20070628/db15bf15/attachment.html From andrea.fazzi at alca.le.it Fri Jun 29 06:43:46 2007 From: andrea.fazzi at alca.le.it (Andrea Fazzi) Date: Fri, 29 Jun 2007 12:43:46 +0200 Subject: [Rake-devel] Rake::Application#run question Message-ID: <4684E262.7030805@alca.le.it> Hi all, I can't understand what this means: Rake::Application#run() Run the Rake application. The run method performs the following three steps: * Initialize the command line options (init). * Define the tasks (load_rakefile). * Run the top level tasks (run_tasks). If you wish to build a custom rake command, you should call init on your application. The define any tasks. Finally, call top_level to run your top level tasks. In which way I can build a custom rake command? Thanks. Andrea From andrea.fazzi at le.infn.it Fri Jun 29 08:48:00 2007 From: andrea.fazzi at le.infn.it (Andrea Fazzi) Date: Fri, 29 Jun 2007 14:48:00 +0200 Subject: [Rake-devel] Rake::Application#run question Message-ID: <4684FF80.3030906@le.infn.it> Hi all, I can't figure out what this means: Rake::Application#run() Run the Rake application. The run method performs the following three steps: * Initialize the command line options (init). * Define the tasks (load_rakefile). * Run the top level tasks (run_tasks). If you wish to build a custom rake command, you should call init on your application. The define any tasks. Finally, call top_level to run your top level tasks. In which way I can build a custom rake command? Thanks. Andrea