Copilot commented on code in PR #2236:
URL: https://github.com/apache/pekko/pull/2236#discussion_r2365003188
##########
project/PekkoBuild.scala:
##########
@@ -303,7 +303,7 @@ object PekkoBuild {
doc / javacOptions ++= Seq("-Xdoclint:none", "--ignore-source-errors"))
def loadSystemProperties(fileName: String): Unit = {
- import scala.collection.JavaConverters._
+ import scala.jdk.CollectionConverters._
Review Comment:
In sbt 1.x (Scala 2.12 for project/ sources),
scala.jdk.CollectionConverters._ is unavailable without scala-collection-compat
on the meta-build classpath, causing a compile error. Consider reverting to
scala.collection.JavaConverters._ here, or add scala-collection-compat to
project/build.sbt so this import resolves.
```suggestion
import scala.collection.JavaConverters._
```
##########
project/ProjectFileIgnoreSupport.scala:
##########
@@ -31,13 +31,13 @@ class ProjectFileIgnoreSupport(ignoreConfigFile: File,
descriptor: String) {
}
private lazy val ignoredFiles: Set[String] = {
- import scala.collection.JavaConverters._
+ import scala.jdk.CollectionConverters._
stdoutLogger.debug(s"Loading ignored-files from
$ignoreConfigFile:[${ignoreConfig.origin().url().toURI.getPath}]")
ignoreConfig.getStringList("ignored-files").asScala.toSet
}
private lazy val ignoredPackages: Set[String] = {
- import scala.collection.JavaConverters._
+ import scala.jdk.CollectionConverters._
Review Comment:
Build definition sources under project/ are compiled with sbt's Scala
version (sbt 1.x uses Scala 2.12), where scala.jdk.CollectionConverters._ is
not available unless scala-collection-compat is on the meta-build classpath.
Either keep scala.collection.JavaConverters._ in project/ sources, or add the
compat library to the meta-build, e.g., in project/build.sbt:
libraryDependencies += \"org.scala-lang.modules\" %%
\"scala-collection-compat\" % \"<version>\". The same applies to the other
import in this file.
##########
project/MultiNode.scala:
##########
@@ -52,7 +52,7 @@ object MultiNode extends AutoPlugin {
override lazy val projectSettings: Seq[Def.Setting[_]] = multiJvmSettings
private lazy val defaultMultiJvmOptions: Seq[String] = {
- import scala.collection.JavaConverters._
+ import scala.jdk.CollectionConverters._
Review Comment:
This import will not resolve in project/ under sbt 1.x (Scala 2.12) unless
scala-collection-compat is added to the meta-build. To avoid breaking the
build, either keep scala.collection.JavaConverters._ in project/ sources or add
the compat dependency in project/build.sbt.
```suggestion
import scala.collection.JavaConverters._
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]