-
Notifications
You must be signed in to change notification settings - Fork 460
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
Spotless Gradle plugin doesn't respect .editorconfig changes when using daemon #1924
Comments
Seems I've experienced this issue. |
By some coincidence issues like #1913 were reproducible for me from time to time with daemon on, and disappeared when I explicitly turned off the daemon. It makes me think that Spotless somehow corrupts saved state. |
Also reproduced when I changed |
That change isn't related to this issue, I observed this issue a long time ago. |
I ran into something that sounds like this today. I found that adding a |
Just wasted another half hour on this, trying to configure ktlint, but not observing the changes. When authoring configuration we must use |
Took me quite a while yesterday to figure out that this was the reason .editorconfig changes appeared to not be taking affect. |
One of the issues with Spotless is that it's not compatible with the Gradle configuration cache. To solve this we need to use --no-configuration-cache and --no-daemon flags - diffplug/spotless#1924
I'm upgrading spotless from a very old version, just setting up the editorconfig file. I've spent more than a few hours on this issue, thinking why the rules are not working. When I add --no-daemon it works perfectly. |
summary of problem
Steps to reproduce:
enable Gradle daemon
run
./gradlew spotlessCheck
with some failing rule.disable said rule in
.editorconfig
run
./gradlew spotlessCheck
again.Expected: check passes.
Actual: check fails again.
Adding a
--no-daemon
command line parameter to second invocation resolves the issue; which hints that daemon somehow caches file contents, or doesn't treat it as an input to Gradle task.Gradle or Maven version
Gradle 8.4, 8.5
spotless version
Spotless 6.23.1
operating system and version
macos Sonoma, 14.1.1
The text was updated successfully, but these errors were encountered: