Default Variables Global Variables Batteries-Included Templates Custom Templates Plugin Templates Default Variables date: defaults to today’s date, under universal time, printed according to ISO 8601 (for example, "2014-03-11") datetime: defaults to today’s date and time, under universal time, printed according to ISO 8601 (for example, "2014-03-11T16:06:02+00:00"). author_name: Defaults to "Anonymous" author_email: Defaults to "anonymous@example.org" apps_dir: Directory where OTP applica...| Rebar3 – Rebar3 Tutorials
🚧No port compiler In Rebar3 it is required to have either a Makefile or other instructions for building your C/C++ code outside of Rebar3 itself. Using the Makefile Template We’ll start by making a new lib named test_nif and then using the cmake template from the root of the test_nif project. $ rebar3 new lib test_nif ===> Writing test_nif/src/test_nif.erl ===> Writing test_nif/src/test_nif.app.src ===> Writing test_nif/rebar.config ===> Writing test_nif/.gitignore ===> Writing test_nif/...| Rebar3 – Rebar3 Tutorials
The Problem When debugging Erlang applications, it is frequent that additional output is required to understand what is going on. Standard ways to do this include: adding print statement debugging with io:format/2-3 (or with ct:pal/2 in common test) turning on sys module tracing with OTP processes to show more outputs trying to attach a debugger The problem with a debugger is that it can be really difficult to properly observe what goes on in a running system with timers involved; similarly, ...| Rebar3 – Rebar3 Tutorials
Rebar3 changes quite a few things from rebar 2.x. By and far, Rebar3 attempts to keep full compatibility when handling OTP applications written in pure Erlang. People who built or wrote standard OTP apps will therefore see very few incompatibilities, although the ground still needs to be prepared. Major changes include (but are not limited to) moving all build artifacts to _build, and changing the way dependencies are fetched. Pure Erlang, Standard OTP Applications The first step to convertin...| www.rebar3.org
Rebar3’s system is based on the concept of providers. A provider has three callbacks: init(State) -> {ok, NewState}, which helps set up the state required, state dependencies, etc. do(State) -> {ok, NewState} | {error, Error}, which does the actual work. format_error(Error) -> String, which prints errors when they happen, and to filter out sensitive elements from the state. A provider should also be an OTP Library application, which can be fetched as any other Erlang dependency, except for ...| www.rebar3.org