What is the difference between .app and .app.src files in Erlang?

I found this description in an Erlang document and learnyousomeerlang.com, but not sure which one is the "Application Resource File". When should you use .app and .app.src?

7.3 Application Resource File http://www.erlang.org/doc/design_principles/applications.html

Application Resource File http://learnyousomeerlang.com/building-otp-applications

+7
erlang
source share
2 answers

The .app file (in ebin/ ) is the file needed by the Erlang virtual machine to download OTP applications. It should contain such fields as application dependencies, modules contained in it, version, etc.

In particular, the list of modules for the application is tedious to maintain, but there are other materials that can be dynamically added. People write .app.src files (in src/ ) with static content filled in, so their elective tool (rebar, rebar, erlang.mk, etc.) can fill the dynamic parts with what they want, such as modules, found on disk.

This allows a more streamlined dev process with much less material to be manipulated and maintained manually.

+10
source share

I understand that an OTP application must have an application.app file in the ebin directory along with compiled ray files.

Saving the application.app.src file (which would be identical to the ebin directory file) in the src directory is optional, but it may be useful for the build process to generate the application.app file.

+2
source share

All Articles