Skip to content

Commit

Permalink
bsp4j: 2.0.0-M6 → 2.1.0-M5 (#1358)
Browse files Browse the repository at this point in the history
bsp4j:2.0.0-M6 depends on com.google.code.gson:gson:2.8.2 that has a
known vulnerability:

- https://nvd.nist.gov/vuln/detail/CVE-2022-25647 (High: 7.5 CVSS)

bsp4j:2.1.0-M4 depends on com.google.code.gson:gson:2.9.1 that is not
affected by CVE-2022-25647

Co-authored-by: Fabián Heredia Montiel <[email protected]>
  • Loading branch information
fabianhjr-dealengine and fabianhjr-dealengine authored Jul 18, 2023
1 parent ab5f8a2 commit 2dacc9e
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ class AmmoniteBuildServer(
clientOpt = Some(client)
}


def buildInitialize(params: InitializeBuildParams): CompletableFuture[InitializeBuildResult] =
nonBlocking {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,33 @@ import ch.epfl.scala.bsp4j._
import scala.collection.JavaConverters._

private[script] trait DummyBuildServerImplems extends BuildServer with ScalaBuildServer {
override def buildTargetDependencyModules(dmp: DependencyModulesParams): CompletableFuture[DependencyModulesResult] =
CompletableFuture.completedFuture(new DependencyModulesResult(List.empty.asJava))

def buildTargetResources(params: ResourcesParams): CompletableFuture[ResourcesResult] = {
override def buildTargetOutputPaths(opp: OutputPathsParams): CompletableFuture[OutputPathsResult] =
CompletableFuture.completedFuture(new OutputPathsResult(List.empty.asJava))

override def buildTargetResources(params: ResourcesParams): CompletableFuture[ResourcesResult] = {
val items = params.getTargets.asScala.toList.map { target =>
new ResourcesItem(target, List.empty[String].asJava)
}
val result = new ResourcesResult(items.asJava)
CompletableFuture.completedFuture(result)
}

def buildTargetRun(params: RunParams): CompletableFuture[RunResult] = {
override def buildTargetRun(params: RunParams): CompletableFuture[RunResult] = {
val result = new RunResult(StatusCode.ERROR)
result.setOriginId(params.getOriginId)
CompletableFuture.completedFuture(result)
}
def buildTargetTest(params: TestParams): CompletableFuture[TestResult] = {

override def buildTargetTest(params: TestParams): CompletableFuture[TestResult] = {
val result = new TestResult(StatusCode.ERROR)
result.setOriginId(params.getOriginId)
CompletableFuture.completedFuture(result)
}
def onBuildExit(): Unit = ()
def onBuildInitialized(): Unit = ()

def buildTargetScalaMainClasses(
override def buildTargetScalaMainClasses(
params: ScalaMainClassesParams
): CompletableFuture[ScalaMainClassesResult] = {
val items = params.getTargets.asScala.map { target =>
Expand All @@ -36,7 +40,8 @@ private[script] trait DummyBuildServerImplems extends BuildServer with ScalaBuil
val result = new ScalaMainClassesResult(items.asJava)
CompletableFuture.completedFuture(result)
}
def buildTargetScalaTestClasses(

override def buildTargetScalaTestClasses(
params: ScalaTestClassesParams
): CompletableFuture[ScalaTestClassesResult] = {
val items = params.getTargets.asScala.map { target =>
Expand All @@ -46,4 +51,12 @@ private[script] trait DummyBuildServerImplems extends BuildServer with ScalaBuil
CompletableFuture.completedFuture(result)
}

override def debugSessionStart(dsp: DebugSessionParams): CompletableFuture[DebugSessionAddress] =
CompletableFuture.completedFuture(new DebugSessionAddress(""))

override def onBuildExit(): Unit = ()
override def onBuildInitialized(): Unit = ()

override def workspaceReload(): CompletableFuture[Object] =
CompletableFuture.completedFuture(new {})
}
2 changes: 1 addition & 1 deletion build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ val (buildVersion, unstable) = scala.util.Try(
case Some(tagName) => (tagName, false)
}

val bspVersion = "2.0.0-M6"
val bspVersion = "2.1.0-M5"
val fastparseVersion = "3.0.0"
val scalametaVersion = "4.7.8"

Expand Down

0 comments on commit 2dacc9e

Please sign in to comment.