Closed Gekctek closed 6 months ago
Thanks for the repro link. Everything seems to work on my end, so this might be specific to your system. I'll see if there's any way to reduce the peak memory usage in case that's the root of the issue.
Does this still happen with previous versions of the Motoko extension?
Thanks for the repro link. Everything seems to work on my end, so this might be specific to your system. I'll see if there's any way to reduce the peak memory usage in case that's the root of the issue.
Does this still happen with previous versions of the Motoko extension?
Yes, it cuts out once in a while historically, but I have always just restarted VSCode and that can help
This time, it just seems stuck broken. Im fairly confident that i didnt update vscode extension or dfx, so its probably just something weird on my computer. Ill try another
Any tips for diagnosing where the issue could be? Is it the out of memory or is that something else, i never looked to see if it was a problem before
@rvanasa I ran it on my laptop, same repo and i get the same thing with the out of memory and no showing of errors/warnings in vscode, only see them in the CLI when i do a CLI build
I dont think I mention that I am using WSL2 for both of my computers, windows 11
Okay, good to know about WSL. This might just be caused by running out of memory in VS Code. It's possible that other extensions are contributing to the memory usage, although I'll also try to find some optimizations next time I get a chance to work on the Motoko extension again.
It might be worth trying to remove other extensions as another debugging step to narrow down the issue. If it's specifically the Motoko extension, then I'll prioritize looking for a fix in the next few days (currently juggling a lot of work items).
Also, for repro purposes, are you using the latest version of the extension (v0.16.3) on both computers, and the same thing occurs with earlier versions (e.g. v0.16.0)?
Some more context
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
gekctek 2433 177 26.9 15365964 4395324 pts/2 Rl+ 09:57 3:09 /home/gekctek/.vscode-server/bin/863d2581ecda6849923a2118d93a088b0745d9d6/node --stack-size=1361 /home/gekctek/.vscode-server/extensions/dfinity-foundation.vscode-motoko-0.16.3/out/server.js --node-ipc --clientProcessId=19163
It seems specifically that the motoko extension is taking up a good chunk of my memory
Going to test with other versions
I feel like there is something with my code that is triggering a bug?
I am testing these out with rebooting my wsl2 instance just to make sure i have a clean slate to test
Changing to different extension versions I know worked like 0.16.0 has the same issue
I switched repositories to https://github.com/edjCase/motoko_random and IT WORKS, in multiple versions including the latest
So it must be a repo specific issue for https://github.com/edjCase/daoball The question is what, im not sure how to diagnose the specific issue.
Ill try reverting commits again until it works
Ok, 'solved'
I deleted the .dfx and .mops directories and restarted and it is now fine
I always noticed that there is a delay in the extension highlighting when starting up. So maybe it was just an issue with too many uncleaned mops packages or something?
Is there a lot of analysis going into these?
Thanks for the info, and I'm glad that you were able to resolve the issue! I'll see if we there's anything we can do to reduce unnecessary memory usage, especially if this had something to do with type-checking unused Mops packages.
I'll close the issue for now, and we can re-open if you or anyone else runs into this again in the future.
As a side note, I double-checked and the extension shouldn't be running the type checker on any unused Motoko files. However, this very well might be related to a corner case with the virtual file system used by moc.js
from js_of_ocaml
.
I am trying to diagnose why my vscode motoko extension has just stopped putting anything like errors/warnings in vscode anymore
I have tried
Upon looking I find this error in my output, no matter the cases listed above
Any help in diagnosing the issue would be appreciated, its slowing down my development to use
My project https://github.com/edjCase/daoball/ main branch