rebar_app_info (rebar v0.0.0+build.5492.ref67808dff)
View SourceSummary
Functions
adds a new profile with its own config to the app data
returns the information stored in the app's app file, or if none, from the .app.src file.
stores the information that would be returned from the app file, when reading from app_details/1.
finds the .app file for an app, if any.
sets the .app file for an app.
finds the .app.src file for an app, if any.
sets the .app.src file for an app. An app without such a file can explicitly be set with undefined.
finds the .app.src.script file for an app, if any.
sets the .app.src.script file for an app. An app without such a file can explicitly be set with undefined.
returns the list of applications the app depends on.
sets the list of applications the app depends on. Should be obtained from the app file.
given a set of override rules, modify the app info accordingly
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
get the dictionary of options under the default profile. Represents a root set prior to applying other profiles.
set the dictionary of options under the default profile. Useful when re-applying profile.
returns the level the app has in the lock files or in the dep tree.
sets the level the app has in the lock files or in the dep tree.
returns the list of dependencies
sets the list of dependencies.
returns the directory that contains the app.
sets the directory that contains the app.
discover a complete version of the app info with all fields set.
gets the directory where ebin files for the app should go
sets the directory where beam files should go
returns the directory to fetch the dep source to
returns the directory to fetch the dep source to
look up a value in the dictionary of options; fails if the key for it does not exist.
look up a value in the dictionary of options; returns a Default value otherwise.
checks whether all the build artifacts for an app to be considered valid are present.
returns the list of included_applications the app depends on.
sets the list of applications the app depends on. Should be obtained from the app file.
returns whether the app source exists in the deps dir
sets whether the app's source is available only set if the app's source is found in the expected dep directory
returns whether the app is a checkout app or not
sets whether the app is a checkout app or not
returns the lock status for the app
sets the lock status for the app
get the name of the app.
set the name of the app.
Build a new, empty, app info value. This is not of a lot of use and you probably won't be doing this much.
Build a new app info value with only the app name set.
Build a new app info value with only the name and version set.
build a complete version of the app info with all fields set.
build a complete version of the app info with all fields set.
build a complete version of the app info with all fields set.
returns the list of optional_applications the app depends on.
sets the list of optional applications the app depends on. Should be obtained from the app file.
get the dictionary of options for the app.
set the dictionary of options for the app.
returns the original version of the app (unevaluated if asking for a semver)
stores the original version of the app (unevaluated if asking for a semver)
returns the directory where build artifacts for the app should go
sets the directory where build artifacts for the app should go
returns the app's parent in the dep tree.
sets the app's parent.
gets the directory where private files for the app should go
returns the list of active profiles
sets the list of active profiles
sets a given value in the dictionary of options for the app.
finds the source specification for the app
sets the source specification for the app
update current app info opts by merging in a new dict of opts
update the opts based on the contents of a config file for the app
update the opts based on new deps, usually from an app's hex registry metadata
returns whether the app is valid (built) or not
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.
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.
returns the version of the app after evaluation
sets the evaluated vsn of the app
Types
-type project_type() :: rebar3 | mix | undefined.
-type rebar_dict() :: dict:dict().
-type 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()}.
Functions
adds a new profile with its own config to the app data
returns the information stored in the app's app file, or if none, from the .app.src file.
stores the information that would be returned from the app file, when reading from app_details/1.
-spec app_file(t()) -> file:filename_all() | undefined.
finds the .app file for an app, if any.
-spec app_file(t(), file:filename_all() | undefined) -> t().
sets the .app file for an app.
-spec app_file_src(t()) -> file:filename_all() | undefined.
finds the .app.src file for an app, if any.
-spec app_file_src(t(), 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.
-spec app_file_src_script(t()) -> file:filename_all() | undefined.
finds the .app.src.script file for an app, if any.
-spec app_file_src_script(t(), 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.
returns the list of applications the app depends on.
sets the list of applications the app depends on. Should be obtained from the app file.
given a set of override rules, modify the app info accordingly
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
-spec default(t()) -> rebar_dict().
get the dictionary of options under the default profile. Represents a root set prior to applying other profiles.
-spec default(t(), rebar_dict()) -> t().
set the dictionary of options under the default profile. Useful when re-applying profile.
-spec dep_level(t()) -> non_neg_integer().
returns the level the app has in the lock files or in the dep tree.
-spec dep_level(t(), non_neg_integer()) -> t().
sets the level the app has in the lock files or in the dep tree.
returns the list of dependencies
sets the list of dependencies.
returns the directory that contains the app.
sets the directory that contains the app.
-spec discover(file:filename_all(), rebar_state:t()) -> {ok, t()} | not_found.
discover a complete version of the app info with all fields set.
gets the directory where ebin files for the app should go
sets the directory where beam files should go
returns the directory to fetch the dep source to
returns the directory to fetch the dep source to
look up a value in the dictionary of options; fails if the key for it does not exist.
look up a value in the dictionary of options; returns a Default value otherwise.
-spec has_all_artifacts(#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.
returns the list of included_applications the app depends on.
sets the list of applications the app depends on. Should be obtained from the app file.
returns whether the app source exists in the deps dir
sets whether the app's source is available only set if the app's source is found in the expected dep directory
returns whether the app is a checkout app or not
sets whether the app is a checkout app or not
returns the lock status for the app
sets the lock status for the app
get the name of the app.
set the name of the app.
-spec 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.
Build a new app info value with only the app name set.
Build a new app info value with only the name and version set.
build a complete version of the app info with all fields set.
build a complete version of the app info with all fields set.
-spec new(atom() | binary(), atom() | binary() | string(), app_vsn(), file:name(), list()) -> {ok, t()}.
build a complete version of the app info with all fields set.
returns the list of optional_applications the app depends on.
sets the list of optional applications the app depends on. Should be obtained from the app file.
-spec opts(t()) -> rebar_dict().
get the dictionary of options for the app.
-spec opts(t(), rebar_dict()) -> t().
set the dictionary of options for the app.
returns the original version of the app (unevaluated if asking for a semver)
stores the original version of the app (unevaluated if asking for a semver)
returns the directory where build artifacts for the app should go
sets the directory where build artifacts for the app should go
returns the app's parent in the dep tree.
sets the app's parent.
gets the directory where private files for the app should go
returns the list of active profiles
sets the list of active profiles
sets a given value in the dictionary of options for the app.
finds the source specification for the app
sets the source specification for the app
-spec update_opts(t(), rebar_dict()) -> t().
update current app info opts by merging in a new dict of opts
-spec update_opts(t(), rebar_dict(), [any()]) -> t().
update the opts based on the contents of a config file for the app
update the opts based on new deps, usually from an app's hex registry metadata
returns whether the app is valid (built) or not
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.
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.
returns the version of the app after evaluation
sets the evaluated vsn of the app