[2.x] refactor: Replace ivyModule with Coursier descriptor in evicted task

**Problem**
The evicted task directly uses ivyModule.value to get a module descriptor.
This creates an unnecessary dependency on Ivy for eviction warnings.

**Solution**
Use dependencyResolution.value.moduleDescriptor() which works with both
Ivy and Coursier resolvers, removing the direct Ivy coupling from the
eviction checking path.

Generated-by: Claude claude-opus-4-6
This commit is contained in:
eureka928 2026-03-03 01:15:59 +01:00
parent b1db6ba44d
commit 8746f5b291
1 changed files with 4 additions and 1 deletions

View File

@ -3352,8 +3352,11 @@ object Classpaths {
import ShowLines.*
val report = updateTask.value
val log = streams.value.log
val module = dependencyResolution.value.moduleDescriptor(
moduleSettings.value.asInstanceOf[ModuleDescriptorConfiguration]
)
val ew =
EvictionWarning(ivyModule.value, (evicted / evictionWarningOptions).value, report)
EvictionWarning(module, (evicted / evictionWarningOptions).value, report)
ew.lines foreach { log.warn(_) }
ew.infoAllTheThings foreach { log.info(_) }
ew