You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
spotlessProtobufCheck/Apply fails with pipe has closed exception, when processing .proto files larger than 4100 bytes, only on Windows.
Reducing the size of the .proto file (remove the last message on attached project) results in successful task execution.
Environment
Spotless: 6.25.0
Buf: 1.31.0
Gradle: 8.7
JVM: Oracle/GraalVM/Temurin 21
OS: OS: Windows 10 Pro Build: 22H2 (19045)
Shell: PowerShell 7.4.2
Stacktrace
English translation for "パイプは終了しました" is "The pipe is being closed".
#### buf: C:\Users\valkyrie\.gradle\caches\modules-2\files-2.1\build.buf\buf\1.31.0\4152371536f12671d4f04b3c2aa14c3182dd1774\buf-1.31.0-windows-x86_64.exe
> Task :spotlessInternalRegisterDependencies UP-TO-DATE
> Task :spotlessProtobuf FAILED
Step 'buf' found problem in 'src\main\proto\service.proto':
パイプは終了しました。
java.io.IOException: パイプは終了しました。
at com.diffplug.spotless.ProcessRunner.start(ProcessRunner.java:166)
at com.diffplug.spotless.ProcessRunner.start(ProcessRunner.java:131)
at com.diffplug.spotless.ProcessRunner.exec(ProcessRunner.java:114)
at com.diffplug.spotless.ProcessRunner.exec(ProcessRunner.java:109)
at com.diffplug.spotless.protobuf.BufStep$State.format(BufStep.java:93)
at com.diffplug.spotless.FormatterFunc$Closeable$3.apply(FormatterFunc.java:125)
at com.diffplug.spotless.FormatterStepImpl$Standard.format(FormatterStepImpl.java:82)
at com.diffplug.spotless.FormatterStep$Strict.format(FormatterStep.java:103)
at com.diffplug.spotless.Formatter.compute(Formatter.java:246)
at com.diffplug.spotless.PaddedCell.calculateDirtyState(PaddedCell.java:203)
at com.diffplug.spotless.PaddedCell.calculateDirtyState(PaddedCell.java:190)
at com.diffplug.gradle.spotless.SpotlessTaskImpl.processInputFile(SpotlessTaskImpl.java:105)
at com.diffplug.gradle.spotless.SpotlessTaskImpl.performAction(SpotlessTaskImpl.java:89)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:125)
at org.gradle.api.internal.project.taskfactory.IncrementalTaskAction.doExecute(IncrementalTaskAction.java:45)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:51)
at org.gradle.api.internal.project.taskfactory.IncrementalTaskAction.execute(IncrementalTaskAction.java:26)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:29)
at org.gradle.api.internal.tasks.execution.TaskExecution$3.run(TaskExecution.java:244)
Attached is the full stacktrace for ./gradlew spotlessProtobufCheck --stacktrace. stacktrace.txt
Reproducible project
Attached is a minimal gradle project that can reproduce the problem. Just run ./gradlew build or ./gradlew spotlessProtobufCheck to reproduce the problem. buf executable is automatically provisioned on the build script for convenience, but running with defaults (using buf executable available on PATH) results with same exception. spotless-buf-sample.zip
If you are submitting a bug, please include the following:
summary of problem
Gradle or Maven version
spotless version
operating system and version
copy-paste your full Spotless configuration block(s), and a link to a public git repo that reproduces the problem if possible
copy-paste the full content of any console errors emitted by gradlew spotless[Apply/Check] --stacktrace
If you're just submitting a feature request or question, no need for the above.
The text was updated successfully, but these errors were encountered:
Skipping OutputStream#close() here seems to fix this.
The process input stream is closed on Process#destroy() anyway, so probably it should be ok?
Ignore this comment. The close was only for file redirect. The pipe is registered for cleanup here.
I ran BufIntegrationTest with this patch and all was successful. I could make a PR (minus the fixed executable version on the patch) if that is preferred. bufpatch.patch
Summary
spotlessProtobufCheck/Apply
fails with pipe has closed exception, when processing .proto files larger than 4100 bytes, only on Windows.Reducing the size of the .proto file (remove the last message on attached project) results in successful task execution.
Environment
Spotless: 6.25.0
Buf: 1.31.0
Gradle: 8.7
JVM: Oracle/GraalVM/Temurin 21
OS: OS: Windows 10 Pro Build: 22H2 (19045)
Shell: PowerShell 7.4.2
Stacktrace
English translation for "パイプは終了しました" is "The pipe is being closed".
Attached is the full stacktrace for
./gradlew spotlessProtobufCheck --stacktrace
.stacktrace.txt
Reproducible project
Attached is a minimal gradle project that can reproduce the problem. Just run
./gradlew build
or./gradlew spotlessProtobufCheck
to reproduce the problem. buf executable is automatically provisioned on the build script for convenience, but running with defaults (using buf executable available onPATH
) results with same exception.spotless-buf-sample.zip
If you are submitting a bug, please include the following:
gradlew spotless[Apply/Check] --stacktrace
If you're just submitting a feature request or question, no need for the above.
The text was updated successfully, but these errors were encountered: