Actually we already have this set to error for the Equinox projects.  This
is evident if you move up to the latest I-Build.  See:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=265998
https://bugs.eclipse.org/bugs/show_bug.cgi?id=265999
https://bugs.eclipse.org/bugs/show_bug.cgi?id=266000

We now have a few compile errors showing deadcode.  For org.eclipse.osgi
and org.eclipse.equinox.app projects I changed the error to a warning.
This is not ideal since like you said a vast majority of the cases are
valid problems.  I opened an enhancement bug
https://bugs.eclipse.org/bugs/show_bug.cgi?id=266132 against JDT for adding
a way to suppress this warning for particular methods/fields etc.

Tom




                                                                       
  From:       John Arthorne <[email protected]>                 
                                                                       
  To:         Equinox development mailing list <[email protected]>
                                                                       
  Date:       02/24/2009 09:07 PM                                      
                                                                       
  Subject:    Re: [equinox-dev] Fw: [eclipse-dev] New unused 
method/type/ctor/field   diagnostics from  Java
              compiler.                                                
                                                                       






Makes sense to me. I don't know what to do about those few reflection cases
though. It would be unfortunate to lose the warning because the vast
majority of cases I found with this warning were valid problems.


                                                                       
 Thomas Watson                                                         
 <[email protected]>                                                 
 Sent by:                                                               To
 equinox-dev-boun...@ecli      [email protected]                 
 pse.org                                                                cc
                                                                       
                                                                   Subject
 02/24/2009 09:07 AM           [equinox-dev] Fw: [eclipse-dev] New unused
                               method/type/ctor/field        diagnostics
                               from        Java compiler.              
     Please respond to                                                 
    Equinox development                                                
       mailing list                                                    
  <[email protected]                                              
            g>                                                         
                                                                       
                                                                       
                                                                       
                                                                       





Should we switch the dead code warning to error for the equinox projects?
This way we can find the warnings in the workspace easily and fix them
before they go into the build. Thoughts?

Tom


----- Forwarded by Thomas Watson/Austin/IBM on 02/24/2009 08:06 AM -----
                                                                       
                                                                       
 From:   Andrew Niefer <[email protected]>                            
                                                                       
                                                                       
 To:     "General development mailing list of the Eclipse project."    
         <[email protected]>                                     
                                                                       
                                                                       
 Date:   02/24/2009 07:53 AM                                           
                                                                       
                                                                       
 Subject Re: [eclipse-dev] New unused method/type/ctor/field diagnostics
 :       from Java compiler.                                           
                                                                       






These errors should only ever appear as warnings during the nightly and
integration builds run by releng.

This is the difference between compiling in the workspace and compiling
headless with the batch compiler, "errors" that are not real java compile
problems are only warnings.

However, this doesn't mean they shouldn't be fixed :)

-Andrew,
                                                                       
 Chris Goldthorpe <[email protected]>                                   
                                                                       
 Sent by:                                                              
 [email protected]                                        To
                                          "General development mailing 
                                          list of the Eclipse project."
 02/23/2009 05:41 PM                      <[email protected]>    
                                                                        cc
                                                                       
                                                                   Subject
          Please respond to               Re: [eclipse-dev] New unused 
  "General development mailing list       method/type/ctor/field       
       of the Eclipse project."           diagnostics from Java compiler.
      <[email protected]>                                        
                                                                       
                                                                       
                                                                       
                                                                       
                                                                       
                                                                       
                                                                       







I would reiterate this alert and encourage committers to make sure that
they build all their plug-in projects using last weeks I-build, including
those which you have not modified in the last week. I ran into three of
these errors myself today when I was preparing to tag my projects for the
integration build. They were trivial to fix.

Chris
                                                                       
 From:   Srikanth S Adayapalam <[email protected]>          
                                                                       
 To:     [email protected]                                       
                                                                       
 Date:   02/23/2009 02:13 PM                                           
                                                                       
 Subject [eclipse-dev] New unused method/type/ctor/field diagnostics from
 :       Java compiler.                                                
                                                                       








Hello !

With the recent resolution of the following defects:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=201912 ([compiler] Unused
public members of private classes not flagged)
https://bugs.eclipse.org/bugs/show_bug.cgi?id=264991 (Wrong 'unused'
problem reported)
https://bugs.eclipse.org/bugs/show_bug.cgi?id=265142 (Compiler fails to
warn on unused constructors of private classes)

you may begin to see new unused entity diagnostics from the Eclipse Java
compiler if your private classes contains unused methods, types,
fields or constructors. The first two fixes are available from Build ID
I20090217-2200 and the final one will become available from the next
integration build.

For projects which are configured so that an unused code diagnostics would
result in an error, this would mean a build breakage
once you upgrade to the build with the fix (should your projects have
unused code). Hence the advance alert.

FYI,
Thanks!
Srikanth

_______________________________________________
eclipse-dev mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/eclipse-dev

_______________________________________________
eclipse-dev mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/eclipse-dev
_______________________________________________
eclipse-dev mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/eclipse-dev
_______________________________________________
equinox-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/equinox-dev
_______________________________________________
equinox-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/equinox-dev

<<inline: graycol.gif>>

<<inline: ecblank.gif>>

_______________________________________________
equinox-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/equinox-dev

Reply via email to