[foreign-jextract] RFR: 8252634: jextract should generate type annotations for C types

Maurizio Cimadamore mcimadamore at openjdk.java.net
Wed Sep 2 09:45:28 UTC 2020


On Wed, 2 Sep 2020 04:27:30 GMT, Athijegannathan Sundararajan <sundar at openjdk.org> wrote:

> @C annotation generated for C types

In general this looks good. I commented on the location of the C annotation; I believe it's time we consider moving the
jextract runtime support into a more blessed place (e.g. some exported `runtime` package inside the jextract module).
If we do that, the drawback is that generated code would depend on the jextract module - but I think that's acceptable?
Anyway, approving for now, what I'm requesting is a deeper change which should be handled separately.

src/jdk.incubator.jextract/share/classes/jdk/internal/jextract/impl/resources/C.java.template line 1:

> 1: // Generated by jextract
> 2:

Not sure about using a template for this. If we do this, we severely limit ability for 3rd parties to write an
annotation processor (since the annotation name/package is not stable).

-------------

Marked as reviewed by mcimadamore (Committer).

PR: https://git.openjdk.java.net/panama-foreign/pull/300


More information about the panama-dev mailing list