-
Notifications
You must be signed in to change notification settings - Fork 21
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
Detect and kill rampant Nim processes #93
Comments
it already does that, if you're having this issue chances are you didn't set |
Sorry, but could you explain how |
Yes, set it per Nim project, that's how it works. If you think it sucks, I agree. It's not a tractable problem for the extension, however. |
@saem
Would the project files be both The compiler uses the presence of a nimble file to identify and create package symbols that own module symbols. You already have the code in vscode-nim to walk the tree and determine the package.
I think that would yield the desired result. |
Yes, that trivial case works. Now please enumerate all the other possibilities because none of this stuff is well specified. If you spelunk through the git history I bet you you'll find this silly command I wrote that did file system traversal to try and test the variants. There is also a forum post where I tried to solicit more test scenarios when the combinatorial explosion seemed bonkers. At best one can get a heuristic and it's not great. But please try, maybe I'm wrong. Remember, cfg files, nims, folder and nim source naming conventions, etc all confer "projectness". The compiler (itself, nimsuggest, or check) can't really reason about things unless the project is correct. Not to mention people don't understand configuration basics, the amount of times people can't figure out that you need to specify the js backend in the config for nimsuggest and check to use it is amazing. Oh yeah, also one Nimble file can mean many projects, multiple binaries and/or hybrid. That last one is extra nice because name mapping destroys this information. So yeah, I gave up trying to come up with a reasonable heuristic. |
Oh, I forgot, the gendepend bit is another thing I considered, but it's was slow. It's the closet to a working solution, but just imagine the compiler where one has like 2000 test files. :D |
There is a known issue with
nimsuggest
andnim check
eating up CPU usage on certain files: nim-lang/Nim#11679This issue is a couple of years old, and might take a while to be fully resolved - different things appear to trigger it. In the meantime: could this extension detect and kill rampant processes? I'm unfamiliar with the design and limitations of VS Code extensions, so I don't know if that is technically feasible, but it would be a great improvement.
The text was updated successfully, but these errors were encountered: