From bee15d62a0a381996c00f6d38ea953fa329c2372 Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Sat, 6 Dec 2014 20:29:54 -0600 Subject: version in source dep element is no longer used, support leaving it out --- src/rebar_prv_install_deps.erl | 12 ++++++++---- src/rebar_prv_lock.erl | 1 - 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/rebar_prv_install_deps.erl b/src/rebar_prv_install_deps.erl index 5375f4b..00ef9c5 100644 --- a/src/rebar_prv_install_deps.erl +++ b/src/rebar_prv_install_deps.erl @@ -351,11 +351,15 @@ parse_deps(State, DepsDir, Deps) -> ,ec_cnv:to_binary(Vsn)) | PkgDepsAcc]}; (Name, {SrcDepsAcc, PkgDepsAcc}) when is_atom(Name) -> {SrcDepsAcc, [ec_cnv:to_binary(Name) | PkgDepsAcc]}; - ({Name, Vsn, Source}, {SrcDepsAcc, PkgDepsAcc}) when is_tuple (Source) -> - Dep = new_dep(State, DepsDir, Name, Vsn, Source), + ({Name, Source}, {SrcDepsAcc, PkgDepsAcc}) when is_tuple (Source) -> + Dep = new_dep(State, DepsDir, Name, [], Source), {[Dep | SrcDepsAcc], PkgDepsAcc}; - ({Name, Vsn, Source, _Level}, {SrcDepsAcc, PkgDepsAcc}) when is_tuple (Source) -> - Dep = new_dep(State, DepsDir, Name, Vsn, Source), + ({Name, _Vsn, Source}, {SrcDepsAcc, PkgDepsAcc}) when is_tuple (Source) -> + Dep = new_dep(State, DepsDir, Name, [], Source), + {[Dep | SrcDepsAcc], PkgDepsAcc}; + ({Name, Source, Level}, {SrcDepsAcc, PkgDepsAcc}) when is_tuple (Source) + , is_integer(Level) -> + Dep = new_dep(State, DepsDir, Name, [], Source), {[Dep | SrcDepsAcc], PkgDepsAcc} end, {[], []}, Deps). diff --git a/src/rebar_prv_lock.erl b/src/rebar_prv_lock.erl index aba5080..9131777 100644 --- a/src/rebar_prv_lock.erl +++ b/src/rebar_prv_lock.erl @@ -39,7 +39,6 @@ do(State) -> %% If source is tuple it is a source dep %% e.g. {git, "git://github.com/ninenines/cowboy.git", "master"} {rebar_app_info:name(Dep) - ,rebar_app_info:original_vsn(Dep) ,rebar_fetch:lock_source(Dir, Source) ,rebar_app_info:dep_level(Dep)} end, AllDeps), -- cgit v1.1