JDK 13 RFR of JDK-8221264: Refactor SourceVersion#latestSupported
Jonathan Gibbons
jonathan.gibbons at oracle.com
Sun Mar 24 14:49:14 UTC 2019
On 3/23/19 11:54 AM, Martin Buchholz wrote:
> I'm confused about how an IDE would access the jdk(N+1) API inside a
> JDK(N).
>
> Of course, the jdk build needs to use this API while bootstrapping the
> JDK(N+1), but this seems to involve a lot of build magic and "interim"
> modules, e.g. I see java.compiler.interim in my build tree. But isn't
> that all implementation detail of the build system? Users can't
> simply take a java.compiler module out of a JDK(N+1) and use it with a
> JDK(N) can they?
The build magic is related to this issue but not an inherent part of the
issue.
The javac classes in JDK N, i.e. the classes in the java.compiler and
jdk.compiler modules) are guaranteed to be executable on JDK N-1 [*],
and able to compile source code for `--source N` provided that a
suitable copy of the API for JDK N is available. In the build magic,
that copy of the API comes from the source code in the repo. In other
deployments, the copy of the API can be provided in any suitable
compiled form.
-- Jon
[*] Note that as generally used in this sort of context, "N-1" means the
previous GA release, which may be numerically 2 less than N if the
following release is not yet final.
More information about the compiler-dev
mailing list