Here is what I do, based on how I thought reload should work.
- I start an erlang node.
- I con开发者_运维百科nect to that node in distel.
- I edit a buffer whose beam file is in the node from step 1's beam paths. That means it's loaded, right?
- I edit an erlang buffer which represents a module loaded in a step one's node. I add a function.
- I run reload in distel.
- I try to run the new function, and it says it's not defined.
I guess you have to compile first. This makes sense except that I wish then that there were a compile and reload command. In the end, I found it easier to just create an Emakefile like so:
{"rest_api/src/*", [{outdir,"rest_api/ebin"},{i, "include"}]}.
...in the same directory as the start script for my application, then run make:all([load]) as needed in the erlang shell.
精彩评论