diff --git a/metals/src/main/scala/scala/meta/internal/builds/BuildTools.scala b/metals/src/main/scala/scala/meta/internal/builds/BuildTools.scala index bc36c2fdc34..ee4c8759cc3 100644 --- a/metals/src/main/scala/scala/meta/internal/builds/BuildTools.scala +++ b/metals/src/main/scala/scala/meta/internal/builds/BuildTools.scala @@ -114,10 +114,6 @@ final class BuildTools( _.resolve("pom.xml").isFile ) def isMaven: Boolean = mavenProject.isDefined - def pantsProject: Option[AbsolutePath] = searchForBuildTool( - _.resolve("pants.ini").isFile - ) - def isPants: Boolean = pantsProject.isDefined def bazelProject: Option[AbsolutePath] = searchForBuildTool( _.resolve("WORKSPACE").isFile ) @@ -190,7 +186,6 @@ final class BuildTools( if (isMill) buf += "Mill" if (isGradle) buf += "Gradle" if (isMaven) buf += "Maven" - if (isPants) buf += "Pants" if (isBazel) buf += "Bazel" buf.result() } diff --git a/metals/src/main/scala/scala/meta/internal/builds/Digest.scala b/metals/src/main/scala/scala/meta/internal/builds/Digest.scala index bb2fc11a5b7..1808a837f45 100644 --- a/metals/src/main/scala/scala/meta/internal/builds/Digest.scala +++ b/metals/src/main/scala/scala/meta/internal/builds/Digest.scala @@ -101,8 +101,6 @@ object Digest { digestGeneralJvm(path, digest) } else if (isXml) { digestXml(path, digest) - } else if (path.isBuild) { - digestFileBytes(path, digest) } else { true } diff --git a/metals/src/main/scala/scala/meta/internal/metals/MetalsLspService.scala b/metals/src/main/scala/scala/meta/internal/metals/MetalsLspService.scala index 73e3cee60e6..df96d6b5986 100644 --- a/metals/src/main/scala/scala/meta/internal/metals/MetalsLspService.scala +++ b/metals/src/main/scala/scala/meta/internal/metals/MetalsLspService.scala @@ -1322,7 +1322,7 @@ class MetalsLspService( */ private def fileWatchFilter(path: Path): Boolean = { val abs = AbsolutePath(path) - abs.isScalaOrJava || abs.isSemanticdb || abs.isBuild || + abs.isScalaOrJava || abs.isSemanticdb || abs.isInBspDirectory(folder) } @@ -1366,8 +1366,6 @@ class MetalsLspService( semanticDBIndexer.onOverflow(semanticdbPath) } }.asJava - } else if (path.isBuild) { - onBuildChanged(List(path)).asJava } else { CompletableFuture.completedFuture(()) } diff --git a/mtags/src/main/scala/scala/meta/internal/mtags/ScalametaCommonEnrichments.scala b/mtags/src/main/scala/scala/meta/internal/mtags/ScalametaCommonEnrichments.scala index af5ee1d9eec..0ae0c88e8a2 100644 --- a/mtags/src/main/scala/scala/meta/internal/mtags/ScalametaCommonEnrichments.scala +++ b/mtags/src/main/scala/scala/meta/internal/mtags/ScalametaCommonEnrichments.scala @@ -344,8 +344,6 @@ trait ScalametaCommonEnrichments extends CommonMtagsEnrichments { case None => path.toURI.toString } - def isBuild: Boolean = - path.filename.startsWith("BUILD") def isInBspDirectory(workspace: AbsolutePath): Boolean = path.toNIO.startsWith(workspace.resolve(".bsp").toNIO) diff --git a/project/TestGroups.scala b/project/TestGroups.scala index 8419cb3e683..c9ca1eea37b 100644 --- a/project/TestGroups.scala +++ b/project/TestGroups.scala @@ -24,8 +24,7 @@ object TestGroups { "tests.MtagsSuite", "tests.ChosenBuildServerSuite", "tests.SemanticdbSuite", "tests.digest.MillDigestSuite", "tests.DocumentSymbolSuite", "tests.FoldingRangeSuite", - "tests.pants.PantsSuite", "tests.JavadocSuite", - "tests.MtagsEnrichmentsSuite", "tests.FuzzySuite", + "tests.JavadocSuite", "tests.MtagsEnrichmentsSuite", "tests.CreateDirectoriesSuite", "tests.SbtOptsSuite", "tests.LineListenerSuite", "tests.debug.MessageIdAdapterSuite", "tests.MetalsEnrichmentsSuite", "tests.DefinitionDirectorySuite", @@ -36,7 +35,7 @@ object TestGroups { "tests.codeactions.RewriteBracesParensLspSuite", "tests.debug.CompletionDapSuite", "tests.debug.EvaluationDapSuite", "tests.FindTextInDependencyJarsSuite", "tests.TestSuitesProviderSuite", - "tests.classFinder.FindAllClassesSuite", + "tests.classFinder.FindAllClassesSuite", "tests.FuzzySuite", "tests.codeactions.ExtractValueLspSuite", "tests.clients.CommandSuite", "tests.JavaInteractiveSemanticdbSuite", "tests.SemVerSuite", "tests.codeactions.CompanionObjectSuite", @@ -55,9 +54,8 @@ object TestGroups { "tests.codeactions.StringActionsLspSuite", "tests.RangeFormattingSuite", "tests.CodeLensesLspSuite", "tests.DefinitionLspSuite", "tests.RelatedSuite", "tests.DocumentHighlightLspSuite", - "tests.NewProjectLspSuite", + "tests.NewProjectLspSuite", "tests.WorkspaceSymbolLspSuite", "tests.codeactions.ImplementAbstractMembersLspSuite", - "tests.WorkspaceSymbolLspSuite", "tests.RangeFormattingWhenSelectingSuite", "tests.AddPackageLspSuite", "tests.WarningsLspSuite", "tests.BspSwitchLspSuite", "tests.codeactions.CreateNewSymbolLspSuite", @@ -70,13 +68,12 @@ object TestGroups { "tests.JdkSourcesSuite", "tests.digest.SbtDigestSuite", "tests.digest.MavenDigestSuite", "tests.UserConfigurationSuite", "tests.digest.GradleDigestSuite", "tests.DetectionSuite", - "tests.digest.PantsDigestSuite", "tests.NewFileTemplateSuite", - "tests.ScalaVersionsSuite", "tests.HttpServerSuite", - "tests.BatchedFunctionSuite", "tests.SbtVersionSuite", - "tests.MessagesSuite", "tests.pants.PantsGlobsSuite", - "tests.SelectBspServerSuite", "tests.InverseDependenciesSuite", - "tests.pantsbuild.PantsProjectNameSuite", "tests.TrigramSubstringsSuite", - "tests.TimerSuite", "tests.FoldingRangesSuite", + "tests.NewFileTemplateSuite", "tests.ScalaVersionsSuite", + "tests.HttpServerSuite", "tests.BatchedFunctionSuite", + "tests.SbtVersionSuite", "tests.MessagesSuite", + "tests.TrigramSubstringsSuite", "tests.SelectBspServerSuite", + "tests.InverseDependenciesSuite", "tests.TimerSuite", + "tests.FoldingRangesSuite", "tests.SelectionRangeLspSuite", "tests.rangeFormatting.MultilineStringRangeFormattingWhenPastingSuite", "tests.codeactions.ConvertPatternMatchLspSuite", "tests.ScalaToplevelLibrarySuite", @@ -84,7 +81,6 @@ object TestGroups { "tests.rangeFormatting.MultilineStringRangeFormattingWhenSelectingSuite", "tests.rangeFormatting.IndentWhenPastingSuite", "tests.DebugDiscoverySuite", "tests.SemanticdbScala2Suite", - "tests.SelectionRangeLspSuite", "tests.codeactions.OrganizeImportsLspSuite", "tests.codeactions.InsertInferredTypeLspSuite", "tests.FoldingRangeScala2Suite", "tests.SystemProcessSuite",