mirror of https://github.com/sbt/sbt.git
Use VirtualFileRef of the classes directory
This commit is contained in:
parent
d6a65d71e0
commit
b7e037adbb
|
|
@ -2702,12 +2702,13 @@ object Defaults extends BuildCommon {
|
|||
compileInputs2 := {
|
||||
val cp0 = classpathTask.value
|
||||
val inputs = compileInputs.value
|
||||
val c = fileConverter.value
|
||||
CompileInputs2(
|
||||
data(cp0).toVector,
|
||||
inputs.options.sources.toVector,
|
||||
scalacOptions.value.toVector,
|
||||
javacOptions.value.toVector,
|
||||
outputPath.value + prefix(configuration.value.name),
|
||||
c.toVirtualFile(inputs.options.classesDirectory),
|
||||
)
|
||||
},
|
||||
bspCompileTask :=
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package sbt.internal
|
|||
|
||||
import scala.reflect.ClassTag
|
||||
import sjsonnew.*
|
||||
import xsbti.HashedVirtualFileRef
|
||||
import xsbti.{ HashedVirtualFileRef, VirtualFileRef }
|
||||
|
||||
// CompileOption has the list of sources etc
|
||||
case class CompileInputs2(
|
||||
|
|
@ -10,7 +10,7 @@ case class CompileInputs2(
|
|||
sources: Vector[HashedVirtualFileRef],
|
||||
scalacOptions: Vector[String],
|
||||
javacOptions: Vector[String],
|
||||
relativeOutputPath: String,
|
||||
outputPath: VirtualFileRef,
|
||||
)
|
||||
|
||||
object CompileInputs2:
|
||||
|
|
@ -19,7 +19,7 @@ object CompileInputs2:
|
|||
given IsoLList.Aux[
|
||||
CompileInputs2,
|
||||
Vector[HashedVirtualFileRef] :*: Vector[HashedVirtualFileRef] :*: Vector[String] :*:
|
||||
Vector[String] :*: String :*: LNil
|
||||
Vector[String] :*: VirtualFileRef :*: LNil
|
||||
] =
|
||||
LList.iso(
|
||||
{ (v: CompileInputs2) =>
|
||||
|
|
@ -27,12 +27,12 @@ object CompileInputs2:
|
|||
("sources", v.sources) :*:
|
||||
("scalacOptions", v.scalacOptions) :*:
|
||||
("javacOptions", v.javacOptions) :*:
|
||||
("relativeOutputPath", v.relativeOutputPath) :*:
|
||||
("outputPath", v.outputPath) :*:
|
||||
LNil
|
||||
},
|
||||
{
|
||||
(in: Vector[HashedVirtualFileRef] :*: Vector[HashedVirtualFileRef] :*: Vector[String] :*:
|
||||
Vector[String] :*: String :*: LNil) =>
|
||||
Vector[String] :*: VirtualFileRef :*: LNil) =>
|
||||
CompileInputs2(
|
||||
in.head,
|
||||
in.tail.head,
|
||||
|
|
|
|||
Loading…
Reference in New Issue