Skip to content

Commit

Permalink
bugfix: Fix missing scheme in mill jvm classpath
Browse files Browse the repository at this point in the history
  • Loading branch information
tgodzik committed Nov 19, 2024
1 parent 9f12910 commit a2a0d53
Showing 1 changed file with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package scala.meta.internal.metals.debug.server

import java.nio.file.Paths

import scala.concurrent.ExecutionContext
import scala.concurrent.Future
import scala.concurrent.Promise
Expand Down Expand Up @@ -65,15 +67,24 @@ class DebugeeParamsCreator(buildTargetClasses: BuildTargetClasses) {

val scalaVersion = buildTargets.scalaTarget(id).map(_.scalaVersion)

val runClasspath = jvmRunEnv
.map(_.getClasspath().asScala.toList.map { path =>
try { path.toAbsolutePath }
catch {
case _: IllegalArgumentException =>
AbsolutePath(Paths.get(path))
}

})
.getOrElse(classpath)

new DebugeeProject(
scalaVersion,
target.displayName,
modules,
debugLibs,
filteredClassPath,
jvmRunEnv
.map(_.getClasspath().asScala.toList.map(_.toAbsolutePath))
.getOrElse(classpath),
runClasspath,
)
}
}
Expand Down

0 comments on commit a2a0d53

Please sign in to comment.