From ae8298203952dd631e573668ccd5eb6655538c46 Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 21 Nov 2012 10:07:40 -0500 Subject: minor cleanup and refactoring for rcl_prv_assembler, rcl_prv_discover Signed-off-by: Jordan Wilberding --- src/rcl_prv_assembler.erl | 2 -- src/rcl_prv_discover.erl | 20 ++++++++++---------- 2 files changed, 10 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/rcl_prv_assembler.erl b/src/rcl_prv_assembler.erl index a118b12..59d9946 100644 --- a/src/rcl_prv_assembler.erl +++ b/src/rcl_prv_assembler.erl @@ -73,8 +73,6 @@ format_error({release_script_generation_error, Module, Errors}) -> ["Errors generating release \n", rcl_util:indent(1), Module:format_error(Errors)]. - - %%%=================================================================== %%% Internal Functions %%%=================================================================== diff --git a/src/rcl_prv_discover.erl b/src/rcl_prv_discover.erl index 23a3937..82f138b 100644 --- a/src/rcl_prv_discover.erl +++ b/src/rcl_prv_discover.erl @@ -49,7 +49,17 @@ do(State) -> ["Resolving OTP Applications from directories:\n", [[rcl_util:indent(1), LibDir, "\n"] || LibDir <- LibDirs]] end), + resolve_app_metadata(State, LibDirs, OutputDir). +-spec format_error([ErrorDetail::term()]) -> iolist(). +format_error(ErrorDetails) + when erlang:is_list(ErrorDetails) -> + [[format_detail(ErrorDetail), "\n"] || ErrorDetail <- ErrorDetails]. + +%%%=================================================================== +%%% Internal Functions +%%%=================================================================== +resolve_app_metadata(State, LibDirs, OutputDir) -> AppMeta0 = lists:flatten(ec_plists:map(fun(LibDir) -> discover_dir([OutputDir], LibDir) @@ -66,9 +76,6 @@ do(State) -> false end], - lists:filter(fun({error, _}) -> true; - (_) -> false - end, AppMeta0), case Errors of [] -> AppMeta1 = lists:flatten(AppMeta0), @@ -82,14 +89,7 @@ do(State) -> ?RCL_ERROR(Errors) end. --spec format_error([ErrorDetail::term()]) -> iolist(). -format_error(ErrorDetails) - when erlang:is_list(ErrorDetails) -> - [[format_detail(ErrorDetail), "\n"] || ErrorDetail <- ErrorDetails]. -%%%=================================================================== -%%% Internal Functions -%%%=================================================================== get_lib_dirs(State) -> LibDirs0 = rcl_state:lib_dirs(State), add_rebar_deps_dir(State, LibDirs0). -- cgit v1.2.3 From 79ae49d3c415627ff8e399e78828f373f38ec27a Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 21 Nov 2012 12:16:01 -0500 Subject: support a new 'link' field in rcl_app_info Signed-off-by: Jordan Wilberding --- src/rcl_app_info.erl | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/rcl_app_info.erl b/src/rcl_app_info.erl index d0192e6..bc64e30 100644 --- a/src/rcl_app_info.erl +++ b/src/rcl_app_info.erl @@ -49,6 +49,8 @@ active_deps/2, library_deps/1, library_deps/2, + link/1, + link/2, format_error/1, format/2, format/1]). @@ -60,6 +62,7 @@ -record(app_info_t, {name :: atom(), vsn :: ec_semver:semver(), dir :: file:name(), + link=false :: boolean(), active_deps :: [atom()], library_deps :: [atom()]}). @@ -80,7 +83,13 @@ new() -> %% @doc build a complete version of the app info with all fields set. -spec new(atom(), string(), file:name(), [atom()], [atom()]) -> {ok, t()} | relcool:error(). -new(AppName, Vsn, Dir, ActiveDeps, LibraryDeps) +new(AppName, Vsn, Dir, ActiveDeps, LibraryDeps) -> + new(AppName, Vsn, Dir, ActiveDeps, LibraryDeps, false). + +%% @doc build a complete version of the app info with all fields set. +-spec new(atom(), string(), file:name(), [atom()], [atom()], boolean()) -> + {ok, t()} | relcool:error(). +new(AppName, Vsn, Dir, ActiveDeps, LibraryDeps, Link) when erlang:is_atom(AppName), erlang:is_list(Dir), erlang:is_list(ActiveDeps), @@ -91,7 +100,8 @@ new(AppName, Vsn, Dir, ActiveDeps, LibraryDeps) ParsedVsn -> {ok, #app_info_t{name=AppName, vsn=ParsedVsn, dir=Dir, active_deps=ActiveDeps, - library_deps=LibraryDeps}} + library_deps=LibraryDeps, + link=Link}} end. -spec name(t()) -> atom(). @@ -145,6 +155,14 @@ library_deps(AppInfo=#app_info_t{}, LibraryDeps) when erlang:is_list(LibraryDeps) -> AppInfo#app_info_t{library_deps=LibraryDeps}. +-spec link(t()) -> boolean(). +link(#app_info_t{link=Link}) -> + Link. + +-spec link(t(), boolean()) -> t(). +link(AppInfo, NewLink) -> + AppInfo#app_info_t{link=NewLink}. + -spec format_error(Reason::term()) -> iolist(). format_error({vsn_parse, AppName}) -> io_lib:format("Error parsing version for ~p", @@ -156,9 +174,11 @@ format(AppInfo) -> -spec format(non_neg_integer(), t()) -> iolist(). format(Indent, #app_info_t{name=Name, vsn=Vsn, dir=Dir, - active_deps=Deps, library_deps=LibDeps}) -> + active_deps=Deps, library_deps=LibDeps, + link=Link}) -> [rcl_util:indent(Indent), erlang:atom_to_list(Name), "-", ec_semver:format(Vsn), ": ", Dir, "\n", + rcl_util:indent(Indent + 1), "Symlink: ", erlang:atom_to_list(Link), "\n", rcl_util:indent(Indent + 1), "Active Dependencies:\n", [[rcl_util:indent(Indent + 2), erlang:atom_to_list(Dep), ",\n"] || Dep <- Deps], rcl_util:indent(Indent + 1), "Library Dependencies:\n", -- cgit v1.2.3 From 15e39a9370ffa842e3ee64a8f7f1d64dd25b2130 Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 21 Nov 2012 14:32:50 -0500 Subject: support specifing overrides in the configuration Signed-off-by: Jordan Wilberding --- src/rcl_prv_config.erl | 3 ++- src/rcl_state.erl | 14 ++++++++++++++ src/relcool.erl | 16 ++++++++++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/rcl_prv_config.erl b/src/rcl_prv_config.erl index 7a1cd19..ee1c770 100644 --- a/src/rcl_prv_config.erl +++ b/src/rcl_prv_config.erl @@ -82,7 +82,8 @@ load_terms({add_providers, Providers0}, {ok, State0}) -> ExistingProviders = rcl_state:providers(State1), {ok, rcl_state:providers(State1, ExistingProviders ++ Providers3)} end; - +load_terms({overrides, Overrides0}, {ok, State0}) -> + {ok, rcl_state:overrides(State0, Overrides0)}; load_terms({release, {RelName, Vsn}, Applications}, {ok, State0}) -> Release0 = rcl_release:new(RelName, Vsn), case rcl_release:goals(Release0, Applications) of diff --git a/src/rcl_state.erl b/src/rcl_state.erl index 46c91c7..7397e6f 100644 --- a/src/rcl_state.erl +++ b/src/rcl_state.erl @@ -27,6 +27,8 @@ log/1, output_dir/1, lib_dirs/1, + overrides/1, + overrides/2, goals/1, config_files/1, providers/1, @@ -64,6 +66,7 @@ available_apps = [] :: [rcl_app_info:t()], default_release :: {rcl_release:name(), rcl_release:vsn()}, sys_config :: file:filename() | undefined, + overrides :: [{AppName::atom(), Directory::file:filename()}], releases :: ec_dictionary:dictionary({ReleaseName::atom(), ReleaseVsn::string()}, rcl_release:t()), @@ -96,10 +99,21 @@ new(PropList, Targets) when erlang:is_list(PropList) -> providers = [], releases=ec_dictionary:new(ec_dict), config_values=ec_dictionary:new(ec_dict), + overrides = proplists:get_value(overrides, PropList, []), default_release={proplists:get_value(relname, PropList, undefined), proplists:get_value(relvsn, PropList, undefined)}}, create_logic_providers(State0). +%% @doc the application overrides for the system +-spec overrides(t()) -> [{AppName::atom(), Directory::file:filename()}]. +overrides(#state_t{overrides=Overrides}) -> + Overrides. + +%% @doc the application overrides for the system +-spec overrides(t(), [{AppName::atom(), Directory::file:filename()}]) -> t(). +overrides(State, Overrides) -> + State#state_t{overrides=Overrides}. + %% @doc get the current log state for the system -spec log(t()) -> rcl_log:t(). log(#state_t{log=LogState}) -> diff --git a/src/relcool.erl b/src/relcool.erl index 44debc9..1c3ec02 100644 --- a/src/relcool.erl +++ b/src/relcool.erl @@ -22,6 +22,7 @@ -export([main/1, do/7, + do/8, format_error/1, opt_spec_list/0]). @@ -59,15 +60,30 @@ main(Args) -> %% @param OutputDir - The directory where the release should be built to %% @param Configs - The list of config files for the system do(RelName, RelVsn, Goals, LibDirs, LogLevel, OutputDir, Configs) -> + do(RelName, RelVsn, Goals, LibDirs, LogLevel, OutputDir, [], Configs). + +%% @doc provides an API to run the Relcool process from erlang applications +%% +%% @param RelName - The release name to build (maybe `undefined`) +%% @param RelVsn - The release version to build (maybe `undefined`) +%% @param Goals - The release goals for the system in depsolver or Relcool goal +%% format +%% @param LibDirs - The library dirs that should be used for the system +%% @param OutputDir - The directory where the release should be built to +%% @param Overrides - A list of overrides for the system +%% @param Configs - The list of config files for the system +do(RelName, RelVsn, Goals, LibDirs, LogLevel, OutputDir, Overrides, Configs) -> State = rcl_state:new([{relname, RelName}, {relvsn, RelVsn}, {goals, Goals}, + {overrides, Overrides}, {output_dir, OutputDir}, {lib_dirs, LibDirs}, {log, rcl_log:new(LogLevel)}], Configs), run_relcool_process(rcl_state:caller(State, api)). + -spec opt_spec_list() -> [getopt:option_spec()]. opt_spec_list() -> [ -- cgit v1.2.3 From 85bd84de42e29d3c222757a6d211483114851e79 Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 21 Nov 2012 14:33:44 -0500 Subject: rcl_prv_discover now supports setting up 'link' type app_info messages Signed-off-by: Jordan Wilberding --- src/rcl_prv_discover.erl | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/rcl_prv_discover.erl b/src/rcl_prv_discover.erl index 82f138b..0a12d24 100644 --- a/src/rcl_prv_discover.erl +++ b/src/rcl_prv_discover.erl @@ -64,11 +64,13 @@ resolve_app_metadata(State, LibDirs, OutputDir) -> discover_dir([OutputDir], LibDir) end, LibDirs)), + AppMeta1 = setup_overrides(State, AppMeta0), + Errors = [case El of {error, Ret} -> Ret; _ -> El end - || El <- AppMeta0, + || El <- AppMeta1, case El of {error, _} -> true; @@ -78,17 +80,35 @@ resolve_app_metadata(State, LibDirs, OutputDir) -> case Errors of [] -> - AppMeta1 = lists:flatten(AppMeta0), + AppMeta2 = lists:flatten(AppMeta1), rcl_log:debug(rcl_state:log(State), fun() -> ["Resolved the following OTP Applications from the system: \n", - [[rcl_app_info:format(1, App), "\n"] || App <- AppMeta1]] + [[rcl_app_info:format(1, App), "\n"] || App <- AppMeta2]] end), - {ok, rcl_state:available_apps(State, AppMeta1)}; + {ok, rcl_state:available_apps(State, AppMeta2)}; _ -> ?RCL_ERROR(Errors) end. +app_name({error, _}) -> + undefined; +app_name(AppMeta) -> + rcl_app_info:name(AppMeta). + +setup_overrides(State, AppMetas0) -> + Overrides = rcl_state:overrides(State), + AppMetas1 = [AppMeta || AppMeta <- AppMetas0, + not lists:keymember(app_name(AppMeta), 1, Overrides)], + [case is_valid_otp_app(filename:join([FileName, "ebin", + erlang:atom_to_list(AppName) ++ ".app"])) of + [] -> + {error, {invalid_override, AppName, FileName}}; + Error = {error, _} -> + Error; + App -> + rcl_app_info:link(App, true) + end || {AppName, FileName} <- Overrides] ++ AppMetas1. get_lib_dirs(State) -> LibDirs0 = rcl_state:lib_dirs(State), @@ -133,6 +153,9 @@ add_system_lib_dir(State, LibDirs) -> end. -spec format_detail(ErrorDetail::term()) -> iolist(). +format_detail({error, {invalid_override, AppName, FileName}}) -> + io_lib:format("Override {~p, ~p} is not a valid OTP App. Perhaps you forgot to build it?", + [AppName, FileName]); format_detail({accessing, File, eaccess}) -> io_lib:format("permission denied accessing file ~s", [File]); format_detail({accessing, File, Type}) -> @@ -172,7 +195,7 @@ discover_dir(IgnoreDirs, File) -> is_valid_otp_app(File) end. --spec is_valid_otp_app(file:name()) -> [rcl_app_info:t() | {error, Reason::term()} | []]. +-spec is_valid_otp_app(file:name()) -> rcl_app_info:t() | {error, Reason::term()} | []. is_valid_otp_app(File) -> %% Is this an ebin dir? EbinDir = filename:dirname(File), -- cgit v1.2.3 From dac49bf161dbfda40a08e5b3baa756a715bcc231 Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 21 Nov 2012 17:18:16 -0500 Subject: all relcool to symlink in 'overridden' apps Signed-off-by: Jordan Wilberding --- src/rcl_prv_assembler.erl | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/rcl_prv_assembler.erl b/src/rcl_prv_assembler.erl index 59d9946..7ed4f68 100644 --- a/src/rcl_prv_assembler.erl +++ b/src/rcl_prv_assembler.erl @@ -100,15 +100,20 @@ copy_app(LibDir, App) -> AppVsn = rcl_app_info:vsn_as_string(App), AppDir = rcl_app_info:dir(App), TargetDir = filename:join([LibDir, AppName ++ "-" ++ AppVsn]), - ec_plists:map(fun(SubDir) -> - copy_dir(AppDir, TargetDir, SubDir) - end, ["ebin", - "include", - "priv", - "src", - "c_src", - "README", - "LICENSE"]). + case rcl_app_info:link(App) of + true -> + file:make_symlink(AppDir, TargetDir); + false -> + ec_plists:map(fun(SubDir) -> + copy_dir(AppDir, TargetDir, SubDir) + end, ["ebin", + "include", + "priv", + "src", + "c_src", + "README", + "LICENSE"]) + end. copy_dir(AppDir, TargetDir, SubDir) -> SubSource = filename:join(AppDir, SubDir), -- cgit v1.2.3 From fe8dbb81d2e0c659f9898afb04c7e62ca0d72693 Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 21 Nov 2012 17:38:32 -0500 Subject: cleanup the rebar config Signed-off-by: Jordan Wilberding --- src/relcool.app.src | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 src/relcool.app.src (limited to 'src') diff --git a/src/relcool.app.src b/src/relcool.app.src deleted file mode 100644 index ac5de34..0000000 --- a/src/relcool.app.src +++ /dev/null @@ -1,26 +0,0 @@ -%% -*- erlang-indent-level: 4; indent-tabs-mode: nil; fill-column: 80 -*- -%% -%% @author Eric Merritt -%% @copyright Erlware, Inc. -%% -%% This file is provided to you under the Apache License, -%% Version 2.0 (the "License"); you may not use this file -%% except in compliance with the License. You may obtain -%% a copy of the License at -%% -%% http://www.apache.org/licenses/LICENSE-2.0 -%% -%% Unless required by applicable law or agreed to in writing, -%% software distributed under the License is distributed on an -%% "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -%% KIND, either express or implied. See the License for the -%% specific language governing permissions and limitations -%% under the License. -%% - -{application, relcool, - [{description, "Release assembler for Erlang/OTP Releases"}, - {vsn, "semver"}, - {modules, []}, - {registered, []}, - {applications, [kernel, stdlib, getopt, erlware_commons]}]}. -- cgit v1.2.3 From 9582eb79bb6469b5b1c3e56270813c4c75fc9512 Mon Sep 17 00:00:00 2001 From: Eric Date: Fri, 23 Nov 2012 09:54:23 -0500 Subject: add inadvertantly deleted relcool.app.src --- src/relcool.app.src | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/relcool.app.src (limited to 'src') diff --git a/src/relcool.app.src b/src/relcool.app.src new file mode 100644 index 0000000..ac5de34 --- /dev/null +++ b/src/relcool.app.src @@ -0,0 +1,26 @@ +%% -*- erlang-indent-level: 4; indent-tabs-mode: nil; fill-column: 80 -*- +%% +%% @author Eric Merritt +%% @copyright Erlware, Inc. +%% +%% This file is provided to you under the Apache License, +%% Version 2.0 (the "License"); you may not use this file +%% except in compliance with the License. You may obtain +%% a copy of the License at +%% +%% http://www.apache.org/licenses/LICENSE-2.0 +%% +%% Unless required by applicable law or agreed to in writing, +%% software distributed under the License is distributed on an +%% "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +%% KIND, either express or implied. See the License for the +%% specific language governing permissions and limitations +%% under the License. +%% + +{application, relcool, + [{description, "Release assembler for Erlang/OTP Releases"}, + {vsn, "semver"}, + {modules, []}, + {registered, []}, + {applications, [kernel, stdlib, getopt, erlware_commons]}]}. -- cgit v1.2.3 From 03b892e27b64d16e374a407d7e9ef82c30115ab8 Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 6 Dec 2012 17:26:04 -0500 Subject: allow a user to specify additional opts to erlexec Signed-off-by: Jordan Wilberding --- src/rcl_prv_assembler.erl | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/rcl_prv_assembler.erl b/src/rcl_prv_assembler.erl index 7ed4f68..c0f65c9 100644 --- a/src/rcl_prv_assembler.erl +++ b/src/rcl_prv_assembler.erl @@ -160,7 +160,10 @@ write_bin_file(State, Release, OutputDir, RelDir) -> ok = ec_file:mkdir_p(BinDir), VsnRel = filename:join(BinDir, RelName ++ "-" ++ RelVsn), BareRel = filename:join(BinDir, RelName), - StartFile = bin_file_contents(RelName, RelVsn, rcl_release:erts(Release)), + ErlOpts = rcl_state:get(State, erl_opts, ""), + StartFile = bin_file_contents(RelName, RelVsn, + rcl_release:erts(Release), + ErlOpts), ok = file:write_file(VsnRel, StartFile), ok = file:change_mode(VsnRel, 8#777), ok = file:write_file(BareRel, StartFile), @@ -278,7 +281,7 @@ get_code_paths(Release, OutDir) -> rcl_app_info:vsn_as_string(App), "ebin"]) || App <- rcl_release:application_details(Release)]. -bin_file_contents(RelName, RelVsn, ErtsVsn) -> +bin_file_contents(RelName, RelVsn, ErtsVsn, ErlOpts) -> [<<"#!/bin/sh set -e @@ -289,6 +292,7 @@ REL_NAME=">>, RelName, <<" REL_VSN=">>, RelVsn, <<" ERTS_VSN=">>, ErtsVsn, <<" REL_DIR=$RELEASE_ROOT_DIR/releases/$REL_NAME-$REL_VSN +ERL_OPTS=">>, ErlOpts, <<" ERTS_DIR= SYS_CONFIG= @@ -327,6 +331,4 @@ export EMU=beam export PROGNAME=erl export LD_LIBRARY_PATH=$ERTS_DIR/lib - - -$BINDIR/erlexec $SYS_CONFIG -boot $REL_DIR/$REL_NAME $@">>]. +$BINDIR/erlexec $ERL_OPTS $SYS_CONFIG -boot $REL_DIR/$REL_NAME $@">>]. -- cgit v1.2.3 From d88598d9748c89a7f3d041e078bc8e2b544b5da9 Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 6 Dec 2012 18:12:22 -0500 Subject: make the default output _rel instead of relcool_output Signed-off-by: Jordan Wilberding --- src/rcl_cmd_args.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/rcl_cmd_args.erl b/src/rcl_cmd_args.erl index ab073a2..68bd9ce 100644 --- a/src/rcl_cmd_args.erl +++ b/src/rcl_cmd_args.erl @@ -147,7 +147,7 @@ convert_goals([RawSpec | Rest], Acc) -> -spec create_output_dir([getopt:option()], rcl_state:cmd_args()) -> {ok, rcl_state:cmd_args()} | relcool:error(). create_output_dir(Opts, Acc) -> - OutputDir = proplists:get_value(output_dir, Opts, "./relcool_output"), + OutputDir = proplists:get_value(output_dir, Opts, "./_rel"), case filelib:is_dir(OutputDir) of false -> case rcl_util:mkdir_p(OutputDir) of -- cgit v1.2.3 From 819690cd8bda0f7f91740b8fa5df71256656de52 Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 6 Dec 2012 18:12:53 -0500 Subject: fix nasty bug that didn't let relcool output errors Signed-off-by: Jordan Wilberding --- src/rcl_provider.erl | 7 +++++++ src/relcool.erl | 18 ++++++++++++------ 2 files changed, 19 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/rcl_provider.erl b/src/rcl_provider.erl index 9d1dd88..c3ef434 100644 --- a/src/rcl_provider.erl +++ b/src/rcl_provider.erl @@ -10,6 +10,7 @@ %% API -export([new/2, do/2, + impl/1, format_error/1, format_error/2, format/1]). @@ -57,6 +58,12 @@ new(ModuleName, State0) when is_atom(ModuleName) -> do({?MODULE, Mod}, State) -> Mod:do(State). +%%% @doc get the name of the module that implements the provider +%%% @param Provider the provider object +-spec impl(Provider::t()) -> module(). +impl({?MODULE, Mod}) -> + Mod. + %% @doc format an error produced from a provider. -spec format_error(Reason::term()) -> iolist(). format_error({non_existing, ModuleName}) -> diff --git a/src/relcool.erl b/src/relcool.erl index 1c3ec02..0d75c62 100644 --- a/src/relcool.erl +++ b/src/relcool.erl @@ -128,14 +128,17 @@ run_providers(State0) -> {ok, State1} -> Providers = rcl_state:providers(State1), Result = run_providers(ConfigProvider, Providers, State1), - case rcl_state:caller(State1) of - command_line -> - init:stop(0); - api -> - Result - end + handle_output(State1, rcl_state:caller(State1), Result) end. +handle_output(State, command_line, E={error, _}) -> + report_error(State, E), + init:stop(127); +handle_output(_State, command_line, _) -> + init:stop(0); +handle_output(_State, api, Result) -> + Result. + run_providers(ConfigProvider, Providers, State0) -> case Providers of [ConfigProvider | Rest] -> @@ -151,10 +154,13 @@ run_providers(ConfigProvider, Providers, State0) -> run_provider(_Provider, Error = {error, _}) -> Error; run_provider(Provider, {ok, State0}) -> + rcl_log:debug(rcl_state:log(State0), "Running provider ~p~n", + [rcl_provider:impl(Provider)]), case rcl_provider:do(Provider, State0) of {ok, State1} -> {ok, State1}; E={error, _} -> + E end. -- cgit v1.2.3