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

zigbrains always run 'zig' command from old uninstalled path #99

Open
yougg opened this issue Mar 6, 2025 · 3 comments
Open

zigbrains always run 'zig' command from old uninstalled path #99

yougg opened this issue Mar 6, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@yougg
Copy link

yougg commented Mar 6, 2025

my old zig installation path is D:\msys64\clang64\bin\zig.exe (in windows msys2 installed by pacman)

I uninstalled the old version and then downloaded the 0.14.0 package and unzipped it to this path: %USERPROFILE%/sdk/

and modified the zig path in the zigbrains configuration

Image

But whenever I run zig, zigbrains always uses the old path to execute the zig command and then prompts the following error
Image
Image

I have tried uninstalling and reinstalling the zigbranins plugin, but the error still occurs

@FalsePattern FalsePattern added the bug Something isn't working label Mar 6, 2025
@FalsePattern
Copy link
Owner

FalsePattern commented Mar 6, 2025

Please send the full contents of the stacktrace.txt file from that image as text.

@yougg
Copy link
Author

yougg commented Mar 7, 2025

sorry, I didn't save the error message last night
and now i can't reproduce it again

@yougg yougg closed this as completed Mar 7, 2025
@yougg
Copy link
Author

yougg commented Mar 7, 2025

oh... it reproduced in another project, and this project is not a zig project

[bc37fb5d] Failed to execute task com.intellij.util.indexing.UnindexedFilesScannerExecutorImpl$ScheduledScanningTask@62bb0d85

java.lang.RuntimeException: java.util.concurrent.ExecutionException: com.intellij.execution.process.ProcessNotCreatedException: Cannot run program "D:\msys64\clang64\bin\zig.exe" (in directory "D:\code\CI"): CreateProcess error=2, 系统找不到指定的文件。
at com.intellij.util.ExceptionUtil.rethrow(ExceptionUtil.java:136)
at com.intellij.openapi.progress.util.ProgressIndicatorUtils.awaitWithCheckCanceled(ProgressIndicatorUtils.java:399)
at com.intellij.openapi.progress.util.ProgressIndicatorUtils.awaitWithCheckCanceled(ProgressIndicatorUtils.java:362)
at com.intellij.util.indexing.UnindexedFilesScanner.waitForPreconditions(UnindexedFilesScanner.kt:507)
at com.intellij.util.indexing.UnindexedFilesScanner.access$waitForPreconditions(UnindexedFilesScanner.kt:59)
at com.intellij.util.indexing.UnindexedFilesScanner$perform$1$1.invoke(UnindexedFilesScanner.kt:451)
at com.intellij.util.indexing.UnindexedFilesScanner$perform$1$1.invoke(UnindexedFilesScanner.kt:450)
at com.intellij.util.indexing.UnindexedFilesScanner.prepareScanningHistoryAndRun(UnindexedFilesScanner.kt:488)
at com.intellij.util.indexing.UnindexedFilesScanner.perform(UnindexedFilesScanner.kt:450)
at com.intellij.util.indexing.UnindexedFilesScannerExecutorImpl$runScanningTask$2$2.invoke(UnindexedFilesScannerExecutorImpl.kt:222)
at com.intellij.util.indexing.UnindexedFilesScannerExecutorImpl$runScanningTask$2$2.invoke(UnindexedFilesScannerExecutorImpl.kt:221)
at com.intellij.openapi.progress.CoroutinesKt.blockingContextInner(coroutines.kt:339)
at com.intellij.openapi.progress.CoroutinesKt$blockingContext$2.invokeSuspend(coroutines.kt:232)
at com.intellij.openapi.progress.CoroutinesKt$blockingContext$2.invoke(coroutines.kt)
at com.intellij.openapi.progress.CoroutinesKt$blockingContext$2.invoke(coroutines.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:62)
at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:261)
at com.intellij.openapi.progress.CoroutinesKt.blockingContext(coroutines.kt:231)
at com.intellij.util.indexing.UnindexedFilesScannerExecutorImpl$runScanningTask$2.invokeSuspend(UnindexedFilesScannerExecutorImpl.kt:221)
at com.intellij.util.indexing.UnindexedFilesScannerExecutorImpl$runScanningTask$2.invoke(UnindexedFilesScannerExecutorImpl.kt)
at com.intellij.util.indexing.UnindexedFilesScannerExecutorImpl$runScanningTask$2.invoke(UnindexedFilesScannerExecutorImpl.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:62)
at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:261)
at com.intellij.util.indexing.UnindexedFilesScannerExecutorImpl.runScanningTask(UnindexedFilesScannerExecutorImpl.kt:209)
at com.intellij.util.indexing.UnindexedFilesScannerExecutorImpl.access$runScanningTask(UnindexedFilesScannerExecutorImpl.kt:37)
at com.intellij.util.indexing.UnindexedFilesScannerExecutorImpl$1$3$1.invokeSuspend(UnindexedFilesScannerExecutorImpl.kt:103)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
at kotlinx.coroutines.internal.SoftLimitedDispatcher$Worker.run(SoftLimitedDispatcher.kt:125)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:608)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:873)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:763)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:750)
Caused by: java.util.concurrent.ExecutionException: com.intellij.execution.process.ProcessNotCreatedException: Cannot run program "D:\msys64\clang64\bin\zig.exe" (in directory "D:\code\CI"): CreateProcess error=2, 系统找不到指定的文件。
at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2096)
at com.intellij.openapi.progress.util.ProgressIndicatorUtils.awaitWithCheckCanceled(ProgressIndicatorUtils.java:370)
... 32 more
Caused by: com.intellij.execution.process.ProcessNotCreatedException: Cannot run program "D:\msys64\clang64\bin\zig.exe" (in directory "D:\code\CI"): CreateProcess error=2, 系统找不到指定的文件。
at com.intellij.execution.configurations.GeneralCommandLine.createProcess(GeneralCommandLine.java:384)
at com.falsepattern.zigbrains.project.toolchain.tools.ZigTool$callWithArgs$2.invokeSuspend(ZigTool.kt:42)
... 8 more
Caused by: java.io.IOException: Cannot run program "D:\msys64\clang64\bin\zig.exe" (in directory "D:\code\CI"): CreateProcess error=2, 系统找不到指定的文件。
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1170)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1089)
at com.intellij.execution.configurations.GeneralCommandLine.createProcess(GeneralCommandLine.java:463)
at com.intellij.execution.configurations.GeneralCommandLine.startProcess(GeneralCommandLine.java:469)
at com.intellij.execution.configurations.GeneralCommandLine.createProcess(GeneralCommandLine.java:374)
... 9 more
Caused by: java.io.IOException: CreateProcess error=2, 系统找不到指定的文件。
at java.base/java.lang.ProcessImpl.create(Native Method)
at java.base/java.lang.ProcessImpl.(ProcessImpl.java:500)
at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:159)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1126)
... 13 more

@yougg yougg reopened this Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants