4 ms·
Version upgrades are not needed on BEAM anymore than they are in Lisp, you can just reload a module and code will start using the new version.
by ramchip 4y ago
Version upgrades are not needed on BEAM anymore than they are in Lisp, you can just reload a module and code will start using the new version.
- phoe-krk 4y agoTIL, that's a big thing! When was that change made?
- ramchip 4y agoI don't think it's recent, as far as I know. Versioning, appup / relup, etc. are really for upgrading production deployments live, when you need special instructions to pause processes or update their internal state before loading new code. In development, you can ignore all that and just reload modules directly. e.g. with "r" in the Elixir REPL. Once that's done any external call (`MyModule.add(1,2)`) will go to the new version of the code, while local calls (`add(1,2)`) stay on the same version. The Phoenix web framework will also auto-reload any module that has changed on disk when handling a web request in dev mode.