-
Notifications
You must be signed in to change notification settings - Fork 622
Closed
Description
I have a Rakefile with these file tasks:
file "fileA" => %W[] do |t| sh %Q[echo contentA >#{t.name}] end
file "fileB" => %W[fileA] do |t| sh %Q[(cat fileA; echo transformationB) >#{t.name}] end
file "fileC" => %W[fileB] do |t| sh %Q[(cat fileB; echo transformationC) >#{t.name}] end
I perform this setup, where everything is built and then the first file in the chain (fileA
) is updated:
$ rake fileC
echo contentA >fileA
(cat fileA; echo transformationB) >fileB
(cat fileB; echo transformationC) >fileC
$ touch fileA
And now rake -n
tells me that only fileB
needs to be updated...
$ rake -n fileC
** Invoke fileC (first_time, not_needed)
** Invoke fileB (first_time)
** Invoke fileA (first_time, not_needed)
** Execute (dry run) fileB
Even though it knows it must update both fileB
and fileC
:
$ rake fileC
(cat fileA; echo transformationB) >fileB
(cat fileB; echo transformationC) >fileC
I expected rake -n
to tell me this:
$ rake -n fileC
[...]
** Execute (dry run) fileB
** Execute (dry run) fileC
The problem seems to stem from the fact that the internal function out_of_date?
(in file_task.rb
) does not take into account when a file should have updated its timestamp (but didn't, because this is a dry-run).
Metadata
Metadata
Assignees
Labels
No labels