ignatov / intellij-erlang

Erlang IDE
https://www.jetbrains.com/help/idea/2018.2/getting-started-with-erlang.html
Other
730 stars 121 forks source link

how to hot reload modified code like erlide #843

Open apehub opened 5 years ago

apehub commented 5 years ago

The erlide can hot reload the modified files without restart erlang app, but the intelij erlang plugin cannot.

is there any workaround can do this?

thanks ~~

ignatov commented 5 years ago

@kvakvs do you how to do it properly?

kvakvs commented 5 years ago

Erlide runs a full Erlang node with your code. I have never used IntelliJ to run my code, usually there's always a very complex makefile involved in starting the node or multiple nodes. Hot code reloading is as easy as recompiling the modified file (need to set the include paths and compiler options, and output beam directory) and then calling code:load_file in the running node although this is very dirty and does not respect code upgrade rules or does not force module internal loops to switch to the new version of the code.