On 30/10/2010, at 9:18 PM, Matthias Bohlen wrote:

> Hi Russel,
> 
> the dot is a perfectly valid char inside a URL, so Hudson includes it. Could 
> we simply insert a space before the dot? That way, the sentence would still 
> end with a period but Hudson would be able to see that the URL finishes 
> before the dot.

It's not actually a URL that Gradle outputs. It's a file path. And space is 
quite valid in a file path.

This really does feel to me like a problem that should be addressed in Hudson. 
Hudson is attempting to map the paths of files in the workspace to URLs. It 
could, I think, do a better job of distinguishing between the path and the 
punctuation in this instance. It has access to the contents of the workspace 
when it is doing the mapping, and given this easily figure out that 
'/home/hudson/.../test' is a directory in the workspace and 
'/home/hudson/.../test.' is not.

I really don't want to be writing my error messages to the lowest common 
denominator of what the various Gradle clients can parse.

Having said that, I think there are a few changes that will happen in the 
future which will help deal with this sort of problem. Firstly, we will 
introduce abstractions for reporting. A verification task, such as test, will 
be able to declare that it generates a report, and where the report is 
generated to. Gradle will provide the error message telling you that the tests 
failed and where to look for more details, rather than each task. And so, we'll 
have a single place to deal with the problem, rather than many different 
places. I'd much rather mess with the formatting in a single place, rather than 
a dozen places. We could even do this dynamically, so that the formatting is 
Hudson-friendly when running under Hudson.

Another change, related to this, is that I imagine that tools which embed 
Gradle will start to use the styled text output stream that Gradle generates, 
rather than the character output. This will allow them to, for example, 
colourise the text or highlight parts of it in some way. We could use this to 
mark up file paths in the output, so that the tool does not need to parse the 
text output at all, and this kind of problem goes away.


> 
> Cheers
> Matthias
> 
> ---
> 
> Am 30.10.2010 um 08:39 schrieb Russel Winder:
> 
>> On Fri, 2010-10-29 at 23:23 +0200, Matthias Bohlen wrote:
>>> Hi,
>>> 
>>> 
>>> we run gradle inside Hudson. When a test fails, gradle finishes the
>>> build with the following message:
>>> 
>>> 
>>> Execution failed for task ':mySubproject:test'.
>>> Cause: There were failing tests. See the report at 
>>> /home/hudson/jobs/myProject/workspace/zifs/mySubproject/build/reports/tests.
>>> 
>>> Note the dot at the end of that message. Hudson translates the message
>>> into a clickable link (http://my.build.server.com/jobs/myProject/...).
>>> The dot at the end makes the Tomcat server say "HTTP 404". We always
>>> have to remove the dot to see the test failures.
>>> 
>>> 
>>> Could you remove the dot, please?
>> 
>> Conversely should this actually be treated as a Hudson bug not a Gradle
>> bug.  Gradle is issuing perfectly good and well punctuated text.
>> Sentences end with full stops.  The fact that Hudson is parsing this to
>> provide extra functionality of click through links is fine, but isn't it
>> Hudson's responsibility to parse things correctly?  In this case not
>> including punctuation in the URL.
>> 
>> -- 
>> Russel.
>> =============================================================================
>> Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.win...@ekiga.net
>> 41 Buckmaster Road    m: +44 7770 465 077   xmpp: rus...@russel.org.uk
>> London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
> 
>   http://xircles.codehaus.org/manage_email
> 
> 


--
Adam Murdoch
Gradle Developer
http://www.gradle.org
CTO, Gradle Inc. - Gradle Training, Support, Consulting
http://www.gradle.biz

Reply via email to