From d6645dab43845f3ab1e7a577719a812b082f6c14 Mon Sep 17 00:00:00 2001 From: Razvan Vacaru Date: Fri, 22 Jul 2022 19:43:57 +0200 Subject: [PATCH] Scalafix-core compiled in Scala 3 (#1629) --- build.sbt | 32 +++++++++---------- project/Dependencies.scala | 4 ++- project/ScalafixBuild.scala | 19 +++++++++-- .../scalafix/util/CompatSemanticdbType.scala | 9 ++++++ .../main/scala-3/scalafix/util/Compat.scala | 7 ++++ .../scalafix/util/CompatSemanticdbType.scala | 9 ++++++ .../internal/ScalametaInternals.scala | 1 + .../internal/config/MetaconfigOps.scala | 6 +++- .../scalafix/internal/diff/DiffDisable.scala | 1 + .../internal/patch/ImportPatchOps.scala | 2 ++ .../internal/patch/PatchInternals.scala | 1 + .../scalafix/internal/rule/RuleCtxImpl.scala | 1 + .../internal/util/PositionSyntax.scala | 1 + .../scala/scalafix/internal/util/Pretty.scala | 1 + .../scalafix/internal/util/PrettyType.scala | 13 +++++--- .../scalafix/internal/util/SuppressOps.scala | 1 + .../internal/v0/LegacyCodePrinter.scala | 1 + .../scalafix/internal/v0/LegacyRule.scala | 1 + .../internal/v1/SymtabFromProtobuf.scala | 1 + .../scala/scalafix/internal/v1/TreePos.scala | 2 +- .../scala/scalafix/internal/v1/package.scala | 4 ++- .../scala/scalafix/util/TokenClasses.scala | 1 + .../main/scala/scalafix/util/TokenList.scala | 1 + .../main/scala/scalafix/util/TokenOps.scala | 1 + .../src/main/scala/scalafix/v0/Database.scala | 1 + .../scala/scalafix/v1/SemanticDocument.scala | 1 + .../scala/scalafix/v1/SymbolInformation.scala | 1 + .../scala/scalafix/v1/SyntacticDocument.scala | 1 + 28 files changed, 98 insertions(+), 26 deletions(-) create mode 100644 scalafix-core/src/main/scala-2/scalafix/util/CompatSemanticdbType.scala create mode 100644 scalafix-core/src/main/scala-3/scalafix/util/Compat.scala create mode 100644 scalafix-core/src/main/scala-3/scalafix/util/CompatSemanticdbType.scala diff --git a/build.sbt b/build.sbt index e1e605760..8b13bbb11 100644 --- a/build.sbt +++ b/build.sbt @@ -5,7 +5,6 @@ inThisBuild( List( onLoadMessage := s"Welcome to scalafix ${version.value}", fork := true, - scalacOptions ++= List("-P:semanticdb:synthetics:on"), semanticdbEnabled := true, semanticdbVersion := scalametaV, scalafixScalaBinaryVersion := "2.13", @@ -64,18 +63,28 @@ lazy val core = projectMatrix .settings( moduleName := "scalafix-core", buildInfoSettingsForCore, - libraryDependencies ++= List( - scalameta, - googleDiff, - collectionCompat - ), + libraryDependencies += googleDiff, + libraryDependencies ++= { + if (isScala3.value) { + List( + scalameta + .exclude("com.lihaoyi", "sourcecode_2.13") + .exclude("org.scala-lang.modules", "scala-collection-compat_2.13") + ) + } else { + List( + scalameta, + collectionCompat + ) + } + }, libraryDependencies += { if (isScala211.value) metaconfigFor211 else metaconfig } ) .defaultAxes(VirtualAxis.jvm) - .jvmPlatform(buildScalaVersions, Seq(), p => p) + .jvmPlatform(buildScalaVersions :+ scala3, Seq(), p => p) .enablePlugins(BuildInfoPlugin) lazy val rules = projectMatrix @@ -144,9 +153,6 @@ lazy val testsShared = projectMatrix .in(file("scalafix-tests/shared")) .settings( noPublishAndNoMima, - scalacOptions --= (if (isScala3.value) - Seq("-P:semanticdb:synthetics:on") - else Nil), coverageEnabled := false ) .defaultAxes(VirtualAxis.jvm) @@ -157,9 +163,6 @@ lazy val testsInput = projectMatrix .in(file("scalafix-tests/input")) .settings( noPublishAndNoMima, - scalacOptions --= (if (isScala3.value) - Seq("-P:semanticdb:synthetics:on") - else Nil), scalacOptions ~= (_.filterNot(_ == "-Yno-adapted-args")), scalacOptions ++= warnAdaptedArgs.value, // For NoAutoTupling scalacOptions ++= warnUnusedImports.value, // For RemoveUnused @@ -176,9 +179,6 @@ lazy val testsOutput = projectMatrix .in(file("scalafix-tests/output")) .settings( noPublishAndNoMima, - scalacOptions --= (if (scalaVersion.value.startsWith("3")) - Seq("-P:semanticdb:synthetics:on") - else Nil), scalacOptions --= warnUnusedImports.value, libraryDependencies ++= testsDependencies.value, coverageEnabled := false diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 77141a412..f537b2ad8 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -53,7 +53,9 @@ object Dependencies { val nailgunServer = "com.martiansoftware" % "nailgun-server" % nailgunV val scalaXml = "org.scala-lang.modules" %% "scala-xml" % scalaXmlV val scalaXml211 = "org.scala-lang.modules" %% "scala-xml" % scalaXml211V - val scalameta = "org.scalameta" %% "scalameta" % scalametaV + // https://github.com/scalameta/scalameta/issues/2485 + val scalameta = ("org.scalameta" %% "scalameta" % scalametaV) + .cross(CrossVersion.for3Use2_13) val scalametaTeskit = "org.scalameta" %% "testkit" % scalametaV val scalatest = "org.scalatest" %% "scalatest" % scalatestV val semanticdbScalacCore = "org.scalameta" % "semanticdb-scalac-core" % scalametaV cross CrossVersion.full diff --git a/project/ScalafixBuild.scala b/project/ScalafixBuild.scala index 8c8f295ce..acc81336a 100644 --- a/project/ScalafixBuild.scala +++ b/project/ScalafixBuild.scala @@ -88,6 +88,19 @@ object ScalafixBuild extends AutoPlugin with GhpagesKeys { ) ) + lazy val semanticdbSyntheticsCompilerOption = Def.setting( + if (!isScala3.value) + Seq("-P:semanticdb:synthetics:on") + else Nil + ) + + lazy val versionPolicyIntentionSetting = Def.setting( + if (!isScala3.value) + Compatibility.BinaryCompatible + else + Compatibility.None + ) + lazy val buildInfoSettingsForCore: Seq[Def.Setting[_]] = Seq( buildInfoKeys := Seq[BuildInfoKey]( name, @@ -130,6 +143,7 @@ object ScalafixBuild extends AutoPlugin with GhpagesKeys { }, commands += Command.command("ci-3") { s => "unit2_12Target3/test" :: + "core3/compile" :: s }, commands += Command.command("ci-213") { s => @@ -172,12 +186,13 @@ object ScalafixBuild extends AutoPlugin with GhpagesKeys { versionPolicyIgnored += "com.lihaoyi" %% "pprint", versionPolicyIgnoredInternalDependencyVersions := Some("^\\d+\\.\\d+\\.\\d+\\+\\d+".r), - versionScheme := Some("early-semver"), - versionPolicyIntention := Compatibility.BinaryCompatible + versionScheme := Some("early-semver") ) override def projectSettings: Seq[Def.Setting[_]] = List( + versionPolicyIntention := versionPolicyIntentionSetting.value, scalacOptions ++= compilerOptions.value, + scalacOptions ++= semanticdbSyntheticsCompilerOption.value, Compile / console / scalacOptions := compilerOptions.value :+ "-Yrepl-class-based", Compile / doc / scalacOptions ++= scaladocOptions, diff --git a/scalafix-core/src/main/scala-2/scalafix/util/CompatSemanticdbType.scala b/scalafix-core/src/main/scala-2/scalafix/util/CompatSemanticdbType.scala new file mode 100644 index 000000000..968171fc8 --- /dev/null +++ b/scalafix-core/src/main/scala-2/scalafix/util/CompatSemanticdbType.scala @@ -0,0 +1,9 @@ +package scalafix.util + +import scala.meta.internal.semanticdb.Scope +import scala.meta.internal.semanticdb.Type + +object CompatSemanticdbType { + type SemanticdbType = Type + type SemanticdbScope = Scope +} diff --git a/scalafix-core/src/main/scala-3/scalafix/util/Compat.scala b/scalafix-core/src/main/scala-3/scalafix/util/Compat.scala new file mode 100644 index 000000000..0c5d8fbc0 --- /dev/null +++ b/scalafix-core/src/main/scala-3/scalafix/util/Compat.scala @@ -0,0 +1,7 @@ +package scalafix.util + +object Compat { + type View[T] = collection.View[T] + type SeqView[T] = collection.SeqView[T] + +} diff --git a/scalafix-core/src/main/scala-3/scalafix/util/CompatSemanticdbType.scala b/scalafix-core/src/main/scala-3/scalafix/util/CompatSemanticdbType.scala new file mode 100644 index 000000000..261656afa --- /dev/null +++ b/scalafix-core/src/main/scala-3/scalafix/util/CompatSemanticdbType.scala @@ -0,0 +1,9 @@ +package scalafix.util + +import scala.meta.internal.semanticdb.XtensionSemanticdbType +import scala.meta.internal.semanticdb.XtensionSemanticdbScope + +object CompatSemanticdbType { + type SemanticdbType = XtensionSemanticdbType + type SemanticdbScope = XtensionSemanticdbScope +} diff --git a/scalafix-core/src/main/scala/org/langmeta/internal/ScalametaInternals.scala b/scalafix-core/src/main/scala/org/langmeta/internal/ScalametaInternals.scala index bf07c44a6..d528c7cd2 100644 --- a/scalafix-core/src/main/scala/org/langmeta/internal/ScalametaInternals.scala +++ b/scalafix-core/src/main/scala/org/langmeta/internal/ScalametaInternals.scala @@ -1,6 +1,7 @@ package scala.meta.internal import scala.meta._ +import scala.meta.internal.inputs.XtensionInputSyntaxStructure import scala.meta.internal.semanticdb.Scala.Descriptor import scala.meta.internal.semanticdb.Scala.DescriptorParser import scala.meta.internal.trees.Origin diff --git a/scalafix-core/src/main/scala/scalafix/internal/config/MetaconfigOps.scala b/scalafix-core/src/main/scala/scalafix/internal/config/MetaconfigOps.scala index 3f62891c6..48cca0dd2 100644 --- a/scalafix-core/src/main/scala/scalafix/internal/config/MetaconfigOps.scala +++ b/scalafix-core/src/main/scala/scalafix/internal/config/MetaconfigOps.scala @@ -2,6 +2,8 @@ package scalafix.internal.config import scala.{meta => m} +import scala.meta.internal.inputs.XtensionInputSyntaxStructure + import metaconfig.Conf import metaconfig.ConfDecoder import metaconfig.ConfError @@ -58,7 +60,9 @@ object MetaconfigOps { def getField[T: ConfDecoder](e: sourcecode.Text[T]): Configured[T] = conf.getOrElse(e.source)(e.value) } - implicit class XtensionConfiguredCompanionScalafix(`_`: Configured.type) { + implicit class XtensionConfiguredCompanionScalafix( + configured: Configured.type + ) { def fromEither[T](either: Either[String, T]): Configured[T] = either.fold(ConfError.message(_).notOk, Configured.ok) } diff --git a/scalafix-core/src/main/scala/scalafix/internal/diff/DiffDisable.scala b/scalafix-core/src/main/scala/scalafix/internal/diff/DiffDisable.scala index 94a0ac990..dcea6b49e 100644 --- a/scalafix-core/src/main/scala/scalafix/internal/diff/DiffDisable.scala +++ b/scalafix-core/src/main/scala/scalafix/internal/diff/DiffDisable.scala @@ -4,6 +4,7 @@ import scala.collection.mutable.StringBuilder import scala.meta.Position import scala.meta.inputs.Input +import scala.meta.internal.inputs.XtensionInputSyntaxStructure import scalafix.internal.util.IntervalSet diff --git a/scalafix-core/src/main/scala/scalafix/internal/patch/ImportPatchOps.scala b/scalafix-core/src/main/scala/scalafix/internal/patch/ImportPatchOps.scala index dd8cbda82..f4248dcb2 100644 --- a/scalafix-core/src/main/scala/scalafix/internal/patch/ImportPatchOps.scala +++ b/scalafix-core/src/main/scala/scalafix/internal/patch/ImportPatchOps.scala @@ -5,6 +5,8 @@ import scala.collection.mutable import scala.meta._ +import scalafix.XtensionOptionPatch +import scalafix.XtensionSeqPatch import scalafix.internal.util.SymbolOps import scalafix.patch.Patch import scalafix.patch.Patch.internal._ diff --git a/scalafix-core/src/main/scala/scalafix/internal/patch/PatchInternals.scala b/scalafix-core/src/main/scala/scalafix/internal/patch/PatchInternals.scala index 9c120eeb6..735191a6f 100644 --- a/scalafix-core/src/main/scala/scalafix/internal/patch/PatchInternals.scala +++ b/scalafix-core/src/main/scala/scalafix/internal/patch/PatchInternals.scala @@ -4,6 +4,7 @@ import scala.util.control.TailCalls._ import scala.meta._ +import scalafix.XtensionSeqPatch import scalafix.internal.diff.DiffUtils import scalafix.internal.util.Failure import scalafix.internal.util.SuppressOps diff --git a/scalafix-core/src/main/scala/scalafix/internal/rule/RuleCtxImpl.scala b/scalafix-core/src/main/scala/scalafix/internal/rule/RuleCtxImpl.scala index 9a9ebe6a9..3e5746379 100644 --- a/scalafix-core/src/main/scala/scalafix/internal/rule/RuleCtxImpl.scala +++ b/scalafix-core/src/main/scala/scalafix/internal/rule/RuleCtxImpl.scala @@ -2,6 +2,7 @@ package scalafix.internal.rule import scala.meta._ import scala.meta.contrib.AssociatedComments +import scala.meta.internal.inputs.XtensionInputSyntaxStructure import scala.meta.tokens.Tokens import org.scalameta.FileLine diff --git a/scalafix-core/src/main/scala/scalafix/internal/util/PositionSyntax.scala b/scalafix-core/src/main/scala/scalafix/internal/util/PositionSyntax.scala index 93f473eff..3ba8b3ac7 100644 --- a/scalafix-core/src/main/scala/scalafix/internal/util/PositionSyntax.scala +++ b/scalafix-core/src/main/scala/scalafix/internal/util/PositionSyntax.scala @@ -2,6 +2,7 @@ package scalafix.internal.util import scala.meta._ import scala.meta.internal.ScalametaInternals +import scala.meta.internal.inputs.XtensionInputSyntaxStructure import scala.meta.internal.{semanticdb => s} object PositionSyntax { diff --git a/scalafix-core/src/main/scala/scalafix/internal/util/Pretty.scala b/scalafix-core/src/main/scala/scalafix/internal/util/Pretty.scala index e6b9a1ac0..ac2c5131a 100644 --- a/scalafix-core/src/main/scala/scalafix/internal/util/Pretty.scala +++ b/scalafix-core/src/main/scala/scalafix/internal/util/Pretty.scala @@ -1,6 +1,7 @@ package scalafix.internal.util import scala.meta.Lit +import scala.meta.XtensionSyntax import org.typelevel.paiges.Doc import scalafix.internal.v1.Types diff --git a/scalafix-core/src/main/scala/scalafix/internal/util/PrettyType.scala b/scalafix-core/src/main/scala/scalafix/internal/util/PrettyType.scala index 592a4799e..8b1836513 100644 --- a/scalafix-core/src/main/scala/scalafix/internal/util/PrettyType.scala +++ b/scalafix-core/src/main/scala/scalafix/internal/util/PrettyType.scala @@ -11,6 +11,7 @@ import scala.meta.internal.semanticdb.SymbolInformation.{Property => p} import scala.meta.internal.symtab.SymbolTable import scala.meta.internal.{semanticdb => s} +import scalafix.util.CompatSemanticdbType._ import scalapb.GeneratedMessage case class PrettyResult[T <: Tree](tree: T, imports: List[String]) @@ -172,7 +173,7 @@ class PrettyType private ( Nil, Pat.Var(Term.Name(info.displayName)) :: Nil, None, - q"???" + Term.Name("???") ) case k.FIELD => if (info.is(p.FINAL)) { @@ -192,7 +193,11 @@ class PrettyType private ( toTermRef(info) case _ => info.signature match { - case s.MethodSignature(Some(tparams), paramss, returnType) => + case s.MethodSignature( + Some(tparams), + paramss: Seq[SemanticdbScope], + returnType + ) => val ret = unwrapRepeatedType(returnType) if (info.isVal) { Decl.Val( @@ -343,7 +348,7 @@ class PrettyType private ( case _ => fail(info) } - case s.TypeSignature(Some(typeParameters), lo, hi) => + case s.TypeSignature(Some(typeParameters), lo: SemanticdbType, hi) => if (lo.nonEmpty && lo == hi) { Defn.Type( toMods(info), @@ -621,7 +626,7 @@ class PrettyType private ( Type.With(accum, toType(next)) } case s.UniversalType(Some(typeParameters), underlying) => - val universalName = t"T" + val universalName = Type.Name("T") withHardlinks(typeParameters.hardlinks) { () => Type.Project( Type.Refine( diff --git a/scalafix-core/src/main/scala/scalafix/internal/util/SuppressOps.scala b/scalafix-core/src/main/scala/scalafix/internal/util/SuppressOps.scala index d71a3da5a..ab7b78fca 100644 --- a/scalafix-core/src/main/scala/scalafix/internal/util/SuppressOps.scala +++ b/scalafix-core/src/main/scala/scalafix/internal/util/SuppressOps.scala @@ -6,6 +6,7 @@ import scala.meta.inputs.Position import scala.meta.tokens.Token import scala.meta.tokens.Tokens +import scalafix.XtensionSeqPatch import scalafix.patch.Patch object SuppressOps { diff --git a/scalafix-core/src/main/scala/scalafix/internal/v0/LegacyCodePrinter.scala b/scalafix-core/src/main/scala/scalafix/internal/v0/LegacyCodePrinter.scala index 31c5960dd..42c884d4b 100644 --- a/scalafix-core/src/main/scala/scalafix/internal/v0/LegacyCodePrinter.scala +++ b/scalafix-core/src/main/scala/scalafix/internal/v0/LegacyCodePrinter.scala @@ -6,6 +6,7 @@ import scala.meta.inputs.Input import scala.meta.inputs.Position import scala.meta.internal.ScalametaInternals import scala.meta.internal.semanticdb.Scala._ +import scala.meta.internal.semanticdb.XtensionSemanticdbScope import scala.meta.internal.{semanticdb => s} import scalafix.v0 diff --git a/scalafix-core/src/main/scala/scalafix/internal/v0/LegacyRule.scala b/scalafix-core/src/main/scala/scalafix/internal/v0/LegacyRule.scala index 90ab12296..ef8d5d4d4 100644 --- a/scalafix-core/src/main/scala/scalafix/internal/v0/LegacyRule.scala +++ b/scalafix-core/src/main/scala/scalafix/internal/v0/LegacyRule.scala @@ -1,6 +1,7 @@ package scalafix.internal.v0 import metaconfig.Conf import metaconfig.Configured +import scalafix.XtensionSeqPatch import scalafix.patch.Patch import scalafix.rule.RuleCtx import scalafix.util.SemanticdbIndex diff --git a/scalafix-core/src/main/scala/scalafix/internal/v1/SymtabFromProtobuf.scala b/scalafix-core/src/main/scala/scalafix/internal/v1/SymtabFromProtobuf.scala index ad6c727db..9f69ce7b6 100644 --- a/scalafix-core/src/main/scala/scalafix/internal/v1/SymtabFromProtobuf.scala +++ b/scalafix-core/src/main/scala/scalafix/internal/v1/SymtabFromProtobuf.scala @@ -1,5 +1,6 @@ package scalafix.internal.v1 +import scala.meta.internal.semanticdb.XtensionSemanticdbScope import scala.meta.internal.{semanticdb => s} import scalafix.v1._ diff --git a/scalafix-core/src/main/scala/scalafix/internal/v1/TreePos.scala b/scalafix-core/src/main/scala/scalafix/internal/v1/TreePos.scala index cb4525774..7a7811476 100644 --- a/scalafix-core/src/main/scala/scalafix/internal/v1/TreePos.scala +++ b/scalafix-core/src/main/scala/scalafix/internal/v1/TreePos.scala @@ -68,6 +68,6 @@ object TreePos { case Importer(_, i :: Nil) => symbolImpl(i) case t: Init => symbolImpl(t.tpe) case t: Mod.Annot => symbolImpl(t.init) - case _ => tree.pos + case _ => $conforms(tree.pos) } } diff --git a/scalafix-core/src/main/scala/scalafix/internal/v1/package.scala b/scalafix-core/src/main/scala/scalafix/internal/v1/package.scala index 6360f607a..49fc5ada9 100644 --- a/scalafix-core/src/main/scala/scalafix/internal/v1/package.scala +++ b/scalafix-core/src/main/scala/scalafix/internal/v1/package.scala @@ -31,7 +31,9 @@ package object v1 { } } - implicit class XtensionTextDocumentsCompanionFix(`_`: s.TextDocuments.type) { + implicit class XtensionTextDocumentsCompanionFix( + sdocType: s.TextDocuments.type + ) { def parseFromFile(file: AbsolutePath): s.TextDocuments = { val in = Files.newInputStream(file.toNIO) val sdocs = diff --git a/scalafix-core/src/main/scala/scalafix/util/TokenClasses.scala b/scalafix-core/src/main/scala/scalafix/util/TokenClasses.scala index 167eef168..191eb96b5 100644 --- a/scalafix-core/src/main/scala/scalafix/util/TokenClasses.scala +++ b/scalafix-core/src/main/scala/scalafix/util/TokenClasses.scala @@ -1,6 +1,7 @@ package scalafix.util import scala.meta.classifiers.Classifier +import scala.meta.classifiers.XtensionClassifiable import scala.meta.tokens.Token import scala.meta.tokens.Token._ diff --git a/scalafix-core/src/main/scala/scalafix/util/TokenList.scala b/scalafix-core/src/main/scala/scalafix/util/TokenList.scala index c3a8eedcd..a87e85230 100644 --- a/scalafix-core/src/main/scala/scalafix/util/TokenList.scala +++ b/scalafix-core/src/main/scala/scalafix/util/TokenList.scala @@ -1,5 +1,6 @@ package scalafix.util +import scala.meta.XtensionClassifiable import scala.meta.tokens.Token import scala.meta.tokens.Tokens diff --git a/scalafix-core/src/main/scala/scalafix/util/TokenOps.scala b/scalafix-core/src/main/scala/scalafix/util/TokenOps.scala index 851bdc97b..9dc09e8f6 100644 --- a/scalafix-core/src/main/scala/scalafix/util/TokenOps.scala +++ b/scalafix-core/src/main/scala/scalafix/util/TokenOps.scala @@ -1,5 +1,6 @@ package scalafix.util +import scala.meta.XtensionSyntax import scala.meta.tokens.Token object TokenOps { diff --git a/scalafix-core/src/main/scala/scalafix/v0/Database.scala b/scalafix-core/src/main/scala/scalafix/v0/Database.scala index 2afe74ade..9ec6090e3 100644 --- a/scalafix-core/src/main/scala/scalafix/v0/Database.scala +++ b/scalafix-core/src/main/scala/scalafix/v0/Database.scala @@ -1,5 +1,6 @@ package scalafix.v0 +import scala.meta.internal.inputs.XtensionInputSyntaxStructure import scala.meta.internal.io.PathIO final case class Database(documents: Seq[Document]) { diff --git a/scalafix-core/src/main/scala/scalafix/v1/SemanticDocument.scala b/scalafix-core/src/main/scala/scalafix/v1/SemanticDocument.scala index 20cd40c54..935991356 100644 --- a/scalafix-core/src/main/scala/scalafix/v1/SemanticDocument.scala +++ b/scalafix-core/src/main/scala/scalafix/v1/SemanticDocument.scala @@ -2,6 +2,7 @@ package scalafix.v1 import scala.meta._ import scala.meta.contrib.AssociatedComments +import scala.meta.internal.inputs.XtensionInputSyntaxStructure import scala.meta.internal.symtab.SymbolTable import scala.meta.internal.{semanticdb => s} import scala.meta.io.RelativePath diff --git a/scalafix-core/src/main/scala/scalafix/v1/SymbolInformation.scala b/scalafix-core/src/main/scala/scalafix/v1/SymbolInformation.scala index 573093586..38665f026 100644 --- a/scalafix-core/src/main/scala/scalafix/v1/SymbolInformation.scala +++ b/scalafix-core/src/main/scala/scalafix/v1/SymbolInformation.scala @@ -1,6 +1,7 @@ package scalafix.v1 import scala.meta.internal.metap.PrinterSymtab +import scala.meta.internal.semanticdb.XtensionSemanticdbSymbolInformation import scala.meta.internal.{semanticdb => s} import scala.meta.metap.Format diff --git a/scalafix-core/src/main/scala/scalafix/v1/SyntacticDocument.scala b/scalafix-core/src/main/scala/scalafix/v1/SyntacticDocument.scala index 992c6f6cb..8b5cef97d 100644 --- a/scalafix-core/src/main/scala/scalafix/v1/SyntacticDocument.scala +++ b/scalafix-core/src/main/scala/scalafix/v1/SyntacticDocument.scala @@ -6,6 +6,7 @@ import scala.meta.Source import scala.meta.Tokens import scala.meta.Tree import scala.meta.contrib.AssociatedComments +import scala.meta.internal.inputs.XtensionInputSyntaxStructure import scala.meta.parsers.Parsed import scalafix.internal.config.ScalaVersion