Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Remove Pants specific checks #5968

Merged
merged 1 commit into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down Expand Up @@ -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()
}
Expand Down
2 changes: 0 additions & 2 deletions metals/src/main/scala/scala/meta/internal/builds/Digest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ object Digest {
digestGeneralJvm(path, digest)
} else if (isXml) {
digestXml(path, digest)
} else if (path.isBuild) {
digestFileBytes(path, digest)
} else {
true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down Expand Up @@ -1366,8 +1366,6 @@ class MetalsLspService(
semanticDBIndexer.onOverflow(semanticdbPath)
}
}.asJava
} else if (path.isBuild) {
onBuildChanged(List(path)).asJava
} else {
CompletableFuture.completedFuture(())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
22 changes: 9 additions & 13 deletions project/TestGroups.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -70,21 +68,19 @@ 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",
"tests.decorations.SyntheticHoverLspSuite",
"tests.rangeFormatting.MultilineStringRangeFormattingWhenSelectingSuite",
"tests.rangeFormatting.IndentWhenPastingSuite",
"tests.DebugDiscoverySuite", "tests.SemanticdbScala2Suite",
"tests.SelectionRangeLspSuite",
"tests.codeactions.OrganizeImportsLspSuite",
"tests.codeactions.InsertInferredTypeLspSuite",
"tests.FoldingRangeScala2Suite", "tests.SystemProcessSuite",
Expand Down