Open jxnu-liguobin opened 2 weeks ago
This should be fixed already in https://github.com/scala/scala3/pull/20493, I think it should be available in 3.5.1 but we might backport it to 3.3.4 LTS. The minimization is missing the dependencies, so I cannot confirm it yet.
@jxnu-liguobin can you help us minimise this? or at least provide us the dependencies/project configuration to reproduce this issue?
@jxnu-liguobin can you help us minimise this? or at least provide us the dependencies/project configuration to reproduce this issue?
My repo is here. You can see the details from Github Action. https://github.com/bitlap/intellij-sbt-dependency-analyzer/tree/rewrite-3.4.1-syntax
I did not reproduce it on Mac OSX, which is why I submitted an ISSUE.
We'll still need this minimised, rather than the whole repo... we'd welcome help, it may take time before someone on the maintenance team has time to dive into this.
I'm guessing the Kotlin plugin is where the imports from the snippet come from... https://index.scala-lang.org/bitlap/kotlin-plugin
It seems that issue originates due to specific classpath entries added by the SbtIdeaPlugin and IntellijPlugins
// build.sbt
lazy val `sbt-dependency-analyzer` = (project in file("."))
.enablePlugins(SbtIdeaPlugin)
.settings(
scalaVersion := "3.4.1",
intellijPlugins ++= Seq("com.intellij.java", "com.intellij.java-i18n", "org.intellij.scala").map(_.toPlugin),
)
// project/plugins.sbt
addSbtPlugin("org.jetbrains" % "sbt-idea-plugin" % "3.26.2")
// src/main/scala/AnalyzerException.scala
sealed abstract class AnalyzerException(msg: String) extends RuntimeException(msg)
final case class AnalyzerCommandNotFoundException(msg: String) extends AnalyzerException(msg)
I'm not yet sure what exactly causes that, but I can confirm it's 3.6.0-RC1-bin-20240708-0e36424-NIGHTLY
I suggest to backport https://github.com/scala/scala3/pull/20493 to 3.5.0-RC4 as the issue probably originates when trying to enter some fallback path where it tries to use non-existing caps
object declared in the compiler definitions - it expects type which does not exist, it should refer to class instead
I'm upgrading from 3.3.3 to 3.4.1 and after rewriting syntax I try to commit the code but the CI complained.
Compiler version
3.4.1
Minimized code
According to the logs, dotty crashes at
AnalyzerException
, which is just a simple code.It's ok on my Mac OSX:
Output (click arrow to expand)