rebar_state (rebar v0.0.0+build.5492.ref67808dff)
View SourceSummary
Functions
register compiler modules. Each compiler module should implement the rebar_compiler behaviour. Use this when your custom compiler generates binary artifacts and does not have a particular need to run before any other compiler.
get a list of all registered compiler modules, which should implement the rebar_compiler behaviour
register compiler modules prior to the existing ones. Each compiler module should implement the rebar_compiler behaviour. Use this when your custom compiler generates .erl files (or files of another type) and that should run before other compiler modules.
Types
-type rebar_dict() :: dict:dict().
-type t() :: #state_t{dir :: file:name(), opts :: rebar_dict(), code_paths :: rebar_dict(), default :: rebar_dict(), escript_path :: undefined | file:filename_all(), lock :: term(), current_profiles :: [atom()], namespace :: atom(), command_args :: term(), command_parsed_args :: term(), current_app :: undefined | rebar_app_info:t(), project_apps :: [rebar_app_info:t()], deps_to_build :: [rebar_app_info:t()], all_plugin_deps :: [rebar_app_info:t()], all_deps :: [rebar_app_info:t()], compilers :: [module()], project_builders :: [{rebar_app_info:project_type(), module()}], resources :: term(), providers :: term(), allow_provider_overrides :: boolean()}.
Functions
-spec add_provider(t(), providers:t()) -> t().
-spec add_resource(t(), {rebar_resource_v2:type(), module()}) -> t().
register compiler modules. Each compiler module should implement the rebar_compiler behaviour. Use this when your custom compiler generates binary artifacts and does not have a particular need to run before any other compiler.
-spec code_paths(#state_t{dir :: file:name(), opts :: rebar_dict(), code_paths :: rebar_dict(), default :: rebar_dict(), escript_path :: undefined | file:filename_all(), lock :: term(), current_profiles :: [atom()], namespace :: atom(), command_args :: term(), command_parsed_args :: term(), current_app :: undefined | rebar_app_info:t(), project_apps :: [rebar_app_info:t()], deps_to_build :: [rebar_app_info:t()], all_plugin_deps :: [rebar_app_info:t()], all_deps :: [rebar_app_info:t()], compilers :: [module()], project_builders :: [{rebar_app_info:project_type(), module()}], resources :: term(), providers :: term(), allow_provider_overrides :: boolean()}, atom()) -> [file:filename()].
-spec code_paths(#state_t{dir :: file:name(), opts :: rebar_dict(), code_paths :: rebar_dict(), default :: rebar_dict(), escript_path :: undefined | file:filename_all(), lock :: term(), current_profiles :: [atom()], namespace :: atom(), command_args :: term(), command_parsed_args :: term(), current_app :: undefined | rebar_app_info:t(), project_apps :: [rebar_app_info:t()], deps_to_build :: [rebar_app_info:t()], all_plugin_deps :: [rebar_app_info:t()], all_deps :: [rebar_app_info:t()], compilers :: [module()], project_builders :: [{rebar_app_info:project_type(), module()}], resources :: term(), providers :: term(), allow_provider_overrides :: boolean()}, atom(), [file:filename()]) -> #state_t{dir :: file:name(), opts :: rebar_dict(), code_paths :: rebar_dict(), default :: rebar_dict(), escript_path :: undefined | file:filename_all(), lock :: term(), current_profiles :: [atom()], namespace :: atom(), command_args :: term(), command_parsed_args :: term(), current_app :: undefined | rebar_app_info:t(), project_apps :: [rebar_app_info:t()], deps_to_build :: [rebar_app_info:t()], all_plugin_deps :: [rebar_app_info:t()], all_deps :: [rebar_app_info:t()], compilers :: [module()], project_builders :: [{rebar_app_info:project_type(), module()}], resources :: term(), providers :: term(), allow_provider_overrides :: boolean()}.
get a list of all registered compiler modules, which should implement the rebar_compiler behaviour
-spec has_all_artifacts(#state_t{dir :: file:name(), opts :: rebar_dict(), code_paths :: rebar_dict(), default :: rebar_dict(), escript_path :: undefined | file:filename_all(), lock :: term(), current_profiles :: [atom()], namespace :: atom(), command_args :: term(), command_parsed_args :: term(), current_app :: undefined | rebar_app_info:t(), project_apps :: [rebar_app_info:t()], deps_to_build :: [rebar_app_info:t()], all_plugin_deps :: [rebar_app_info:t()], all_deps :: [rebar_app_info:t()], compilers :: [module()], project_builders :: [{rebar_app_info:project_type(), module()}], resources :: term(), providers :: term(), allow_provider_overrides :: boolean()}) -> true | {false, file:filename()}.
-spec new() -> t().
-spec new(t(), list(), file:filename_all()) -> t().
register compiler modules prior to the existing ones. Each compiler module should implement the rebar_compiler behaviour. Use this when your custom compiler generates .erl files (or files of another type) and that should run before other compiler modules.
-spec resources(t()) -> [{rebar_resource_v2:type(), module()}].
-spec resources(t(), [{rebar_resource_v2:type(), module()}]) -> t().
-spec set_resources(t(), [{rebar_resource_v2:type(), module()}]) -> t().
-spec update_code_paths(#state_t{dir :: file:name(), opts :: rebar_dict(), code_paths :: rebar_dict(), default :: rebar_dict(), escript_path :: undefined | file:filename_all(), lock :: term(), current_profiles :: [atom()], namespace :: atom(), command_args :: term(), command_parsed_args :: term(), current_app :: undefined | rebar_app_info:t(), project_apps :: [rebar_app_info:t()], deps_to_build :: [rebar_app_info:t()], all_plugin_deps :: [rebar_app_info:t()], all_deps :: [rebar_app_info:t()], compilers :: [module()], project_builders :: [{rebar_app_info:project_type(), module()}], resources :: term(), providers :: term(), allow_provider_overrides :: boolean()}, atom(), [file:filename()]) -> #state_t{dir :: file:name(), opts :: rebar_dict(), code_paths :: rebar_dict(), default :: rebar_dict(), escript_path :: undefined | file:filename_all(), lock :: term(), current_profiles :: [atom()], namespace :: atom(), command_args :: term(), command_parsed_args :: term(), current_app :: undefined | rebar_app_info:t(), project_apps :: [rebar_app_info:t()], deps_to_build :: [rebar_app_info:t()], all_plugin_deps :: [rebar_app_info:t()], all_deps :: [rebar_app_info:t()], compilers :: [module()], project_builders :: [{rebar_app_info:project_type(), module()}], resources :: term(), providers :: term(), allow_provider_overrides :: boolean()}.