-
Notifications
You must be signed in to change notification settings - Fork 7
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
Failure to find Node gets cached #116
Comments
It's unlikely that it will be addressed. I think the benefits of caching are bigger than correctly handling a corner cases like that. |
Well, AIUI, changing As for whether such a setup qualifies as a "corner case", please let me disagree on that; LTS distributions are still very common, and in this behaviour made debugging very difficult for me.
Considering that this is a bog-standard Ubuntu 20.10 LTS install, which I believe is a pretty popular distribution, I don't think it's worth dismissing as "edge case". (And while I've been using the command line, one would've gotten the same results from using the graphical application managers, since they basically issue |
I suppose not caching when resolving failed would be OK. Though then someone could still come and report an issue that the we don't pick up newly updated node version due to caching. |
Yeah, but that's exactly the tradeoff made by caching (“there are two hard things in programming...”). I suppose that could be mitigated by refreshing the cache if it's old enough (i.e. Alternatively, if you can think of a way to allow the user to request a cache flush, then that would be a non-issue. But I'm not sure that's a possibility at all, considering how “internal”/low-level this library is. |
Also I remembered now that the caching is a way to avoid the user being spammed with multiple error dialogs when there are multiple servers installed or multiple windows opened. |
I want to suggest some way to "deduplicate" those error messages then, but something like a timeout is fairly arbitrary and "magic" thus hinders debugging. Somehow printing a notice that the returned failure comes from a cache, with an indication to restart ST will refresh it, would make everyone happy? |
LSP-json was failing to find a suitable Node.js (I had 12, welcome to Ubuntu LTS :P); but even after installing 18, the same error kept appearing. I traced this to the caching being done in NodeRuntime, and fixed it by restarting Sublime Text.
The text was updated successfully, but these errors were encountered: