diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2016-04-24 17:23:20 +1000 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2016-12-02 11:30:47 +1000 |
commit | 159480f2504cc08f9cc35660cc33090a49e0228e (patch) | |
tree | 741982f0327fd013d6f218b5582adea5d7d93fd4 /project/Quiet.scala | |
parent | bfa7ade0db6d36efc721e36dc41627dbd76b0176 (diff) | |
download | scala-159480f2504cc08f9cc35660cc33090a49e0228e.tar.gz scala-159480f2504cc08f9cc35660cc33090a49e0228e.tar.bz2 scala-159480f2504cc08f9cc35660cc33090a49e0228e.zip |
Support Java 9 modular runtime images
http://openjdk.java.net/jeps/220 changes the layout of the
JDK to encapsulate the provided libraries with the new module
system.
This commit modifies the compiler's classpath implementation
to scan the new location of these, the `jrt://` virtual filesystem.
This might need to be adjusted once we provide a means for
users to specify the subset of modules that they want to
depend on, but for now reclaims the ground we lost.
```
⚡ (java_use 9-ea; qscala)
Welcome to Scala 2.12.0-20160908-223617-7e4ebda (Java HotSpot(TM) 64-Bit Server VM, Java 9-ea).
Type in expressions for evaluation. Or try :help.
scala> import StackWalker._, java.util.stream._, scala.collection.JavaConverters._
import StackWalker._
import java.util.stream._
import scala.collection.JavaConverters._
scala> (() => StackWalker.getInstance(java.util.EnumSet.of(Option.RETAIN_CLASS_REFERENCE)).walk[Seq[String]]((s: java.util.stream.Stream[StackFrame]) => s.iterator.asScala.take(3).map(_.toString).toList)).apply().mkString("\n")
res0: String =
.$anonfun$res0$1(<console>:21)
.<init>(<console>:21)
.<clinit>(<console>)
scala>
```
I've marked the new class, `NioFile` as `private[scala]` to justify
the forward compatibility whitelist entry.
In principle we could use NioFile more widely rather than `PlainFile`
I tried this out in https://github.com/retronym/scala/commit/b2d0a17a
which passed CI. But to be conservative, I'm not submitting that change
at this point.
Diffstat (limited to 'project/Quiet.scala')
0 files changed, 0 insertions, 0 deletions