chaucoder / checker-plugin

Automatically exported from code.google.com/p/checker-plugin
0 stars 0 forks source link

code bloat? #3

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The instructions for checkers.jar and javac.jar work OK, though I'd prefer they 
be provided as part of the single Eclipse installation.  However, I find this 
difficult usability problem:

- if I add annotations such as @NonNull, @Nullable to the code to add type 
information, then I must have checkers.jar and javac.jar to compile.  But on 
inspection these add a lot of classes and code to the program.

- if I want to exclude those jars from delivered code, I have to remove all the 
imports and annotations as well.

It seems all one needs to deliver with a running program are definitions of the 
annotations.  The framework after all is about static checks of the source 
code.  I expected the Eclipse plugin to provide enhancements to the compiler, 
and not add anything beyond annotation definitions to the program itself.

Original issue reported on code.google.com by c...@frontiernet.net on 20 Aug 2010 at 3:06

GoogleCodeExporter commented 8 years ago
There is an implicit import feature of the Checker Framework that lets you 
annotate types using comments, which is intended to avoid conflicts on older 
versions of Java. This would fix this issue as well. Unfortunately, it doesn't 
interact well with the plugin yet, but it's a feature we aim to support in the 
future.

Original comment by asumu.ta...@gmail.com on 21 Aug 2010 at 4:26

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
In the latest version on the update site, 0.0.17, I have enabled the implicit 
import setting that was previously disabled (it's in the preferences). Also, 
the plugin now defaults to using the built-in checkers.jar (if one is not 
detected on your classpath). Can you try this and see if it works better for 
you?

Original comment by asumu.ta...@gmail.com on 21 Aug 2010 at 6:23

GoogleCodeExporter commented 8 years ago

Original comment by asumu.ta...@gmail.com on 21 Aug 2010 at 6:24

GoogleCodeExporter commented 8 years ago
I updated to 0.0.18

- I can run the checker on code without having to include checkers.jar and 
javac.jar.  This is an improvement on out-of-the-box usability.

- I still have to include them both in the project path if I annotate 
something. (I'd hope to just include the definitions of the annotations.)

- I had to explicitly turn on the implicit import (it did not appear to be on 
by default, but that may be because I was not using a completely clean 
installation and new project), but it did work as expected.

- Annotations in comments also work as expected (and without any extra jars on 
the project class path).

Original comment by c...@frontiernet.net on 21 Aug 2010 at 1:11

GoogleCodeExporter commented 8 years ago
Implicit import is not currently enabled by default in a clean install either.

Original comment by asumu.ta...@gmail.com on 23 Aug 2010 at 5:06