Directory structure for non-OTP projects

Tim Bates <>
Sat Jul 30 05:16:26 CEST 2005


Chandrashekhar Mullaparthi wrote:
>> Do people normally go through some variant of the release process
>> described in the OTP Design Principles every time they change a
>> line of code?
> 
> No - not really. This is what we do.
> 
> - If some modules are changed, we put them in the right paths and
> load the new modules into the node.
> 
> - If we need to add new applications or the version number of an 
> application has changed (for e.g because of backward incompatible 
> changes or because we added new modules) we go through the release 
> process. But even in this case, we don't write .appup and .relup
> files. We just build a new boot file, copy the boot file and the  new
> stuff into appropriate places and either wait for the next node
> restart or we do a controlled restart. We maintain uptime by
> diverting traffic to standby nodes.
> 
> - If we have to upgrade the ERTS and/or some OTP libraries, we build
> a whole new release and install it in place of the old one and
> restart the node.

Okay, but what about during development? This is the bit I don't get.
How do I set up my workstation to develop my code? What do I do when I
change a line of code in a module and want to run the test_server again?
It's slowly making more sense but it hasn't clicked yet where I'm
supposed to put my code. My code must be in the default search path,
otherwise the test_server won't find it, which appears to mean that I
have to put it in the same source tree as OTP, but that means having to
use the OTP build process, and that doesn't seem to be well adapted for
adding my own applications to. Do people really go through the whole
`make install` process or build a target system or something every time
they change even one line of code during development? It just seems very
heavy. There must be a better way but I don't see it.

Can someone who uses the test_server please describe how they have their
development environment set up on their workstation? Where have you
installed erlang? Where do you put your own code in relation to that?
What do you do each time you change your code during development? This
seems like it ought to be a simple problem but I don't get it and it's
frustrating that I haven't written a single line of Erlang yet.

Tim.

-- 
Tim Bates





More information about the erlang-questions mailing list