cosmicsilence / gradle-scalafix

Gradle plugin for Scalafix
BSD 3-Clause "New" or "Revised" License
27 stars 5 forks source link

[WIP] Fix to support gradle configuration cache in scalafix plugin #84

Open fsanjuan opened 2 months ago

fsanjuan commented 2 months ago

This PR fixes issue #83

fsanjuan commented 2 months ago

@marcelocenerine finding a fix for this one is going to be challenging

|   1 problem was found storing the configuration cache.
|   - Task `:checkScalafixMain` of type `io.github.cosmicsilence.scalafix.ScalafixTask`: invocation of 'Task.project' at execution time is unsupported.
|     See https://docs.gradle.org/8.4/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution

We're using Task.project in both ConfigSemanticDBTask and ScalafixTask. Let's see what we can do 🔧

marcelocenerine commented 2 months ago

@marcelocenerine finding a fix for this one is going to be challenging

|   1 problem was found storing the configuration cache.
|   - Task `:checkScalafixMain` of type `io.github.cosmicsilence.scalafix.ScalafixTask`: invocation of 'Task.project' at execution time is unsupported.
|     See https://docs.gradle.org/8.4/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution

We're using Task.project in both ConfigSemanticDBTask and ScalafixTask. Let's see what we can do 🔧

In some cases, this should be straightforward. For instance:

The part involving classloaders will be trickier. We'll need to rethink that part