Future proofing use of ct.sym from Scala compiler

Jason Zaugg jzaugg at gmail.com
Tue Mar 6 01:45:43 UTC 2018


On Tue, 6 Mar 2018 at 11:16 Jonathan Gibbons <jonathan.gibbons at oracle.com>
wrote:

> PlatformProvider, and JDKPlatformProvider addresses some use cases that
> are probably no longer relevant.
>
> I don't think we want to directly expose that functionality in
> javax.tools.
>
> However, I agree it is interesting to ensure that we can get at the
> functionality for supporting different versions of the platform, including
> the underlying mechanisms of ct.sym and MR-jars, but as much as possible I
> think we should work within the existing javax.tools API ... for example by
> setting options of a file manager.
>
> Is there anything specific on JDKPlatformProvider you are looking to
> use/support that could not be part of an enhanced file manager?
>

No, supporting --release as an option to the FileManager would support our
use case.

I suppose an alternative to exposing this via the existing API:

   handleOption("--release", "8")

... is the way to go, or whether new API should be introduced involving
`Runtime.Version` to be consistent with `JarFile.<init>` or
`ModulePath.of`. I don't mind either way.

Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20180306/5c2ecab6/attachment.html>


More information about the compiler-dev mailing list