> -----Original Message----- > From: Vadim Gritsenko [mailto:[EMAIL PROTECTED] > Sent: Dienstag, 31. Mai 2005 15:47 > To: [email protected] > Subject: Re: XSP: EclipseJavaCompiler chokes on warings > > > Jochen Kuhnle wrote: > > Vadim Gritsenko <[EMAIL PROTECTED]> 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
I wouldn't want to tolerate warnings in all XSPs only because it cannot be avoided in some of them. It should be a configuration parameter on the ServerPagesGenerator to allow using either possibility depending on the pipeline. There are only two warning handling states: ignore and fail. Warning should be logged with level WARN, errors with level ERROR to let the logger config decide what is actually written to the logfile. Cheers, Alfred. This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please notify the sender urgently and then immediately delete the message and any copies of it from your system. Please also immediately destroy any hardcopies of the message. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. The sender's company reserves the right to monitor all e-mail communications through their networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them to be the views of the sender's company.
