goblint / GobPie

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

Restart server if gobpie.json is changed #23

Closed karoliineh closed 2 years ago

karoliineh commented 2 years ago

As the Goblint server can only reparse files and not analyse a new set of files when the server is already running, the server must be shut down and started again if a new set of files is passed. Right now one must always close and reopen VSCode to start an analysis on different sets of files in the project, which is quite inconvenient.

sim642 commented 2 years ago

With #24 the files field would move from gobpie.json to goblint.json, but the overall point still remains. It's just that if goblint.json is changed, the server should also be restarted.

michael-schwarz commented 1 year ago

In principle there is also nothing stopping us from adding a reset command to the server that resets all internal state. The question would be if there are any advantages to doing so over killing it?

On Thu, Mar 10, 2022, 9:49 PM Karoliine Holter @.***> wrote:

As the Goblint server can only reparse files and not analyse a new set of files when the server is already running, the server must be shut down and started again if a new set of files is passed. Right now one must always close and reopen VSCode to start an analysis on different sets of files in the project, which is quite inconvenient.

— Reply to this email directly, view it on GitHub https://github.com/goblint/GobPie/issues/23, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADJME3NJQCKO33K4KX734X3U7JN6PANCNFSM5QNYMOFQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

sim642 commented 1 year ago

Such command was already added in https://github.com/goblint/analyzer/pull/817 since our loading of configs is really a cumulative merging of configs. So in order to be able to get predictable behavior on config file changes, it was necessary to also reset and re-merge instead.

As usual with the server, the advantage still is that it avoids having to marshal and unmarshal all the incremental data just to add a new file to the analyzed project, etc.

michael-schwarz commented 1 year ago

I sent the email with this comment on Thu, Mar 10, 10:02 PM, very strange that it appeared here yesterday.