Skip to content

Commit

Permalink
core: reduce amount of semanticdb dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
bjaglin committed Aug 24, 2024
1 parent c6d7411 commit 5ae2034
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
14 changes: 10 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ lazy val core = projectMatrix
googleDiff,
metaconfig,
scalametaFor3Use2_13,
semanticdbScalacCore,
semanticdbSharedFor3Use2_13,
collectionCompat
)
)
Expand All @@ -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")
Expand Down Expand Up @@ -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
)
Expand All @@ -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)

Expand Down
1 change: 1 addition & 0 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -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]

}

0 comments on commit 5ae2034

Please sign in to comment.