From: ara.t.howard@... Date: 2006-04-27T02:12:43+09:00 Subject: Re: Rake task dependeny vs. method call On Thu, 27 Apr 2006 Ara.T.Howard@noaa.gov wrote: > but by redefining tasklib.rb to use tsort both task lists function correctly: > > > harp:~ > cat a.rb > require 'tasklib2' > > task :uidgen do |*argv| (seed = argv.shift) ? rand(seed) : > $UID||=uidgen(42) end > > task :a => :uidgen do y "a" => $UID end > task :b => :a do y "b" => uidgen(42) end > task :c => :a do y "c" => uidgen(42) end > task :d => [:b, :c] do y "d" end > > d() > > > harp:~ > ruby a.rb > --- > a: 5 > --- > b: 15 > --- > a: 5 > --- > c: 3 > --- d i realized as soon as i hit send this error. the dag run should be looked up from the global dat (TH in tasklib2) so a does not get run more than once. like i said, my impl wasn't perfect but, by using tsort, we can indeed enforce only the declared call graph. sorry for the mistake. cheers. -a -- be kind whenever possible... it is always possible. - h.h. the 14th dali lama