diff options
author | Tristan Sloughter <t@crashfast.com> | 2014-11-22 09:27:47 -0600 |
---|---|---|
committer | Tristan Sloughter <t@crashfast.com> | 2014-11-22 20:24:21 -0600 |
commit | 3e01e3e46d84e09946d347c3115db528bc88396c (patch) | |
tree | 50963e25a6e6f2380fd2a5ac96897fb9de103779 | |
parent | af35d5f0a2c91319fc86c5bb4a9d018658519c4c (diff) |
replace rlx_depsolver types with new package types
-rw-r--r-- | src/rebar_packages.erl | 19 | ||||
-rw-r--r-- | src/rebar_state.erl | 4 |
2 files changed, 6 insertions, 17 deletions
diff --git a/src/rebar_packages.erl b/src/rebar_packages.erl index 7308611..a0d1a9d 100644 --- a/src/rebar_packages.erl +++ b/src/rebar_packages.erl @@ -2,24 +2,13 @@ -export([get_packages/1]). --export_type([constraint/0]). +-export_type([package/0]). -include("rebar.hrl"). --type pkg_name() :: string() | binary() | atom(). - --type vsn() :: 'NO_VSN' - | ec_semver:semver(). - --type constraint_op() :: - '=' | gte | '>=' | lte | '<=' - | gt | '>' | lt | '<' | pes | '~>' | between. - --type constraint() :: pkg_name() - | {pkg_name(), vsn()} - | {pkg_name(), vsn(), constraint_op()} - | {pkg_name(), vsn(), vsn(), between}. - +-type pkg_name() :: binary() | atom(). +-type vsn() :: binary(). +-type package() :: pkg_name() | {pkg_name(), vsn()}. -spec get_packages(rebar_state:t()) -> {rebar_dict(), rebar_digraph()}. get_packages(State) -> diff --git a/src/rebar_state.erl b/src/rebar_state.erl index 7ed29fa..840b428 100644 --- a/src/rebar_state.erl +++ b/src/rebar_state.erl @@ -28,7 +28,7 @@ src_deps = [], src_apps = [], - pkg_deps = [] :: [rebar_packages:constraint()], + pkg_deps = [] :: [rebar_packages:package()], project_apps = [], providers = []}). @@ -103,7 +103,7 @@ deps_names(State) -> ec_cnv:to_binary(Dep) end, Deps). --spec pkg_deps(t()) -> [rebar_packages:constraint()]. +-spec pkg_deps(t()) -> [rebar_packages:package()]. pkg_deps(#state_t{pkg_deps=PkgDeps}) -> PkgDeps. |