Closed henrybley closed 12 months ago
Hey @henrybley, Thanks for opening the issue! this is almost surely happening because the unix socket file /tmp/mini_compile_commands_unix_socket
is not being deleted when the server shuts down for some reason. A dumb way of fixing this would be to remove the file: rm /tmp/mini_compile_commands_unix_socket
.
A few questions:
OK, i added a more useful exception message, which explains how to fix the problem. Pull main and try it out when you get a chance! Would still be good to understand a bit more about how you ran into this (especially if you are on macos). Leaving open for now
thanks! that fixed it. I am using NixOS. Im not entirely sure what happened on my first time but I have been able to recreate the issue if I close the server down incorrectly. either by just shutting down the computer or closing the terminal window in which it is running
Yeah, that makes sense. The cleanup and json writing happen in a SIGINT handler, so if the process is killed another way, they don't happen.
There may be a way to fix this, but I suspect there will always be shutdown edge cases that don't work. For example, you can't have SIGKILL handlers: https://www.gnu.org/software/libc/manual/html_node/Termination-Signals.html
The new exception message should help people recover, if they shut down abnormally.
Will leave open for now in case anyone can see a good solution
Closing since I think the added exception message is clear enough that people will be able to solve this on their own.
sorry I'm a bit new to this and I apologize if I'm being dumb... but I had this working once or twice and got a generated .json but now when trying to run it I get this error and it blanks out my previous .json file