mirror of https://github.com/sbt/sbt.git
Internal usage of inputTaskDyn
This commit is contained in:
parent
11cd58daa7
commit
711df2cbf2
|
|
@ -4705,9 +4705,8 @@ trait BuildExtra extends BuildCommon with DefExtra {
|
||||||
baseArguments: String*
|
baseArguments: String*
|
||||||
): Vector[Setting[?]] = {
|
): Vector[Setting[?]] = {
|
||||||
Vector(
|
Vector(
|
||||||
scoped := Def
|
scoped := Def.inputTaskDyn {
|
||||||
.input(_ => Def.spaceDelimited())
|
val result = Def.spaceDelimited().parsed
|
||||||
.flatMapTask { result =>
|
|
||||||
initScoped(
|
initScoped(
|
||||||
scoped.scopedKey,
|
scoped.scopedKey,
|
||||||
ClassLoaders.runner.mapReferenced(Project.mapScope(_.rescope(config))),
|
ClassLoaders.runner.mapReferenced(Project.mapScope(_.rescope(config))),
|
||||||
|
|
@ -4719,8 +4718,7 @@ trait BuildExtra extends BuildCommon with DefExtra {
|
||||||
r.run(mainClass, cp.files, baseArguments ++ args, s.log).get
|
r.run(mainClass, cp.files, baseArguments ++ args, s.log).get
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}.evaluated
|
||||||
.evaluated
|
|
||||||
) ++ inTask(scoped)((config / forkOptions) := forkOptionsTask.value)
|
) ++ inTask(scoped)((config / forkOptions) := forkOptionsTask.value)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -747,9 +747,8 @@ object BuildServerProtocol {
|
||||||
private inline def bspInputTask[T](
|
private inline def bspInputTask[T](
|
||||||
inline taskImpl: (BspFullWorkspace, ScopeFilter) => T
|
inline taskImpl: (BspFullWorkspace, ScopeFilter) => T
|
||||||
): Def.Initialize[InputTask[T]] =
|
): Def.Initialize[InputTask[T]] =
|
||||||
Def
|
Def.inputTaskDyn {
|
||||||
.input(_ => targetIdentifierParser)
|
val targets = targetIdentifierParser.parsed
|
||||||
.flatMapTask { targets =>
|
|
||||||
val workspace: BspFullWorkspace = bspFullWorkspace.value.filter(targets)
|
val workspace: BspFullWorkspace = bspFullWorkspace.value.filter(targets)
|
||||||
val filter = ScopeFilter.in(workspace.scopes.values.toList)
|
val filter = ScopeFilter.in(workspace.scopes.values.toList)
|
||||||
Def.task(taskImpl(workspace, filter))
|
Def.task(taskImpl(workspace, filter))
|
||||||
|
|
@ -866,7 +865,8 @@ object BuildServerProtocol {
|
||||||
.map(JsonParser.parseFromString)
|
.map(JsonParser.parseFromString)
|
||||||
|
|
||||||
private def bspRunTask: Def.Initialize[InputTask[Unit]] =
|
private def bspRunTask: Def.Initialize[InputTask[Unit]] =
|
||||||
Def.input(_ => jsonParser).flatMapTask { json =>
|
Def.inputTaskDyn {
|
||||||
|
val json = jsonParser.parsed
|
||||||
val runParams = json.flatMap(Converter.fromJson[RunParams]).get
|
val runParams = json.flatMap(Converter.fromJson[RunParams]).get
|
||||||
val defaultClass = Keys.mainClass.value
|
val defaultClass = Keys.mainClass.value
|
||||||
val defaultJvmOptions = Keys.javaOptions.value
|
val defaultJvmOptions = Keys.javaOptions.value
|
||||||
|
|
@ -909,7 +909,8 @@ object BuildServerProtocol {
|
||||||
}
|
}
|
||||||
|
|
||||||
private def bspTestTask: Def.Initialize[InputTask[Unit]] =
|
private def bspTestTask: Def.Initialize[InputTask[Unit]] =
|
||||||
Def.input(_ => jsonParser).flatMapTask { json =>
|
Def.inputTaskDyn {
|
||||||
|
val json = jsonParser.parsed
|
||||||
val testParams = json.flatMap(Converter.fromJson[TestParams]).get
|
val testParams = json.flatMap(Converter.fromJson[TestParams]).get
|
||||||
val workspace = bspFullWorkspace.value
|
val workspace = bspFullWorkspace.value
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue