From 50af2c8871bef97e3e3705c36192c519c6fdedc9 Mon Sep 17 00:00:00 2001 From: Tomasz Godzik Date: Tue, 29 Oct 2024 23:20:27 +0100 Subject: [PATCH] bugfix: Publish interfaces and mtagsShared for JDK 8 This is needed by the Scala 3 compiler. --- build.sbt | 10 +++++++++- .../main/java/scala/meta/pc/PresentationCompiler.java | 4 ++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/build.sbt b/build.sbt index 3f486fdfbff..537a702e05a 100644 --- a/build.sbt +++ b/build.sbt @@ -214,7 +214,6 @@ publish / skip := true lazy val interfaces = project .in(file("mtags-interfaces")) - .settings(sharedJavacOptions) .settings( moduleName := "mtags-interfaces", autoScalaLibrary := false, @@ -226,6 +225,7 @@ lazy val interfaces = project libraryDependencies ++= List( V.lsp4j ), + javacOptions := Seq("--release", "8"), crossVersion := CrossVersion.disabled, Compile / doc / javacOptions ++= List( "-tag", @@ -241,6 +241,14 @@ lazy val mtagsShared = project crossTarget := target.value / s"scala-${scalaVersion.value}", // Dotty depends on Scala 2.13 for compatibility guarantees for from-source compilation. crossScalaVersions := V.supportedScalaVersions, + scalacOptions --= crossSetting( + scalaVersion.value, + if213 = List("-target:17"), + ), + scalacOptions ++= crossSetting( + scalaVersion.value, + if213 = List("-target:8"), + ), crossVersion := CrossVersion.full, Compile / packageSrc / publishArtifact := true, Compile / scalacOptions ++= { diff --git a/mtags-interfaces/src/main/java/scala/meta/pc/PresentationCompiler.java b/mtags-interfaces/src/main/java/scala/meta/pc/PresentationCompiler.java index 186397bbe07..efeb8bbf737 100644 --- a/mtags-interfaces/src/main/java/scala/meta/pc/PresentationCompiler.java +++ b/mtags-interfaces/src/main/java/scala/meta/pc/PresentationCompiler.java @@ -114,10 +114,10 @@ public CompletableFuture> references(References /** * Execute the given code action - * + * @since 1.4.1 * @deprecated Please use the code action with optional data. */ - @Deprecated(since = "1.4.1") + @Deprecated public CompletableFuture> codeAction(OffsetParams params, String codeActionId, Object codeActionPayload) { return codeAction(params, codeActionId, Optional.of(codeActionPayload));