You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Jochen Kuhnle <li...@kuhnle.net> on 2005/05/27 20:16:04 UTC
XSP: EclipseJavaCompiler chokes on warings
Hi,
the EclipseJavaCompiler chokes on warnings, resulting in the XSP not
working. This is because in line 365 (cocoon-2.1.8-dev), it checks against
"result.hasProblems()" instead of "result.hasErrors()". I'd like to
propose an option so the compiler ignores warnings and fails only if there
are errors. However, there is more than one way to do this, so 'd like to
ask before I create a patch:
1. Add a property "setIgnoreWarnings" to LanguageCompiler, configure the
property in the "programming-language" section of cocoon.xconf and have
CompiledProgrammingLanguage set it.
2. Avalonize the Compiler itself and make it configurable.
3. Other suggestions?
Note that this is important, because some warnings cannot be circumvented,
e.g. JDK 1.5 type safety warnings when using legacy code.
Regards,
Jochen
Re: XSP: EclipseJavaCompiler chokes on warings
Posted by Antonio Gallardo <ag...@agssa.net>.
On Mar, 31 de Mayo de 2005, 7:20, Jochen Kuhnle dijo:
> Vadim Gritsenko <va...@reverycodes.com> wrote on 31.05.2005 05:00:36:
>
>> Jochen Kuhnle wrote:
>> > Hi,
>> >
>> > the EclipseJavaCompiler chokes on warnings, resulting in the XSP not
>> > working. This is because in line 365 (cocoon-2.1.8-dev), it checks
> against
>> > "result.hasProblems()" instead of "result.hasErrors()". I'd like to
>> > propose an option so the compiler ignores warnings and fails only if
> there
>> > are errors. However, there is more than one way to do this, so 'd like
> to
>> > ask before I create a patch:
>> >
>> > 1. Add a property "setIgnoreWarnings" to LanguageCompiler, configure
> the
>> > property in the "programming-language" section of cocoon.xconf and
> have
>> > CompiledProgrammingLanguage set it.
>> >
>> > 2. Avalonize the Compiler itself and make it configurable.
>> >
>> > 3. Other suggestions?
>>
>> Why not dump warnings into the log file (as WARNings), and stop only
>> on errors -
>> will this be possible?
>
> This gives us three warning handling states: ignore, log and fail. I would
> like to keep the current behaviour, because if the user does not want to
> tolerate warnings, he has the "fail hard and fast" option and immediatly
> gets an error page. On the other hand, if he has decided to "live with
> warnings", we should make it possible for him to prevent log cluttering.
>
> This can be part of the configurable options, but I'd like to have your
> opinions on how to make the compiler configurable, by option 1. or 2.?
Nah. I think the option is not needed. I think we should keep the current
behavior + turn off warnings as you suggested in your first mail.
Best Regards,
Antonio Gallardo.
Re: XSP: EclipseJavaCompiler chokes on warings
Posted by Antonio Gallardo <ag...@agssa.net>.
On Lun, 30 de Mayo de 2005, 22:00, Vadim Gritsenko dijo:
> Jochen Kuhnle wrote:
>> Hi,
>>
>> the EclipseJavaCompiler chokes on warnings, resulting in the XSP not
>> working. This is because in line 365 (cocoon-2.1.8-dev), it checks
>> against
>> "result.hasProblems()" instead of "result.hasErrors()". I'd like to
>> propose an option so the compiler ignores warnings and fails only if
>> there
>> are errors. However, there is more than one way to do this, so 'd like
>> to
>> ask before I create a patch:
>>
>> 1. Add a property "setIgnoreWarnings" to LanguageCompiler, configure the
>> property in the "programming-language" section of cocoon.xconf and have
>> CompiledProgrammingLanguage set it.
>>
>> 2. Avalonize the Compiler itself and make it configurable.
>>
>> 3. Other suggestions?
>
> Why not dump warnings into the log file (as WARNings), and stop only on
> errors -
> will this be possible?
Yep. This is posible, but maybe not desired.
Best Regards,
Antonio Gallardo.
Re: XSP: EclipseJavaCompiler chokes on warings
Posted by Vadim Gritsenko <va...@reverycodes.com>.
Jochen Kuhnle wrote:
> Vadim Gritsenko <va...@reverycodes.com> wrote on 31.05.2005 05:00:36:
>
>>Jochen Kuhnle wrote:
>>
>>>the EclipseJavaCompiler chokes on warnings, resulting in the XSP not
>>>working. This is because in line 365 (cocoon-2.1.8-dev), it checks
>>>against
>>>"result.hasProblems()" instead of "result.hasErrors()". I'd like to
>>>propose an option so the compiler ignores warnings and fails only if
>>>there
>>>are errors. However, there is more than one way to do this, so 'd like
>>>to ask before I create a patch:
>>>
>>>1. Add a property "setIgnoreWarnings" to LanguageCompiler, configure
>>>the
>>>property in the "programming-language" section of cocoon.xconf and
>>>have
>>>CompiledProgrammingLanguage set it.
>>>
>>>2. Avalonize the Compiler itself and make it configurable.
>>>
>>>3. Other suggestions?
>>
>>Why not dump warnings into the log file (as WARNings), and stop only
>>on errors - will this be possible?
>
>
> This gives us three warning handling states: ignore, log and fail. I would
> like to keep the current behaviour, because if the user does not want to
> tolerate warnings, he has the "fail hard and fast" option and immediatly
> gets an error page. On the other hand, if he has decided to "live with
> warnings", we should make it possible for him to prevent log cluttering.
>
> This can be part of the configurable options, but I'd like to have your
> opinions on how to make the compiler configurable, by option 1. or 2.?
1. is fine.
Vadim
Re: XSP: EclipseJavaCompiler chokes on warings
Posted by Jochen Kuhnle <li...@kuhnle.net>.
Vadim Gritsenko <va...@reverycodes.com> wrote on 31.05.2005 05:00:36:
> Jochen Kuhnle wrote:
> > Hi,
> >
> > the EclipseJavaCompiler chokes on warnings, resulting in the XSP not
> > working. This is because in line 365 (cocoon-2.1.8-dev), it checks
against
> > "result.hasProblems()" instead of "result.hasErrors()". I'd like to
> > propose an option so the compiler ignores warnings and fails only if
there
> > are errors. However, there is more than one way to do this, so 'd like
to
> > ask before I create a patch:
> >
> > 1. Add a property "setIgnoreWarnings" to LanguageCompiler, configure
the
> > property in the "programming-language" section of cocoon.xconf and
have
> > CompiledProgrammingLanguage set it.
> >
> > 2. Avalonize the Compiler itself and make it configurable.
> >
> > 3. Other suggestions?
>
> Why not dump warnings into the log file (as WARNings), and stop only
> on errors -
> will this be possible?
This gives us three warning handling states: ignore, log and fail. I would
like to keep the current behaviour, because if the user does not want to
tolerate warnings, he has the "fail hard and fast" option and immediatly
gets an error page. On the other hand, if he has decided to "live with
warnings", we should make it possible for him to prevent log cluttering.
This can be part of the configurable options, but I'd like to have your
opinions on how to make the compiler configurable, by option 1. or 2.?
Regards,
Jochen
Re: XSP: EclipseJavaCompiler chokes on warings
Posted by Vadim Gritsenko <va...@reverycodes.com>.
Jochen Kuhnle wrote:
> Hi,
>
> the EclipseJavaCompiler chokes on warnings, resulting in the XSP not
> working. This is because in line 365 (cocoon-2.1.8-dev), it checks against
> "result.hasProblems()" instead of "result.hasErrors()". I'd like to
> propose an option so the compiler ignores warnings and fails only if there
> are errors. However, there is more than one way to do this, so 'd like to
> ask before I create a patch:
>
> 1. Add a property "setIgnoreWarnings" to LanguageCompiler, configure the
> property in the "programming-language" section of cocoon.xconf and have
> CompiledProgrammingLanguage set it.
>
> 2. Avalonize the Compiler itself and make it configurable.
>
> 3. Other suggestions?
Why not dump warnings into the log file (as WARNings), and stop only on errors -
will this be possible?
Vadim