Skip to content

IOE: FormatterCommandRunner.runWithStdin #275

Done

Description

@abashev

java.io.UncheckedIOException: Error running the native image command; received output: Optional.empty
at com.palantir.javaformat.bootstrap.NativeImageFormatterService.getFormatReplacements(NativeImageFormatterService.java:61)
at com.palantir.javaformat.intellij.PalantirJavaFormatFormattingService$PalantirJavaFormatFormattingTask.run(PalantirJavaFormatFormattingService.java:142)
at com.intellij.formatting.service.AsyncDocumentFormattingSupportImpl$FormattingRequestImpl$runAndAwaitTask$2$taskJob$1.invokeSuspend$lambda$0(AsyncDocumentFormattingSupportImpl.kt:229)
at com.intellij.formatting.service.AsyncDocumentFormattingSupportImplKt.coroutineToIndicatorIfNeeded$lambda$0(AsyncDocumentFormattingSupportImpl.kt:379)
at com.intellij.openapi.progress.CoroutinesKt.coroutineToIndicator$lambda$0(coroutines.kt:504)
at com.intellij.openapi.progress.CoroutinesKt.jobToIndicator$lambda$0(coroutines.kt:599)
at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:98)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$0(CoreProgressManager.java:307)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$0(CoreProgressManager.java:776)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:854)
at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:810)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:775)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:89)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:291)
at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:98)
at com.intellij.openapi.progress.CoroutinesKt.jobToIndicator(coroutines.kt:587)
at com.intellij.openapi.progress.CoroutinesKt.contextToIndicator(coroutines.kt:558)
at com.intellij.openapi.progress.CoroutinesKt.coroutineToIndicator(coroutines.kt:503)
at com.intellij.formatting.service.AsyncDocumentFormattingSupportImplKt.coroutineToIndicatorIfNeeded(AsyncDocumentFormattingSupportImpl.kt:378)
at com.intellij.formatting.service.AsyncDocumentFormattingSupportImplKt.access$coroutineToIndicatorIfNeeded(AsyncDocumentFormattingSupportImpl.kt:1)
at com.intellij.formatting.service.AsyncDocumentFormattingSupportImpl$FormattingRequestImpl$runAndAwaitTask$2$taskJob$1.invokeSuspend(AsyncDocumentFormattingSupportImpl.kt:227)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:34)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100)
at kotlinx.coroutines.internal.SoftLimitedDispatcher$Worker.run(SoftLimitedDispatcher.kt:171)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:100)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:725)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:1277)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:890)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:877)
Caused by: java.io.IOException: Command terminated with exit value 1
Command: C:\Users\D425196\AppData\Local\JetBrains\IntelliJIdea2026.3\open-java-format\native\21.0.2\open-java-format-windows_x86-64.exe --character-ranges 328:352,374:414,909:1079,1134:1175,1260:1364,1376:1375,1898:1940,2007:2110,2120:2119 --output-replacements -
Working Directory: C:\Users\D425196\AppData\Local\JetBrains\IntelliJIdea2026.3\open-java-format\native\21.0.2
Stdout:

Stderr:
Invalid range: [1376..1375]

Usage: open-java-format [options] file(s)

Options:
-i, -r, -replace, --replace
Send formatted output back to files, not stdout.

Format stdin -> stdout

--assume-filename, -assume-filename
File name to use for diagnostics when formatting standard input (default is ).
--fix-imports-only
Fix import order and remove any unused imports, but do no other formatting.
--skip-sorting-imports
Do not fix the import order. Unused imports will still be removed.
--skip-removing-unused-imports
Do not remove unused imports. Imports will still be sorted.
. --skip-reflowing-long-strings
Do not reflow string literals that exceed the column limit.
--dry-run, -n
Prints the paths of the files whose contents would change if the formatter were run normally.
--set-exit-if-changed
Return exit code 1 if there are any formatting changes.
--lines, -lines, --line, -line
Line range(s) to format, e.g. the first 5 lines are 1:5 (1-based; default is all).
--character-ranges, -character-ranges, --character-range, -character-range
character range(s) to format, like 5:10 (0-based; default is all).
--offset, -offset
Character offset to format (0-based; default is all).
--length, -length
Character length to format.
--help, -help, -h
Print this usage statement.
--version, -version, -v
Print the version.
--output-replacements, -output-replacements
Outputs formatting replacements instead of the full formatted file.
@
Read options and filenames from file.

If -i is given with -, the result is sent to stdout.
The --lines, --offset, and --length flags may be given more than once.
The --offset and --length flags must be given an equal number of times.
If --lines, --offset, or --length are given, only one file (or -) may be given.
The exit code is 2 if a file could not be read, parsed or written, whatever the options.

open-java-format: Version 21.0.2
https://github.com/openjavaformat/open-java-format

at com.palantir.javaformat.bootstrap.FormatterCommandRunner.runWithStdin(FormatterCommandRunner.java:60)
at com.palantir.javaformat.bootstrap.NativeImageFormatterService.getFormatReplacements(NativeImageFormatterService.java:53)
... 28 more

Activity

  1. added
    bug
    on Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions