I found these description in the Erlang doc and learnyousomeerlang.com, but not sure which one is the "Application Resource File". When should I use .app and .app.src?
7.3 Application Resource File http://www.erlang.org/doc/design_principles/applications.html
The Application Resource File http://learnyousomeerlang.com/building-otp-applications
Erlang is a programming language used to build massively scalable soft real-time systems with requirements on high availability. Some of its uses are in telecoms, banking, e-commerce, computer telephony and instant messaging.
Well if you're in the shell of the node you want to turn down, even if it's not receiving input, you can still press Ctrl-g (which takes you to JCL mode). Once there you can use the command q to quit the Erlang shell. This is similar in effect to erlang:halt(0).
The .app
file (in ebin/
) is the file necessary by the Erlang VM to load OTP applications. It must contain fields such as the dependencies of the application, the modules it contains, the version, and so on.
Particularly, the list of modules for the application is tedious to maintain, but there's other stuff that can be dynamically added. People write .app.src
files (in src/
) with the static content filled in so that their build tool of choice (rebar, rebar3, erlang.mk, and so on) can fill in the dynamic parts with what they want, such as the modules found on disk.
This allows for a more streamlined dev process with a lot less stuff to juggle and maintain by hand.
My understanding is that the OTP application should have the application.app file in the ebin directory together with the compiled beam-files.
Keeping an application.app.src file (which would be identical to the one in the ebin directory) in the src directory is optional but can be useful to have the build process generate the application.app file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With