[2.x] fix: Avoid updateFull

**Problem**
updateFull is called in no-op compile.

**Solution**
Avoid it for the default dependency mode.
This commit is contained in:
Eugene Yokota 2026-06-01 06:36:19 -04:00
parent b34323c39e
commit 7271faacbc
1 changed files with 58 additions and 26 deletions

View File

@ -2744,17 +2744,31 @@ object Classpaths {
dependencyMode.value match dependencyMode.value match
case DependencyMode.Transitive => case DependencyMode.Transitive =>
Def.task { dependencyClasspath.value } Def.task { dependencyClasspath.value }
case mode => case DependencyMode.Direct =>
Def.task { Def.task {
val internalFiltered = ClasspathImpl.filterInternalByMode( val internalFiltered = ClasspathImpl.filterInternalByMode(
mode, DependencyMode.Direct,
thisProjectRef.value, thisProjectRef.value,
settingsData.value, settingsData.value,
buildDependencies.value, buildDependencies.value,
internalDependencyClasspath.value, internalDependencyClasspath.value,
) )
val externalFiltered = ClasspathImpl.filterByDependencyMode( val externalFiltered = ClasspathImpl.filterByDirectDeps(
mode, allDependencies.value,
externalDependencyClasspath.value,
)
internalFiltered ++ externalFiltered
}
case DependencyMode.PlusOne =>
Def.task {
val internalFiltered = ClasspathImpl.filterInternalByMode(
DependencyMode.PlusOne,
thisProjectRef.value,
settingsData.value,
buildDependencies.value,
internalDependencyClasspath.value,
)
val externalFiltered = ClasspathImpl.filterByPlusOne(
allDependencies.value, allDependencies.value,
projectID.value, projectID.value,
classpathConfiguration.value, classpathConfiguration.value,
@ -2822,28 +2836,46 @@ object Classpaths {
// Note: invoking this task from shell would block indefinitely because it will // Note: invoking this task from shell would block indefinitely because it will
// wait for the upstream compilation to start. // wait for the upstream compilation to start.
dependencyPicklePath := Def.uncached { dependencyPicklePath := Def.uncached {
// This is a conditional task. Do not refactor. Def.taskDyn {
if (incOptions.value.pipelining) { (incOptions.value.pipelining, dependencyMode.value) match
val mode = dependencyMode.value case (false, _) =>
val internalFiltered = ClasspathImpl.filterInternalByMode( Def.task { filteredDependencyClasspath.value }
mode, case (true, DependencyMode.Transitive) =>
thisProjectRef.value, Def.task { dependencyClasspath.value }
settingsData.value, case (true, DependencyMode.Direct) =>
buildDependencies.value, Def.task {
internalDependencyPicklePath.value, val internalFiltered = ClasspathImpl.filterInternalByMode(
) DependencyMode.Direct,
val externalFiltered = ClasspathImpl.filterByDependencyMode( thisProjectRef.value,
mode, settingsData.value,
allDependencies.value, buildDependencies.value,
projectID.value, internalDependencyClasspath.value,
classpathConfiguration.value, )
updateFull.value, val externalFiltered = ClasspathImpl.filterByDirectDeps(
externalDependencyClasspath.value, allDependencies.value,
) externalDependencyClasspath.value,
internalFiltered ++ externalFiltered )
} else { internalFiltered ++ externalFiltered
filteredDependencyClasspath.value }
} case (true, DependencyMode.PlusOne) =>
Def.task {
val internalFiltered = ClasspathImpl.filterInternalByMode(
DependencyMode.PlusOne,
thisProjectRef.value,
settingsData.value,
buildDependencies.value,
internalDependencyClasspath.value,
)
val externalFiltered = ClasspathImpl.filterByPlusOne(
allDependencies.value,
projectID.value,
classpathConfiguration.value,
updateFull.value,
externalDependencyClasspath.value,
)
internalFiltered ++ externalFiltered
}
}.value
}, },
internalDependencyPicklePath := ClasspathImpl.internalDependencyPicklePathTask.value, internalDependencyPicklePath := ClasspathImpl.internalDependencyPicklePathTask.value,
exportedPickles := ClasspathImpl.exportedPicklesTask.value, exportedPickles := ClasspathImpl.exportedPicklesTask.value,