Module rebar_api

Packages rebar.hrl features and macros into a more generic API that can be used by plugin builders.

Description

Packages rebar.hrl features and macros into a more generic API that can be used by plugin builders.

Data Types

rebar_dict()

rebar_dict() = dict:dict()

rebar_digraph()

rebar_digraph() = digraph:graph()

Function Index

abort/0Interrupts program flow.
abort/2like error/2, except it also raises an exception to interrupt program flow.
add_deps_to_path/1Add deps to the code path.
console/2Prints to the console, including a newline.
debug/2logs with severity debug
error/2logs with severity error
expand_env_variable/3Given env.
get_arch/0returns the system architecture, in strings like "19.0.4-x86_64-unknown-linux-gnu-64".
info/2logs with severity info
processing_base_dir/1checks if the current working directory is the base directory for the project.
restore_code_path/1Revert to only having the beams necessary for running rebar3 and plugins in the path.
set_paths/2Set code paths.
ssl_opts/1returns the SSL options adequate for the project based on its configuration, including for validation of certs.
unset_paths/2Unsets code paths.
warn/2logs with severity warn
wordsize/0returns the size of a word on the system, as a string.

Function Details

abort/0

abort() -> no_return()

Interrupts program flow

abort/2

abort(Str::string(), Args::list()) -> no_return()

like error/2, except it also raises an exception to interrupt program flow.

add_deps_to_path/1

add_deps_to_path(State::rebar_state:t()) -> ok

Add deps to the code path

console/2

console(Str::string(), Args::list()) -> ok

Prints to the console, including a newline

debug/2

debug(Str::string(), Args::list()) -> ok

logs with severity debug

error/2

error(Str::string(), Args::list()) -> ok

logs with severity error

expand_env_variable/3

expand_env_variable(InStr::string(), VarName::string(), RawVarValue::term()) -> string()

Given env. variable FOO we want to expand all references to it in InStr. References can have two forms: $FOO and ${FOO} The end of form $FOO is delimited with whitespace or EOL

get_arch/0

get_arch() -> string()

returns the system architecture, in strings like "19.0.4-x86_64-unknown-linux-gnu-64".

info/2

info(Str::string(), Args::list()) -> ok

logs with severity info

processing_base_dir/1

processing_base_dir(State::rebar_state:t()) -> boolean()

checks if the current working directory is the base directory for the project.

restore_code_path/1

restore_code_path(State::rebar_state:t()) -> true | {error, term()}

Revert to only having the beams necessary for running rebar3 and plugins in the path

set_paths/2

set_paths(List::rebar_paths:targets(), State::rebar_state:t()) -> ok

Set code paths. Takes arguments of the form [plugins, deps] or [deps, plugins] and ensures the project's app and dependencies are set in the right order for the next bit of execution

ssl_opts/1

ssl_opts(Url::string() | binary()) -> [term()]

returns the SSL options adequate for the project based on its configuration, including for validation of certs.

unset_paths/2

unset_paths(List::rebar_paths:targets(), State::rebar_state:t()) -> ok

Unsets code paths. Takes arguments of the form [plugins, deps] or [deps, plugins] and ensures the paths are no longer active.

warn/2

warn(Str::string(), Args::list()) -> ok

logs with severity warn

wordsize/0

wordsize() -> string()

returns the size of a word on the system, as a string


Generated by EDoc