~jan0sch/smederee

Showing details for patch 6eafa5407480d49134469e6d515f8a82b6ede316.
2023-06-18 (Sun), 8:37 AM - Jens Grassel - 6eafa5407480d49134469e6d515f8a82b6ede316

Add semanticdb compiler plugin explicitly.

- add semanticdb compiler plugin
- enable semanticdb via `Global` directive

This fixes potential issues with the semanticdb version bundled with the
metals language server not being released for recent scala versions for the
price of keeping semanticdb up to date ourselfs.
Summary of changes
2 files modified with 6 lines added and 0 lines removed
  • build.sbt with 3 added and 0 removed lines
  • project/plugins.sbt with 3 added and 0 removed lines
diff -rN -u old-smederee/build.sbt new-smederee/build.sbt
--- old-smederee/build.sbt	2025-01-16 02:59:52.343434953 +0000
+++ new-smederee/build.sbt	2025-01-16 02:59:52.347434961 +0000
@@ -12,6 +12,9 @@
 addCommandAlias("check", "Compile/scalafix --check; Test/scalafix --check; scalafmtCheckAll")
 addCommandAlias("fix", "Compile/scalafix; Test/scalafix; headerCreateAll; scalafmtSbt; scalafmtAll")
 
+// Enable the semanticdb compiler plugin needed by the metals language server.
+Global / semanticdbEnabled := true
+
 inThisBuild(
   Seq(
     scalaVersion := "3.3.0",
diff -rN -u old-smederee/project/plugins.sbt new-smederee/project/plugins.sbt
--- old-smederee/project/plugins.sbt	2025-01-16 02:59:52.343434953 +0000
+++ new-smederee/project/plugins.sbt	2025-01-16 02:59:52.347434961 +0000
@@ -1,3 +1,6 @@
+// Compiler plugins
+addCompilerPlugin("org.scalameta" % "semanticdb-scalac" % "4.7.8" cross CrossVersion.full)
+// Regular plugins
 addSbtPlugin("de.heikoseeberger" % "sbt-header"          % "5.9.0")
 addSbtPlugin("com.github.sbt"    % "sbt-native-packager" % "1.9.16")
 addSbtPlugin("io.spray"          % "sbt-revolver"        % "0.9.1")