Directory structure for non-OTP projects
ke.han
ke.han@REDACTED
Sat Jul 30 11:51:33 CEST 2005
Tim,
From one newbie to another, here is what I do and I'm guessing its in
line with how the erlang REPOS and erlmerge see people using their dev
and deploy environment.
I just install erlang as normal (either root or under a less privileged
id) as normal. If you can use an older version of OTP, then starting
with REPOS may be even cleaner.
From there, I add my dev projects under the $ERL_HOME/lib directory.
I also have this directory as the root to a subversion store so I can
easily save and rollback my files.
> 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.
No, I don't need to do any such thing. During development, I just use
the full installed directory structure as is.
For deployment, you just want to trim down the /lib tree and perhaps
recompile the erlang install to only use those features you need. As
erlmerge gets more used, you should be able to start with a smaller
erlang install and use erlmerge to add in just the projects you
require. Then, in the spirit of REPOS, you just run the entire system
under one directory hierarchy. If you need another node, you can either
copy the entire hierarchy (if node on a different machine) or reuse it
with different script startup files to start the second node (on the
same machine)
>
> Can someone who uses the test_server please describe how they have their
> development environment set up on their workstation?
I use Win XP as my dev desktop. I find that using TurtoiseSVN embedded
in Windows Explorer along with a erlang syntax sensitive text editor
(erlide, UltraEdit, emacs) gives me all I need to edit, test, and store
my code.
One thing nice about viewing your code under one tree structure with the
rest of OTP, is its easy to access the OTP source files to read and
understand the library better. Erlide is nice for this.
> 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.
I put my own code under the main erlang tree. Sure you can use a
separate /lib tree from OTP and then have a script startup file to
append the new path to the erlang vm.. But you don't have to.
Anyway, that's the very simply way I see the world and its working so far.
regards, ke han
More information about the erlang-questions
mailing list