goblint / GobPie

Goblint IDE integration via MagpieBridge
MIT License
5 stars 3 forks source link

Recover Goblint server automatically after crashing #46

Closed karoliineh closed 1 year ago

karoliineh commented 1 year ago

While working on my thesis it has been very annoying that the plugin crashes each time I misspell the file name in the configuration file or make a syntax error in the .c file. This PR will try to make the plugin able to recover from most of those cases where Goblint crashes during analysis, so one does not have to restart the plugin manually.

karoliineh commented 1 year ago

For now, I will merge this PR without implementing the server recovery for when Goblint crashes due to parsing errors.

That is because this PR already fixes a lot of bugs and therefore I want this to be merged ASAP. Implementing server restart when files have parsing errors requires either:

  1. Acquiring the analysed files list from Goblint with pre_files, remembering them and watching for modifications in those files after Goblint has crashed. This is not ideal, though, because it does not work if the parsing errors are in the files already before Goblint manages to analyse them for the first time.
  2. Making a PR for MagpieBridge to have an alternative method of analyze, that, instead of giving a list of files that have been opened since the start of the latest IDE session, would also/instead give a list of only saved/modified files (since the last analysis). Also related to and could be used for #17.

These both require more time for implementing than I have right now, so this will (hopefully) be another PR in the future.