Skip to content
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

Repeated use of IDE hook hits the cache when it shouldn't #2365

Open
6 tasks done
micah-press opened this issue Dec 13, 2024 · 0 comments
Open
6 tasks done

Repeated use of IDE hook hits the cache when it shouldn't #2365

micah-press opened this issue Dec 13, 2024 · 0 comments
Labels

Comments

@micah-press
Copy link

If you are submitting a bug, please include the following:

  • summary of problem

When formatting an individual file using Spotless's IDE hook, repeatedly invoking spotlessApply fails to apply fixes to the file after the first run if the changes are undone in between runs. I can reproduce this using the Intellij plugin and directly on the command line. I've linked a repo below containing a reproduction of the issue.

Current behavior:

If I run spotlessApply -PspotlessIdeHook=/path/to/my/file more than once, undoing the formatting changes after the first invocation, subsequent invocations won't apply changes to the file.

Expected behavior:

Spotless should be consistent and idempotent, so I should be able to run it as many times as I want and get the same output each time.


  • Gradle or Maven version
    Gradle 8.11.1
  • spotless version
    7.0.0.BETA4
  • operating system and version
    Linux 5.15.0-126-generic amd64
  • copy-paste your full Spotless configuration block(s), and a link to a public git repo that reproduces the problem if possible
    https://github.com/micah-press/mp-spotless-bug-demo
spotless {
    java {
        endWithNewline()
    }
}
  • copy-paste the full content of any console errors emitted by gradlew spotless[Apply/Check] --stacktrace
    N/A
@nedtwigg nedtwigg added the bug label Dec 17, 2024
IhorPakharenko pushed a commit to IhorPakharenko/Space-Cards-Multiplatform that referenced this issue Dec 27, 2024
IhorPakharenko pushed a commit to IhorPakharenko/Space-Cards-Multiplatform that referenced this issue Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants