-
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
Incremental ktlintCheck task fails when file is deleted #679
Comments
Thanks for the failing test! This should be a quick fix. I'll work on it tomorrow |
wakingrufus
added a commit
that referenced
this issue
Jun 21, 2023
wakingrufus
added a commit
that referenced
this issue
Jun 21, 2023
wakingrufus
added a commit
that referenced
this issue
Jun 21, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, I've noticed on v11.4.0 incremental
ktlintCheck
s will fail when a file is deleted and another is modified.I've been able to repro this with a test in the KtlintPluginTest suite (below). The flow seems to be:
ktlintCheck
ktlintCheck
is up-to-date.ktlintCheck
fails withjava.io.FileNotFoundException: file_that_was_deleted.kt (No such file or directory)
Cleaning the project addresses the issue. Sample repro test is below. Looks like it passes on the v11.3.2.
Fails with:
Full Build Output
Execution failed for task ':runKtlintCheckOverMainSourceSet'.
Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':runKtlintCheckOverMainSourceSet'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:149)
...
Caused by: org.gradle.workers.internal.DefaultWorkerExecutor$WorkExecutionException: A failure occurred while executing org.jlleitschuh.gradle.ktlint.worker.KtLintWorkAction
at org.gradle.workers.internal.DefaultWorkerExecutor$WorkItemExecution.waitForCompletion(DefaultWorkerExecutor.java:283)
at org.gradle.internal.work.DefaultAsyncWorkTracker.lambda$waitForItemsAndGatherFailures$2(DefaultAsyncWorkTracker.java:130)
at org.gradle.internal.Factories$1.create(Factories.java:31)
...
Caused by: java.io.FileNotFoundException: /private/var/folders/9f/ztz6grwn0j7595f0c5l1pknw0000gq/T/junit6773990898998399332/plugin-test/src/main/kotlin/FileOne.kt (No such file or directory)
at kotlin.io.FilesKt__FileReadWriteKt.readText(FileReadWrite.kt:125)
at kotlin.io.FilesKt__FileReadWriteKt.readText$default(FileReadWrite.kt:125)
at org.jlleitschuh.gradle.ktlint.worker.KtLintInvocation47.buildParams(KtLintInvocation47.kt:45)
at org.jlleitschuh.gradle.ktlint.worker.KtLintInvocation47.invokeLint(KtLintInvocation47.kt:58)
at org.jlleitschuh.gradle.ktlint.worker.KtLintWorkAction.execute(KtLintWorkAction.kt:108)
at org.gradle.workers.internal.DefaultWorkerServer.execute(DefaultWorkerServer.java:63)
...
Get more help at https://help.gradle.org
BUILD FAILED in 1s
2 actionable tasks: 1 executed, 1 up-to-date
Watched directory hierarchies: [/private/var/folders/9f/ztz6grwn0j7595f0c5l1pknw0000gq/T/junit6773990898998399332/plugin-test]
Stopped 1 worker daemon(s).
The text was updated successfully, but these errors were encountered: