-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting filter patterns on KtlintExtension breaks configuration cache #657
Comments
😩 yea, this makes sense. Thank you for the report. I don't know if putting the pattern filterable into a provider will solve the problem though. |
I am having trouble reproducing this message. is it a warning? does it occur on first build or when the configuration cache is attempted to be used? |
The configuration cache has to be enabled, with I also noticed we have |
I encountered the same error while filtering using Spec like:
It does indeed work while using a regular expression like:
Running Gradle with configuration cache won't work when using filter excludes with Spec and project variables. A workaround for this is to force the variable resolution during the configuration phase:
It's not perfect, but other solutions would have to include some more complex support for early variable resolutions. |
I was looking for a solution for exclude auto generated files from GraphQL in Kotlin Multi Platform project and finally resolved this problem thanks your response :) |
Passing
PatternFilterable
fromKtlintExtension
intoBaseKtLintCheckTask
breaks configuration caching with the following:The code that breaks is as follows:
ktlint { filter { exclude("src/commonMain/kotlin/Models.kt") } }
Adding the filters directly to the tasks makes it work:
I think all that needs to be done is to wrap the
PatternFilterable
object in aProvider
.The text was updated successfully, but these errors were encountered: