瀏覽代碼

replace rlx_depsolver types with new package types

pull/16/head
Tristan Sloughter 10 年之前
父節點
當前提交
3e01e3e46d
共有 2 個檔案被更改,包括 6 行新增17 行删除
  1. +4
    -15
      src/rebar_packages.erl
  2. +2
    -2
      src/rebar_state.erl

+ 4
- 15
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) ->

+ 2
- 2
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.

Loading…
取消
儲存