summaryrefslogtreecommitdiff
path: root/src/rebar.hrl
diff options
context:
space:
mode:
Diffstat (limited to 'src/rebar.hrl')
-rw-r--r--src/rebar.hrl29
1 files changed, 25 insertions, 4 deletions
diff --git a/src/rebar.hrl b/src/rebar.hrl
index f461c70..f11302d 100644
--- a/src/rebar.hrl
+++ b/src/rebar.hrl
@@ -25,14 +25,35 @@
-define(CONFIG_VERSION, "1.1.0").
-define(DEFAULT_CDN, "https://repo.hex.pm/").
-define(REMOTE_PACKAGE_DIR, "tarballs").
--define(REMOTE_REGISTRY_FILE, "registry.ets.gz").
-define(LOCK_FILE, "rebar.lock").
-define(DEFAULT_COMPILER_SOURCE_FORMAT, relative).
-
--define(PACKAGE_INDEX_VERSION, 3).
+-define(PACKAGE_INDEX_VERSION, 5).
-define(PACKAGE_TABLE, package_index).
-define(INDEX_FILE, "packages.idx").
--define(REGISTRY_FILE, "registry").
+-define(HEX_AUTH_FILE, "hex.config").
+-define(PUBLIC_HEX_REPO, <<"hexpm">>).
+
+%% ignore this function in all modules
+%% not every module that exports it and relies on it being called implements provider
+-ignore_xref([{format_error, 1}]).
+
+%% the package record is used in a select match spec which upsets dialyzer
+%% this is the suggested workaround from Tobias
+%% http://erlang.org/pipermail/erlang-questions/2009-February/041445.html
+-type ms_field() :: '$1' | '_'.
+
+%% TODO: change package and requirement keys to be required (:=) after dropping support for OTP-18
+-record(package, {key :: {unicode:unicode_binary() | ms_field(), unicode:unicode_binary() | ms_field(),
+ unicode:unicode_binary() | ms_field()},
+ checksum :: binary() | ms_field(),
+ retired :: boolean() | ms_field(),
+ dependencies :: [#{package => unicode:unicode_binary(),
+ requirement => unicode:unicode_binary()}] | ms_field()}).
+
+-record(resource, {type :: atom(),
+ module :: module(),
+ state :: term(),
+ implementation :: rebar_resource | rebar_resource_v2}).
-ifdef(namespaced_types).
-type rebar_dict() :: dict:dict().