You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Conor MacNeill <co...@m64.com> on 2000/07/31 15:43:02 UTC

RE: [Patch] Pedantic mode for Jikes

Peter,

I think we should keep patches to the dev list.

Just one issue with this patch. Do we want to expand on the use of
build.compiler.* properties? I actually would like to get rid of them
altogether - too implicit for me.

Conor


> -----Original Message-----
> From: donaldp@mad.scientist.com [mailto:donaldp@mad.scientist.com]
> Sent: Monday, 31 July 2000 17:23
> To: ant-user@jakarta.apache.org
> Subject: [Patch] Pedantic mode for Jikes
>
>
>
> Hi,
>
> yet another property that controls compiler behaviour :/
>
> Cheers,
>
> Pete
>
> *--------------------------------------------------*
> | Latrobe University,     |                        |
> | Bundoora, Australia     | Does the name 'Pavlov' |
> | Office: PW220           |    ring a bell ?       |
> | Ex: 2503                |                        |
> *--------------------------------------------------*
>
> Index: src/main/org/apache/tools/ant/taskdefs/Javac.java
> ===================================================================
> RCS
> file:
> /home/cvspublic/jakarta-ant/src/main/org/apache/tools/ant/taskdefs
> /Javac.java,v
> retrieving revision 1.26
> diff -r1.26 Javac.java
> 692a693,707
> >        /**
> >         * Jikes can issue pedantic warnings.
> >         */
> >        boolean pedantic = false;
> >        String pedanticProperty =
> project.getProperty("build.compiler.pedantic");
> >        if (pedanticProperty != null &&
> >            (pedanticProperty.equalsIgnoreCase("on") ||
> >             pedanticProperty.equalsIgnoreCase("true"))
> >            ) {
> >            pedantic = true;
> >        }
> >
> >        if (pedantic)
> >            argList.addElement("+P");
> >
>


Re: [Patch] Pedantic mode for Jikes

Posted by Stefan Bodewig <bo...@bost.de>.
>>>>> "CM" == Conor MacNeill <co...@m64.com> writes:

 CM> Just one issue with this patch. Do we want to expand on the use
 CM> of build.compiler.* properties? I actually would like to get rid
 CM> of them altogether - too implicit for me.

Big +1 from me. 

I'd like to see a solution for all these cases where you might have a
couple of alternative implementations for some kind of
functionality. jar/fastjar, rmic/jiffy, the various idl2java
implementations ...

Unfortunately I have no idea how to handle this cleanly. Creating a
base class with a bloated set of attributes (everything any
implementation might need) or something like

<javac ...>
  <jikes emacs="yes" pedantic="no" />
</javac>

which would ignore the nested jikes element unless we actually want to
use jikes?

Both are possible and I'm not too thrilled by either of each.

Stefan

RE: [Patch] Pedantic mode for Jikes

Posted by Peter Donald <do...@mad.scientist.com>.
At 11:43  31/7/00 +1000, you wrote:
>Peter,
>
>I think we should keep patches to the dev list.

oops - I gotta seperate the two lists in my folder :P

>Just one issue with this patch. Do we want to expand on the use of
>build.compiler.* properties? I actually would like to get rid of them
>altogether - too implicit for me.

Yup definetly a pet hate. I have yet to think of a good way of doing it
thou. The only decent way I have heard was when someone ages ago said they
want to declare *standard* parameters in their build file.

ie property javac.pedantic would cause the attribute pedantic to be set on
javac if the javac had said attribute and it wasn't defined in build.xml
task. 


so we could do things like set properties such as 

javac.debug=true
javac.deprecated=true

and then anytime javac task appeared and debug or deprecated attributes
weren't set they would automatically default to debug=true and
deprecated=true.

Not sure who proposed this but it is the cleanest approach I have seen.





Cheers,

Pete

*------------------------------------------------------*
| "Nearly all men can stand adversity, but if you want |
| to test a man's character, give him power."          |
|       -Abraham Lincoln                               |
*------------------------------------------------------*