Open xuwei-k opened 5 months ago
The Java feature is mostly about prototyping and JShell. It would be nice if -Yimports
handled modules.
scala -Yimports:java.lang,scala,scala.Predef,scala.annotation,scala.util.chaining
becomes
scala -Yimports:java.base,scala,scala.Predef,scala.annotation,scala.util.chaining
where for conflicts between module and package names it could support
scala -Yimports:module java.base,etc
or someday just
scala -Yimports:java.base,scala.base
would it be useful for our parser to accept but ignore such imports? or does it need to actually take action in order for the change to be useful?
Reproduction steps
https://openjdk.org/jeps/476
Scala version: 2.13.14
B.scala
A.java
build.sbt
project/build.properties
Problem
run
sbt compile
workaround
set
compileOrder := CompileOrder.JavaThenScala
orcompileOrder := CompileOrder.ScalaThenJava
in sbt