On Mon, Aug 18, 2008 at 9:29 PM, Assaf Arkin <[EMAIL PROTECTED]> wrote:
> On Sun, Aug 17, 2008 at 6:31 AM, lacton <[EMAIL PROTECTED]> wrote:
>> Looking at the Buildr::artifacts method, I noticed that it returns an
>> array of tasks, except for String arguments which are expanded as path
>> but stay as Strings.
>>
>> Is there a reason for not converting the String arguments to FileTasks?
>
> silence = probably for a reason, but I don't remember

To find out whether it was important or not, I changed the artifacts
method to return a FileTask instead of a String, and then I ran all
the specs.  One of them failed for a very good reason.  If the user
writes "compile.with 'no-such.jar'", we want the build to abort with
the failure message "Don't know how to build no-such.jar".  With my
change, compile.with converted the string 'no-such.jar' to a FileTask
and rake believed it knew how to build the file and there was no
error.  I reverted my change.

Now I have a new puzzle.  I don't understand why Rake accepts that a
file task's execution ends without the file existing.  It seems a
reasonable post-condition to me.

Lacton

Reply via email to