Future of 'type-annotations/type-annotations' forest
Eric McCorkle
eric.mccorkle at oracle.com
Mon May 19 17:48:23 UTC 2014
On 05/19/14 12:55, Werner Dietl wrote:
> Hi Eric, all,
>
> thanks for all your recent improvements to type annotations!
> I have integrated all jdk9 changes into type-annotations without any issue.
> I then updated the Checker Framework to the new API and all unit tests
> and running checkers on Daikon pass again. So things are looking good
> from my side.
> (I might still be using "deprecated" APIs though. Do you have an ETA
> for when the clean-up patch is going out?)
I could post the cleanup in diff form right now. The webrev script
seems to include any outgoing changesets, so I can't post a "clean"
webrev for it until the patch on which it depends goes in.
> Thanks for integrating the re-ordering fix with:
> http://hg.openjdk.java.net/jdk9/dev/langtools/rev/9c2c24a6785d
> I think a reference to my original contribution from:
> http://hg.openjdk.java.net/type-annotations/type-annotations/langtools/rev/7e9c983565ac
> would have been appropriate.
Of course; it is always my intention that the right people are
attributed. I had copied your patch intending to write a test, but
after investigation, we determined that a test can't really be written.
The correct thing probably would have been to import your change
directly, and that's what I would have done had I known ahead of time
that writing a test wasn't feasible. That was an accident; however, I
will update the JBS issue to reference your fix.
>
> In type-annotations, I made sure that the BasicAnnoTest at:
> test/tools/javac/processing/model/type/BasicAnnoTests.java
> compiles correctly.
> However, the generics/arrays/exceptions test cases at the end do not work yet.
> Is this something you are aware of? I thought one reason for your
> refactorings was exactly to make these tests work.
It seems that DPrinter has gotten out of date, due to a few fixes that
have changed the internal data structures. Among these are a fix that
refactors the top-level nodes, and my fix that eliminates AnnotatedType.
If you've fixed all (or even some) of these issues, I'll gladly
integrate your changes.
>
> There is one difference between jdk9 and type-annotations that is
> required for the Checker Framework to work:
> adding the "copy" method to
> com/sun/tools/javac/code/TypeAnnotationPosition.java. An alternative
> design would be to have factory methods that create new TAPs from an
> existing TAP, changing the position.
I think I like the factory approach better, as it's more in line with
the way we've evolved the TypeAnnotationPosition API. I will file an
RFE to add it.
> Another difference that would make compatibility between jdk8 and jkd9
> easier is if field "exception_index" remained public to allow direct
> access.
Unfortunately, I think that's less feasible. The exception_index field
currently gets used to store both exception indexes, as well as a
combination of catch info and source positions. Because the formatting
for this is nontrivial, and we have plans to eliminate it in the future,
exception_index was made private and accessible through getters and setters.
I would, however, be willing to add an updateExceptionIndex, which would
allow you to change the index after it has already been set.
> A few tests in jdk9 are disabled, even though they pass in type-annotations.
> The other differences between jdk9 and type-annotations are small
> fixes to javadoc, performance, and imports.
> See my message from May 8 for details:
> http://mail.openjdk.java.net/pipermail/type-annotations-dev/2014-May/001722.html
More tests are being re-enabled in the cleanup patch. I am currently
looking into the javadoc tests as well. As for the other fixes, I think
I would like to get the two big patches (the rearchitecting patch and
the cleanup patch) integrated, then look at them one-by-one.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eric_mccorkle.vcf
Type: text/x-vcard
Size: 314 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/type-annotations-dev/attachments/20140519/d3586cae/eric_mccorkle.vcf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://mail.openjdk.java.net/pipermail/type-annotations-dev/attachments/20140519/d3586cae/signature.asc>
More information about the type-annotations-dev
mailing list