diff --git a/build.sbt b/build.sbt index 6e91f5226..0a4c75cbb 100644 --- a/build.sbt +++ b/build.sbt @@ -74,7 +74,7 @@ lazy val core = projectMatrix googleDiff, metaconfig, scalametaFor3Use2_13, - semanticdbScalacCore, + semanticdbSharedFor3Use2_13, collectionCompat ) ) @@ -95,8 +95,7 @@ lazy val core3 = project metaconfig ) ++ Seq( scalametaFor3Use2_13, - // CrossVersion.for3Use2_13 would only lookup a binary version artifact, but this is published with full version - semanticdbScalacCore.cross(CrossVersion.constant(scala213)) + semanticdbSharedFor3Use2_13 ).map { mod => mod .exclude("com.lihaoyi", "sourcecode_2.13") @@ -149,6 +148,7 @@ lazy val reflect = projectMatrix moduleName := "scalafix-reflect", isFullCrossVersion, libraryDependencies ++= Seq( + semanticdbScalacCore, "org.scala-lang" % "scala-compiler" % scalaVersion.value, "org.scala-lang" % "scala-reflect" % scalaVersion.value ) @@ -165,8 +165,14 @@ lazy val reflect3 = project isFullCrossVersion, noPublishAndNoMima, scalaVersion := scala3LTS, - libraryDependencies += + libraryDependencies ++= Seq( + // CrossVersion.for3Use2_13 would only lookup a binary version artifact, but this is published with full version + semanticdbScalacCore + .cross(CrossVersion.constant(scala213)) + .exclude("com.lihaoyi", "sourcecode_2.13") + .exclude("org.scala-lang.modules", "scala-collection-compat_2.13"), "org.scala-lang" %% "scala3-compiler" % scalaVersion.value + ) ) .dependsOn(core3) diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 8e7d22ca2..edba8827c 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -41,6 +41,7 @@ object Dependencies { val scalatest = "org.scalatest" %% "scalatest" % scalatestV val munit = "org.scalameta" %% "munit" % munitV val semanticdbScalacCore = "org.scalameta" % "semanticdb-scalac-core" % scalametaV cross CrossVersion.full + val semanticdbSharedFor3Use2_13 = "org.scalameta" % "semanticdb-shared" % scalametaV cross CrossVersion.for3Use2_13 // scala-steward:off diff --git a/scalafix-core/src/main/scala/scala/meta/internal/symtab/SymbolTable.scala b/scalafix-core/src/main/scala/scala/meta/internal/symtab/SymbolTable.scala new file mode 100644 index 000000000..a52b6a630 --- /dev/null +++ b/scalafix-core/src/main/scala/scala/meta/internal/symtab/SymbolTable.scala @@ -0,0 +1,13 @@ +package scala.meta.internal.symtab + +import scala.meta.internal.semanticdb.SymbolInformation + +trait SymbolTable { + + /** + * Returns the SymbolInformation for the given symbol, or None if the symbol + * is missing. + */ + def info(symbol: String): Option[SymbolInformation] + +}