diff --git a/src/rebar_app_info.erl b/src/rebar_app_info.erl index 15b9701d..9b6fba42 100644 --- a/src/rebar_app_info.erl +++ b/src/rebar_app_info.erl @@ -90,7 +90,7 @@ app_file :: file:filename_all() | undefined, original_vsn :: app_vsn() | undefined, vsn :: app_vsn() | undefined, - parent=root :: binary() | root | string(), + parent=root :: binary() | root, app_details=[] :: list(), applications=[] :: list(), included_applications=[] :: [atom()], @@ -415,12 +415,12 @@ app_details(AppInfo=#app_info_t{}, AppDetails) -> AppInfo#app_info_t{app_details=AppDetails}. %% @doc returns the app's parent in the dep tree. --spec parent(t()) -> root | binary() | string(). +-spec parent(t()) -> root | binary(). parent(#app_info_t{parent=Parent}) -> Parent. %% @doc sets the app's parent. --spec parent(t(), binary() | root | string()) -> t(). +-spec parent(t(), binary() | root) -> t(). parent(AppInfo=#app_info_t{}, Parent) -> AppInfo#app_info_t{parent=Parent}. diff --git a/src/rebar_app_utils.erl b/src/rebar_app_utils.erl index 64a40c46..4786101f 100644 --- a/src/rebar_app_utils.erl +++ b/src/rebar_app_utils.erl @@ -171,7 +171,7 @@ parse_deps(Parent, DepsDir, Deps, State, Locks, Level) -> %% (if it is a newer thing) or from the locks specified in the lockfile. -spec parse_dep(Dep, Parent, Dir, State, Locks, Level) -> rebar_app_info:t() when Dep :: tuple() | atom() | binary(), % TODO: meta to source() | lock() - Parent :: root | binary() | string(), + Parent :: root | binary(), Dir :: file:filename(), State :: rebar_state:t(), Locks :: [tuple()], % TODO: meta to [lock()] @@ -199,7 +199,7 @@ parse_dep(Dep, Parent, DepsDir, State, Locks, Level) -> %% @doc converts a dependency definition and a location for it on disk %% into an app info tuple representing it. -spec parse_dep(Parent, Dep, Dir, IsLock, State) -> rebar_app_info:t() when - Parent :: root | binary() | string(), + Parent :: root | binary(), Dep :: tuple() | atom() | binary(), % TODO: meta to source() | lock() Dir :: file:filename(), IsLock :: boolean(), @@ -244,7 +244,7 @@ parse_dep(_, Dep, _, _, _) -> %% @doc convert a dependency that has just been fetched into %% an app info record related to it -spec dep_to_app(Parent, Dir, Name, Vsn, Source, IsLock, State) -> rebar_app_info:t() when - Parent :: root | binary() | string(), + Parent :: root | binary(), Dir :: file:filename(), Name :: binary(), Vsn :: iodata() | undefined, diff --git a/src/rebar_prv_plugins_upgrade.erl b/src/rebar_prv_plugins_upgrade.erl index c62876c7..3ad3dc72 100644 --- a/src/rebar_prv_plugins_upgrade.erl +++ b/src/rebar_prv_plugins_upgrade.erl @@ -97,7 +97,7 @@ build_plugin(ToBuild, State) -> maybe_update_pkg(Tup, State) when is_tuple(Tup) -> maybe_update_pkg(element(1, Tup), State); maybe_update_pkg(Name, State) -> - try rebar_app_utils:parse_dep(root, ?DEFAULT_PLUGINS_DIR, Name, State, [], 0) of + try rebar_app_utils:parse_dep(root, unicode:characters_to_binary(?DEFAULT_PLUGINS_DIR), Name, State, [], 0) of AppInfo -> Source = rebar_app_info:source(AppInfo), case element(1, Source) of