Non-javac compiler support for '--release N'

Ethan McCue ethan at mccue.dev
Fri May 6 14:08:13 UTC 2022


Totally non authoritative answer, but at first read ct.sym
is generated by this script here

https://github.com/openjdk/jdk/blob/master/make/langtools/src/classes/build/tools/symbolgenerator/CreateSymbols.java

Conceptually, an alternative compiler can just run the same script and get
the same output, but with the conceit that deciding on the file format for
the dump and keeping the script updated with respect to the rest of the JDK
would be the responsibility of that compiler.

The output of the script could also be written out manually into whatever
format. "Which apis we're introduced in which release" is a stable set of
things. You could do it by hand, the script is just an optimization for
carpal tunnel.

On Fri, May 6, 2022, 2:48 PM S A <simeon.danailov.andreev at gmail.com> wrote:

> Hi all,
>
> to summarize my question, how is a non-javac compiler expected to support
> the '--release N' option?
>
> E.g. the Eclipse Java compiler utilizes the archive 'lib/ct.sym' that is
> available in the JDK distributions. As far as I'm aware, the structure of
> this archive has no official specification and  there is no guarantee that
> the current structure will remain stable (including backporting changes).
> So are other compilers meant to use this archive, or was it added
> exclusively for javac?
>
> From the jdt-dev Eclipse mailing list, I was pointed to:
> https://bugs.openjdk.java.net/browse/JDK-8199521 (on which there has been
> no activity)
>
> Best regards and thanks,
> Simeon
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20220506/a3e961f3/attachment.htm>


More information about the compiler-dev mailing list