Module rebar_app_info

Data Types

app_vsn()

app_vsn() = binary() | string() | {git, short} | {git, long}

project_type()

project_type() = rebar3 | mix | undefined

rebar_dict()

rebar_dict() = dict:dict()

t()

t() = #app_info_t{name = binary() | undefined, app_file_src = file:filename_all() | undefined, app_file_src_script = file:filename_all() | undefined, app_file = file:filename_all() | undefined, original_vsn = app_vsn() | undefined, vsn = app_vsn() | undefined, parent = binary() | root, app_details = list(), applications = list(), included_applications = [atom()], optional_applications = [atom()], deps = list(), profiles = [atom()], default = rebar_dict(), opts = rebar_dict(), dep_level = integer(), fetch_dir = file:name(), dir = file:name(), out_dir = file:name(), ebin_dir = file:name(), source = string() | tuple() | checkout | undefined, is_lock = boolean(), is_checkout = boolean(), valid = boolean() | undefined, project_type = project_type(), is_available = boolean()}

Function Index

add_to_profile/3adds a new profile with its own config to the app data.
app_details/1returns the information stored in the app's app file, or if none, from the .app.src file.
app_details/2stores the information that would be returned from the app file, when reading from app_details/1.
app_file/1finds the .app file for an app, if any.
app_file/2sets the .app file for an app.
app_file_src/1finds the .app.src file for an app, if any.
app_file_src/2sets the .app.src file for an app.
app_file_src_script/1finds the .app.src.script file for an app, if any.
app_file_src_script/2sets the .app.src.script file for an app.
app_to_map/1
applications/1returns the list of applications the app depends on.
applications/2sets the list of applications the app depends on.
apply_overrides/2given a set of override rules, modify the app info accordingly.
apply_profiles/2applies and merges the profile configuration in the specified order of profiles (or for a single profile) and returns an app info record with the resulting configuration.
default/1get the dictionary of options under the default profile.
default/2set the dictionary of options under the default profile.
dep_level/1returns the level the app has in the lock files or in the dep tree.
dep_level/2sets the level the app has in the lock files or in the dep tree.
deps/1returns the list of dependencies.
deps/2sets the list of dependencies.
dir/1returns the directory that contains the app.
dir/2sets the directory that contains the app.
discover/2discover a complete version of the app info with all fields set.
ebin_dir/1gets the directory where ebin files for the app should go.
ebin_dir/2sets the directory where beam files should go.
fetch_dir/1returns the directory to fetch the dep source to.
fetch_dir/2returns the directory to fetch the dep source to.
get/2look up a value in the dictionary of options; fails if the key for it does not exist.
get/3look up a value in the dictionary of options; returns a Default value otherwise.
has_all_artifacts/1checks whether all the build artifacts for an app to be considered valid are present.
included_applications/1returns the list of included_applications the app depends on.
included_applications/2sets the list of applications the app depends on.
is_available/1returns whether the app source exists in the deps dir.
is_available/2sets whether the app's source is available only set if the app's source is found in the expected dep directory.
is_checkout/1returns whether the app is a checkout app or not.
is_checkout/2sets whether the app is a checkout app or not.
is_lock/1returns the lock status for the app.
is_lock/2sets the lock status for the app.
name/1get the name of the app.
name/2set the name of the app.
new/0Build a new, empty, app info value.
new/1Build a new app info value with only the app name set.
new/2Build a new app info value with only the name and version set.
new/3build a complete version of the app info with all fields set.
new/4build a complete version of the app info with all fields set.
new/5build a complete version of the app info with all fields set.
optional_applications/1returns the list of optional_applications the app depends on.
optional_applications/2sets the list of optional applications the app depends on.
opts/1get the dictionary of options for the app.
opts/2set the dictionary of options for the app.
original_vsn/1returns the original version of the app (unevaluated if asking for a semver).
original_vsn/2stores the original version of the app (unevaluated if asking for a semver).
out_dir/1returns the directory where build artifacts for the app should go.
out_dir/2sets the directory where build artifacts for the app should go.
parent/1returns the app's parent in the dep tree.
parent/2sets the app's parent.
priv_dir/1gets the directory where private files for the app should go.
profiles/1returns the list of active profiles.
profiles/2sets the list of active profiles.
project_type/1
project_type/2
set/3sets a given value in the dictionary of options for the app.
source/1finds the source specification for the app.
source/2sets the source specification for the app.
update_opts/2update current app info opts by merging in a new dict of opts.
update_opts/3update the opts based on the contents of a config file for the app.
update_opts_deps/2update the opts based on new deps, usually from an app's hex registry metadata.
valid/1returns whether the app is valid (built) or not.
valid/2sets whether the app is valid (built) or not.
verify_otp_vsn/1checks whether the app can be built with the current Erlang/OTP version.
vsn/1returns the version of the app after evaluation.
vsn/2sets the evaluated vsn of the app.

Function Details

add_to_profile/3

add_to_profile(AppInfo::t(), Profile::atom(), KVs::[{term(), term()}]) -> t()

adds a new profile with its own config to the app data

app_details/1

app_details(AppInfo::t()) -> list()

returns the information stored in the app's app file, or if none, from the .app.src file.

app_details/2

app_details(AppInfo::t(), AppDetails::list()) -> t()

stores the information that would be returned from the app file, when reading from app_details/1.

app_file/1

app_file(App_info_t::t()) -> file:filename_all() | undefined

finds the .app file for an app, if any.

app_file/2

app_file(AppInfo::t(), AppFile::file:filename_all() | undefined) -> t()

sets the .app file for an app.

app_file_src/1

app_file_src(App_info_t::t()) -> file:filename_all() | undefined

finds the .app.src file for an app, if any.

app_file_src/2

app_file_src(AppInfo::t(), AppFileSrc::file:filename_all() | undefined) -> t()

sets the .app.src file for an app. An app without such a file can explicitly be set with undefined.

app_file_src_script/1

app_file_src_script(App_info_t::t()) -> file:filename_all() | undefined

finds the .app.src.script file for an app, if any.

app_file_src_script/2

app_file_src_script(AppInfo::t(), AppFileSrcScript::file:filename_all()) -> t()

sets the .app.src.script file for an app. An app without such a file can explicitly be set with undefined.

app_to_map/1

app_to_map(App_info_t::t()) -> #{name := atom(), vsn := app_vsn(), applications := [atom()], included_applications := [atom()], optional_applications := [atom()], dir := file:name(), out_dir := file:name(), ebin_dir := file:name(), link := false}

applications/1

applications(App_info_t::t()) -> list()

returns the list of applications the app depends on.

applications/2

applications(AppInfo::t(), Applications::list()) -> t()

sets the list of applications the app depends on. Should be obtained from the app file.

apply_overrides/2

apply_overrides(Overrides::list(), AppInfo::t()) -> t()

given a set of override rules, modify the app info accordingly

apply_profiles/2

apply_profiles(AppInfo::t(), Profile::atom() | [atom(), ...]) -> t()

applies and merges the profile configuration in the specified order of profiles (or for a single profile) and returns an app info record with the resulting configuration

default/1

default(App_info_t::t()) -> rebar_dict()

get the dictionary of options under the default profile. Represents a root set prior to applying other profiles.

default/2

default(AppInfo::t(), Default::rebar_dict()) -> t()

set the dictionary of options under the default profile. Useful when re-applying profile.

dep_level/1

dep_level(App_info_t::t()) -> non_neg_integer()

returns the level the app has in the lock files or in the dep tree.

dep_level/2

dep_level(AppInfo::t(), Level::non_neg_integer()) -> t()

sets the level the app has in the lock files or in the dep tree.

deps/1

deps(App_info_t::t()) -> list()

returns the list of dependencies

deps/2

deps(AppInfo::t(), Deps::list()) -> t()

sets the list of dependencies.

dir/1

dir(App_info_t::t()) -> file:name()

returns the directory that contains the app.

dir/2

dir(AppInfo::t(), Dir::file:name()) -> t()

sets the directory that contains the app.

discover/2

discover(Dir::file:filename_all(), State::rebar_state:t()) -> {ok, t()} | not_found

discover a complete version of the app info with all fields set.

ebin_dir/1

ebin_dir(App_info_t::t()) -> file:name()

gets the directory where ebin files for the app should go

ebin_dir/2

ebin_dir(AppInfo::t(), EbinDir::file:name()) -> t()

sets the directory where beam files should go

fetch_dir/1

fetch_dir(App_info_t::t()) -> file:name()

returns the directory to fetch the dep source to

fetch_dir/2

fetch_dir(AppInfo::t(), FetchDir::file:name()) -> t()

returns the directory to fetch the dep source to

get/2

get(AppInfo::t(), Key::term()) -> term()

look up a value in the dictionary of options; fails if the key for it does not exist.

get/3

get(AppInfo::t(), Key::term(), Default::term()) -> term()

look up a value in the dictionary of options; returns a Default value otherwise.

has_all_artifacts/1

has_all_artifacts(App_info_t::#app_info_t{name = binary() | undefined, app_file_src = file:filename_all() | undefined, app_file_src_script = file:filename_all() | undefined, app_file = file:filename_all() | undefined, original_vsn = app_vsn() | undefined, vsn = app_vsn() | undefined, parent = binary() | root, app_details = list(), applications = list(), included_applications = [atom()], optional_applications = [atom()], deps = list(), profiles = [atom()], default = rebar_dict(), opts = rebar_dict(), dep_level = integer(), fetch_dir = file:name(), dir = file:name(), out_dir = file:name(), ebin_dir = file:name(), source = string() | tuple() | checkout | undefined, is_lock = boolean(), is_checkout = boolean(), valid = boolean() | undefined, project_type = project_type(), is_available = boolean()}) -> true | {false, file:filename()}

checks whether all the build artifacts for an app to be considered valid are present.

included_applications/1

included_applications(App_info_t::t()) -> list()

returns the list of included_applications the app depends on.

included_applications/2

included_applications(AppInfo::t(), Applications::list()) -> t()

sets the list of applications the app depends on. Should be obtained from the app file.

is_available/1

is_available(App_info_t::t()) -> boolean()

returns whether the app source exists in the deps dir

is_available/2

is_available(AppInfo::t(), IsAvailable::boolean()) -> t()

sets whether the app's source is available only set if the app's source is found in the expected dep directory

is_checkout/1

is_checkout(App_info_t::t()) -> boolean()

returns whether the app is a checkout app or not

is_checkout/2

is_checkout(AppInfo::t(), IsCheckout::boolean()) -> t()

sets whether the app is a checkout app or not

is_lock/1

is_lock(App_info_t::t()) -> boolean()

returns the lock status for the app

is_lock/2

is_lock(AppInfo::t(), IsLock::boolean()) -> t()

sets the lock status for the app

name/1

name(App_info_t::t()) -> binary()

get the name of the app.

name/2

name(AppInfo::t(), AppName::atom() | binary() | string()) -> t()

set the name of the app.

new/0

new() -> t()

Build a new, empty, app info value. This is not of a lot of use and you probably won't be doing this much.

new/1

new(AppName::atom() | binary() | string()) -> {ok, t()}

Build a new app info value with only the app name set.

new/2

new(AppName::atom() | binary() | string(), Vsn::app_vsn()) -> {ok, t()}

Build a new app info value with only the name and version set.

new/3

new(AppName::atom() | binary() | string(), Vsn::app_vsn(), Dir::file:name()) -> {ok, t()}

build a complete version of the app info with all fields set.

new/4

new(AppName::atom() | binary() | string(), Vsn::app_vsn(), Dir::file:name(), Deps::list()) -> {ok, t()}

build a complete version of the app info with all fields set.

new/5

new(Parent::atom() | binary(), AppName::atom() | binary() | string(), Vsn::app_vsn(), Dir::file:name(), Deps::list()) -> {ok, t()}

build a complete version of the app info with all fields set.

optional_applications/1

optional_applications(App_info_t::t()) -> list()

returns the list of optional_applications the app depends on.

optional_applications/2

optional_applications(AppInfo::t(), Applications::list()) -> t()

sets the list of optional applications the app depends on. Should be obtained from the app file.

opts/1

opts(App_info_t::t()) -> rebar_dict()

get the dictionary of options for the app.

opts/2

opts(AppInfo::t(), Opts::rebar_dict()) -> t()

set the dictionary of options for the app.

original_vsn/1

original_vsn(App_info_t::t()) -> app_vsn()

returns the original version of the app (unevaluated if asking for a semver)

original_vsn/2

original_vsn(AppInfo::t(), Vsn::app_vsn()) -> t()

stores the original version of the app (unevaluated if asking for a semver)

out_dir/1

out_dir(App_info_t::t()) -> file:name()

returns the directory where build artifacts for the app should go

out_dir/2

out_dir(AppInfo::t(), OutDir::file:name()) -> t()

sets the directory where build artifacts for the app should go

parent/1

parent(App_info_t::t()) -> root | binary()

returns the app's parent in the dep tree.

parent/2

parent(AppInfo::t(), Parent::binary() | root) -> t()

sets the app's parent.

priv_dir/1

priv_dir(App_info_t::t()) -> file:name()

gets the directory where private files for the app should go

profiles/1

profiles(App_info_t::t()) -> list()

returns the list of active profiles

profiles/2

profiles(AppInfo::t(), Profiles::list()) -> t()

sets the list of active profiles

project_type/1

project_type(App_info_t::t()) -> atom()

project_type/2

project_type(AppInfo::t(), ProjectType::atom()) -> t()

set/3

set(AppInfo::t(), Key::any(), Value::any()) -> t()

sets a given value in the dictionary of options for the app.

source/1

source(App_info_t::t()) -> string() | tuple() | checkout | undefined

finds the source specification for the app

source/2

source(AppInfo::t(), Source::string() | tuple() | checkout | undefined) -> t()

sets the source specification for the app

update_opts/2

update_opts(AppInfo::t(), Opts::rebar_dict()) -> t()

update current app info opts by merging in a new dict of opts

update_opts/3

update_opts(AppInfo::t(), Opts::rebar_dict(), Config::[any()]) -> t()

update the opts based on the contents of a config file for the app

update_opts_deps/2

update_opts_deps(AppInfo::t(), Deps::[any()]) -> t()

update the opts based on new deps, usually from an app's hex registry metadata

valid/1

valid(AppInfo::t()) -> boolean()

returns whether the app is valid (built) or not

valid/2

valid(AppInfo::t(), Valid::boolean() | undefined) -> t()

sets whether the app is valid (built) or not. If left unset, rebar3 will do the detection of the status itself. Explicitly setting the value to undefined can force a re-evaluation.

verify_otp_vsn/1

verify_otp_vsn(AppInfo::t()) -> ok | no_return()

checks whether the app can be built with the current Erlang/OTP version. If the check fails, the function raises an exception and displays an error.

vsn/1

vsn(App_info_t::t()) -> app_vsn()

returns the version of the app after evaluation

vsn/2

vsn(AppInfo::t(), Vsn::app_vsn()) -> t()

sets the evaluated vsn of the app


Generated by EDoc