I was working on a project tonight and encountered what appears to be a bug in which the live reload feature is preventing mix from picking up file changes. I'm able to reproduce it by doing the following:
1) Add lib/helpers.ex and define a module with some functions.
2) Use the functions somewhere in the app (I was using them in a controller)
3) Start the phoenix server (everything should be working)
4) While the server is running, rename one of the functions and then update the name wherever you used it in the app.
5) Refresh the browser and you should get an UndefinedFunctionError.
6) Shut down the server and then restart it again
7) If you refresh the page you should still get the UndefinedFunctionError because the helpers.ex file was never recompiled.
In playing around with it, it appears as if the page reload in step 5 is what causes the problem because if you immediately shut down the server and restart it after renaming a file the helpers.ex file will be recompiled.
I was working on a project tonight and encountered what appears to be a bug in which the live reload feature is preventing mix from picking up file changes. I'm able to reproduce it by doing the following:
1) Add lib/helpers.ex and define a module with some functions. 2) Use the functions somewhere in the app (I was using them in a controller) 3) Start the phoenix server (everything should be working) 4) While the server is running, rename one of the functions and then update the name wherever you used it in the app. 5) Refresh the browser and you should get an UndefinedFunctionError. 6) Shut down the server and then restart it again 7) If you refresh the page you should still get the UndefinedFunctionError because the helpers.ex file was never recompiled.
In playing around with it, it appears as if the page reload in step 5 is what causes the problem because if you immediately shut down the server and restart it after renaming a file the helpers.ex file will be recompiled.