Fix unknown type specs

This commit is contained in:
kjnilsson 2020-11-02 10:40:24 +00:00
parent e70adfd38c
commit a5b2add13d
9 changed files with 15 additions and 11 deletions

View File

@ -135,6 +135,8 @@ BUILD_DEPS = rabbitmq_cli syslog
DEPS = cuttlefish ranch lager rabbit_common ra sysmon_handler stdout_formatter recon observer_cli osiris amqp10_common
TEST_DEPS = rabbitmq_ct_helpers rabbitmq_ct_client_helpers amqp_client meck proper
PLT_APPS += mnesia
dep_cuttlefish = hex 2.4.1
dep_syslog = git https://github.com/schlagert/syslog 3.4.5
dep_osiris = git https://github.com/rabbitmq/osiris master

View File

@ -254,7 +254,7 @@ recovery_barrier(BarrierPid) ->
-spec init_with_backing_queue_state
(amqqueue:amqqueue(), atom(), tuple(), any(),
[rabbit_types:delivery()], pmon:pmon(), maps:map()) ->
[rabbit_types:delivery()], pmon:pmon(), map()) ->
#q{}.
init_with_backing_queue_state(Q, BQ, BQS,

View File

@ -170,7 +170,7 @@
consumers = #{} :: #{consumer_id() => #consumer{}},
% consumers that require further service are queued here
% needs to be part of snapshot
service_queue = priority_queue:new() :: priority_queue:queue(consumer_id()),
service_queue = priority_queue:new() :: priority_queue:q(),
%% This is a special field that is only used for snapshots
%% It represents the queued messages at the time the
%% dehydrated snapshot state was cached.

View File

@ -38,6 +38,7 @@
-define(DRAINING_STATUS, draining).
-type maintenance_status() :: ?DEFAULT_STATUS | ?DRAINING_STATUS.
-type mnesia_table() :: atom().
-export_type([
maintenance_status/0
@ -47,7 +48,7 @@
%% API
%%
-spec status_table_name() -> mnesia:table().
-spec status_table_name() -> mnesia_table().
status_table_name() ->
?TABLE.

View File

@ -61,7 +61,7 @@
%% indicate to the queue type module that a message has been delivered
%% fully to the queue
{settled, Success :: boolean(), [msg_tag()]} |
{deliver, rabbit_type:ctag(), boolean(), [rabbit_amqqueue:qmsg()]}.
{deliver, rabbit_types:ctag(), boolean(), [rabbit_amqqueue:qmsg()]}.
-type actions() :: [action()].

View File

@ -59,7 +59,7 @@
max :: non_neg_integer(),
start_offset = 0 :: non_neg_integer(),
listening_offset = 0 :: non_neg_integer(),
log :: undefined | orisis_log:state()}).
log :: undefined | osiris_log:state()}).
-record(stream_client, {name :: term(),
leader :: pid(),

View File

@ -22,6 +22,7 @@
%%----------------------------------------------------------------------------
-type retry() :: boolean().
-type mnesia_table() :: atom().
%%----------------------------------------------------------------------------
%% Main interface
@ -36,7 +37,7 @@ create() ->
ensure_secondary_indexes(),
ok.
-spec create(mnesia:table(), list()) -> rabbit_types:ok_or_error(any()).
-spec create(mnesia_table(), list()) -> rabbit_types:ok_or_error(any()).
create(TableName, TableDefinition) ->
TableDefinition1 = proplists:delete(match, TableDefinition),
@ -49,7 +50,7 @@ create(TableName, TableDefinition) ->
throw({error, {table_creation_failed, TableName, TableDefinition1, Reason}})
end.
-spec exists(mnesia:table()) -> boolean().
-spec exists(mnesia_table()) -> boolean().
exists(Table) ->
lists:member(Table, mnesia:system_info(tables)).
@ -64,7 +65,7 @@ ensure_secondary_index(Table, Field) ->
{aborted, {already_exists, Table, _}} -> ok
end.
-spec ensure_table_copy(mnesia:table(), node()) -> ok | {error, any()}.
-spec ensure_table_copy(mnesia_table(), node()) -> ok | {error, any()}.
ensure_table_copy(TableName, Node) ->
rabbit_log:debug("Will add a local schema database copy for table '~s'", [TableName]),
case mnesia:add_table_copy(TableName, Node, disc_copies) of

View File

@ -79,7 +79,7 @@ new(Name, Limits) ->
vhost_v1:new(Name, Limits)
end.
-spec new(rabbit_vhost:name(), list(), map()) -> vhost().
-spec new(name(), list(), map()) -> vhost().
new(Name, Limits, Metadata) ->
case record_version_to_use() of
?record_version ->

View File

@ -57,11 +57,11 @@
vhost_v1_pattern/0]).
-spec new(rabbit_vhost:name(), list()) -> vhost().
-spec new(vhost:name(), list()) -> vhost().
new(Name, Limits) ->
#vhost{virtual_host = Name, limits = Limits}.
-spec new(rabbit_vhost:name(), list(), map()) -> vhost().
-spec new(vhost:name(), list(), map()) -> vhost().
new(Name, Limits, _Metadata) ->
#vhost{virtual_host = Name, limits = Limits}.