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

Intellij plugin v1.4 - Failed to parse CLI arguments Crash #90

Open
sndpl opened this issue Sep 11, 2024 · 1 comment
Open

Intellij plugin v1.4 - Failed to parse CLI arguments Crash #90

sndpl opened this issue Sep 11, 2024 · 1 comment

Comments

@sndpl
Copy link

sndpl commented Sep 11, 2024

When saving a typescript file the biome plugin crashes with the following error:

`
java.lang.Throwable: Failed to run Biome check with (format, safefixes) for file index.ts - flags/invalid ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

× Failed to parse CLI arguments.

Caused by:
  `--write` is not expected in this context



at com.intellij.openapi.diagnostic.Logger.error(Logger.java:376)
at com.github.biomejs.intellijbiome.actions.BiomeCheckRunner.applyChanges(BiomeCheckRunner.kt:91)
at com.github.biomejs.intellijbiome.actions.BiomeCheckRunner.access$applyChanges(BiomeCheckRunner.kt:20)
at com.github.biomejs.intellijbiome.actions.BiomeCheckRunner$formatDocuments$1$1.run(BiomeCheckRunner.kt:58)
at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:477)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:133)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsynchronously$6(CoreProgressManager.java:528)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:249)
at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:96)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:221)
at com.intellij.platform.diagnostic.telemetry.helpers.TraceKt.use(trace.kt:49)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:220)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:660)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:735)
at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:691)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:659)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:79)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:202)
at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:96)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$5(ProgressRunner.java:249)
at com.intellij.openapi.progress.impl.ProgressRunner$ProgressRunnable.run(ProgressRunner.java:501)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$launchTask$18(ProgressRunner.java:466)
at com.intellij.util.concurrency.ChildContext$runAsCoroutine$1.invoke(propagation.kt:92)
at com.intellij.util.concurrency.ChildContext$runAsCoroutine$1.invoke(propagation.kt:92)
at com.intellij.util.concurrency.ChildContext.runAsCoroutine(propagation.kt:97)
at com.intellij.util.concurrency.ChildContext.runAsCoroutine(propagation.kt:92)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$launchTask$19(ProgressRunner.java:464)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:735)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:732)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:732)
at java.base/java.lang.Thread.run(Thread.java:1583)

`

Using biome 1.3.3 with the 1.4.0 plugin for Intelij.

@sndpl
Copy link
Author

sndpl commented Sep 11, 2024

hmm, it's because this fix: #84

That fixes the deprecated message for the --apply argument, but now the plugin doesn't work anymore with older biome versions. The biome 1.3.3 I use only has:

Available options:
        --apply               Apply safe fixes, formatting
        --apply-unsafe        Apply safe fixes and unsafe fixes, formatting and import sorting

Didn't find since which version the --write has been added

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant