Open
Description
In general, Scala now works just fine on JDK 11
For the current support status of each JDK version, see https://docs.scala-lang.org/overviews/jdk-compatibility/overview.html
- JEP 223: New Version-String Scheme
- Update our version parsing in
isJavaAtLeast
(and elsewhere?) SI-9750 scala.util.Properties.isJavaAtLeast works with JDK9 scala#5276
- Update our version parsing in
- JEP 220: Modular Run-Time Images (includes SI-9103)
- Adapt our classpath to use jrt:/ virtual filesystem. WIP retronym:review/5112
- Update Zinc to understand that
jrt://
classpath entries should have a timestamp based on the JDK (maybe$JAVA_HOME/jmods/*.mod
? Find out exactly what file backsjrt://
) - Adapt REPL
:javap
command (currently getsIllegalArgumentException
inJavapClass$JavapTool$.apply(JavapClass.scala:337)
- JEP-261 Module System (Support JEP-261 Module System #529)
- javac allows programmers to declare module requirements, exports inline in the sourcetree ("module-info.java" files). What should we do?
- app class loader is no longer a URLClassloader. Lots of places enumerate the classpath for JARs to initialize settings for a compiler. Experiment, document.
- Update classfile reader to parse module-info.class (perhaps using ASM)
- create module readability / accessibilty graph (following transitive "public exports")
- JEP-238 Multi-Release JAR Files
- See if this feature is used in practice
- Update classpath implementation to be able to consume such JARs. (WIP)
- JEP 280: Indify String Concatenation
- Under target:jvm-1.9, consider emitting Javac style string concat with indy.
- Update to ASM 5.1 (?). As suggested by @varming Varming/5.1 scala-asm-legacy#11
- JEP-193
VarHandles
introduce a number of new methods annotated with@PolymorphicSignature
. Expand our compiler support to these methods.- Maybe: foster creation of a library of Java 8/9 shims that use invokedynamic to use some Java 9 features (e.g
VarHandle
) when available but fall back to Java 8 alternatives (e.g.Unsafe._
), as prototyped in retronym/scala@a95f03e
- Maybe: foster creation of a library of Java 8/9 shims that use invokedynamic to use some Java 9 features (e.g
- Infrastructure:
- Make JDK9 EA builds available in CI: Make it possible to use early access builds of OpenJDK scala-jenkins-infra#174
- SBT
- Review Zinc's use of
sun.boot.classpath
: https://github.com/sbt/zinc/blob/1.x/internal/zinc-compile-core/src/main/scala/sbt/internal/inc/CompilerArguments.scala#L83
- Review Zinc's use of
- Make mixin fields non-final to avoid verify errors. Use explicit fences to preserve memory effects: Trait encoding vs the persnickety JVM 9 verifier: final fields only updatable from within <init> #408