[Rake-devel] FileTask#needed? and FileTask#timestamp "bug"
philipp.neubeck at gmx.de
Wed Oct 19 12:40:48 EDT 2005
On Tue, 6 Sep 2005 11:27:30 +0200
> On Tue, 6 Sep 2005 00:41:38 -0400
> Jim Weirich <jim at weirichhouse.org> wrote:
> > Regarding the behavior of timestamp when the file doesn't exist:
> > I went with the time stamp of a non-existing file should be a time stamp that
> > is earlier than any existing file. The biggest reason is that using a late
> > time stamp for non-existing files would cause the target to be continually
> > rebuilt, and that just doesn't make sense.
> > Anyways, the change is in the 0.6.0 just out today.
> first, before any one gets angry because i don't just say 'you're right' :-), i rate this problem (if it's any) as minor.
> sorry if i'm a a bit (or very) blind, but let me explain why i think you're both wrong:
> the normal user of Rake, should tell Rake the truth about his dependencies, i.e. if you insert a dependency the target should only be correctly invokable if the prerequisite is fullfilled. (any other behaviour is special and can be changed by each user)
> so the behaviour Patrick mentions is IMO not the general behaviour a Rake user (should :-) wants, because he inserts dependencies which aren't any (he does not tell the Rake system everything he knows!)
> so in this "normal" case, what you say Jim (...the target would be continually rebuilt...) is not right:
> the file thats missing would be relevant to rebuilt the target, but since it's non-existant, the target-rebuilt would fail, so the user would see it failed and has to correct the problem.
> main.exe needs main.cpp needs main.hpp. you correctly built with rake. then you rename main.hpp and reinvoke rake, but rake would just do nothing. or say you changed some pieces of your dependency generator wrongly and it produces filenames of non-existant files, then rake would not complain, never, not even a warning.
> i hope the behaviour i described is understandable. the only question is what should be the standard, the one you describe or i describe.
> i don't know if it would be better to make both behaviours accessable.
hm.. i'm waiting for an anwser. at least it would be nice if you would tell your state: are you still thinking about what the correct solution should be or did you solve this problem in silence?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/rake-devel/attachments/20051019/56726b7f/attachment-0001.bin
More information about the Rake-devel