-
Notifications
You must be signed in to change notification settings - Fork 8
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
symbols not loading and nimsuggest being opened for each file when project mapping is defined #135
Comments
Notice as long as there is a nimble file, it is preferred as an entry point. |
Yes, that is exactly how I launch VS Code. |
Which nimsuggest is the plugin using? Is the one from NBS, from my local installation, or the one specified in the VS Code integrated terminal, ie |
What I managed to do was use a integrated terminal startup script to use a version of nimble that is compatible with nimlangserver. I also installed nimlangserver on master. The version of nimsuggest should have been fine. Now I'm not getting nimsuggest crashes, but I'm getting far too many instances of nimsuggest. Enough for all 32GB of memory to be consumed. |
Glad to see you get it working now. The instances should be removed after a period of inactivity. You can control it with the setting: |
Is
~650MB is not bad if the number of nimsuggest instances was constrained to 3 as I was attempting to do with my project mapping (shown in the issue description). Is there something wrong with my config? Otherwise, why are there so many nimsuggest instances being created? |
This should be the case. If they dont close its likely cause they are still active. For every file open that you work on, it opens a new instance. Could it also be the case that |
I'm confused, I thought it was only supposed to open a single nimsuggest instance per project mapping? Also, I don't have as many files open as there are nimsuggest instances.
I had this option enabled and it didn't help my case. |
Project mapping only applies when not in a |
I suspect there's a conflict there with nimbus-build-system projects that have a nimble file but don't use it for package management per se - ie nimbus-build-system sets up a "nimble emulation layer" in order for tests from the nimble file to be runnable, but the nimble file itself is not correct / complete - the expectation is that the nim from n-b-s is used in this case. |
I was able to workaround issues with NBS nimble by symlinking nimble from my user home directory into the NBS path in the integrated terminal (codex-storage/nim-codex#1096). It's hard to know what environment the plugin uses to run its commands, however, so I'm not entirely sure if this workaround affects the plugin as much as I think it might. It did start working after that, but that's when I started hitting issues with too many nimsuggest instances opening. To force project mapping mode, I tried removing Due to #135, OOM errors with too many nimsuggest instances, and no symbol resolution working, I disabled this plugin and re-enabled the older nimsaem extension and low and behold symbol resolution (ie "go to definition") starting working! |
Since you are in MacOS, maybe the process arent killed due to this: status-im/nim-chronos@36d8ee5 |
Affected versions
❯ nimble --version Info: Using the environment variable: NIMBLE_DIR='/Users/egonat/repos/codex-storage/nim-codex/vendor/.nimble' nimble v0.16.4 compiled at 2025-01-31 02:30:26 git hash: 4e7e646b9819b72044e5262c2800e9f7ccfd1b16
My assumption is that the configuration is incorrect, however I do see some "RegEx matched` messages:
This plugin almost never works for me when working inside of an NBS project, could that be the cause of the issue?
In settings, we have:
Output:
The SIGSEGV then continues to occur and no symbols are ever loaded.
Have tried multiple versions of
fileRegex
, all with the same result, eg:"fileRegex": "tests/integration/(.*).nim"
"fileRegex": "tests/integration/.*\\.nim"
"fileRegex": "tests\/integration\/.*\\.nim"
Have tried enabling nimcheck vs nimsuggest
Do you have any other info that may help us? All of us on my team are struggling to get this to work and it would be a huge boon for us if it did.
The text was updated successfully, but these errors were encountered: