Skip to content

Commit afe06a9

Browse files
Fix some dialyzer build system errors in make (backport #11014) (#11015)
* Fix some dialyzer build system errors in make (#11014) * make amqp10_common dialyze green in make * make rabbitmq_ct_client_helpers dialyze green with make * fixup rabbitmq_prelaunch path ref * Cleanup unused dep_* vars * Fixup xref for rabbitmq_ct_helpers I could not figure out how to make xref aware of the cli code without also checking the cli code as well, and reporting additional errors * remove unused file * fix make diaylze for rabbitmq_stream_common * update deps/oauth2_client/Makefile to match Bazel (cherry picked from commit 4ec33c8) # Conflicts: # deps/amqp10_common/test/serial_number_SUITE.erl * fixup backport --------- Co-authored-by: Rin Kuryloski <[email protected]>
1 parent 522760f commit afe06a9

File tree

7 files changed

+13
-81
lines changed

7 files changed

+13
-81
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ XREF_SCOPE = app deps
3333

3434
# We add all the applications that are in non-standard paths
3535
# so they are included in the analyses as well.
36-
XREF_EXTRA_APP_DIRS = $(filter-out deps/rabbitmq_cli/_build/dev/lib/rabbit_common/,$(wildcard deps/rabbitmq_cli/_build/dev/lib/*/)) deps/rabbit/apps/rabbitmq_prelaunch/
36+
XREF_EXTRA_APP_DIRS = $(filter-out deps/rabbitmq_cli/_build/dev/lib/rabbit_common/,$(wildcard deps/rabbitmq_cli/_build/dev/lib/*/)) deps/rabbitmq_prelaunch/
3737

3838
# For Elixir protocols the right fix is to include the consolidated/
3939
# folders in addition to ebin/. However this creates conflicts because

deps/amqp10_common/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ DEP_PLUGINS = rabbit_common/mk/rabbitmq-build.mk \
4444
rabbit_common/mk/rabbitmq-test.mk \
4545
rabbit_common/mk/rabbitmq-tools.mk
4646

47+
PLT_APPS = eunit
48+
4749
include rabbitmq-components.mk
4850
include erlang.mk
4951

deps/oauth2_client/Makefile

Lines changed: 2 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,8 @@ PROJECT = oauth2_client
22
PROJECT_DESCRIPTION = OAuth2 client from the RabbitMQ Project
33
PROJECT_MOD = oauth2_client_app
44

5-
define PROJECT_APP_EXTRA_KEYS
6-
%% Hex.pm package informations.
7-
{licenses, ["MPL-2.0"]},
8-
{links, [
9-
{"Website", "https://www.rabbitmq.com/"},
10-
{"GitHub", "https://github.com/rabbitmq/rabbitmq-server/tree/main/deps/oauth2_client"}
11-
]},
12-
{build_tools, ["make", "rebar3"]},
13-
{files, [
14-
$(RABBITMQ_HEXPM_DEFAULT_FILES)
15-
]}
16-
endef
17-
18-
define HEX_TARBALL_EXTRA_METADATA
19-
#{
20-
licenses => [<<"MPL-2.0">>],
21-
links => #{
22-
<<"Website">> => <<"https://www.rabbitmq.com">>,
23-
<<"GitHub">> => <<"https://github.com/rabbitmq/rabbitmq-server/tree/main/deps/oauth2_client">>
24-
}
25-
}
26-
endef
27-
28-
# Release artifacts are put in $(PACKAGES_DIR).
29-
PACKAGES_DIR ?= $(abspath PACKAGES)
30-
31-
BUILD_DEPS = rabbit_common elvis_mk
32-
DEPS = cowlib
33-
TEST_DEPS = rabbit rabbitmq_ct_helpers cowboy
5+
DEPS = rabbit rabbit_common
6+
TEST_DEPS = rabbitmq_ct_helpers cowboy
347
LOCAL_DEPS = ssl inets crypto public_key
358

369
DEP_EARLY_PLUGINS = rabbit_common/mk/rabbitmq-early-test.mk
@@ -42,36 +15,5 @@ DEP_PLUGINS = rabbit_common/mk/rabbitmq-macros.mk \
4215
rabbit_common/mk/rabbitmq-test.mk \
4316
rabbit_common/mk/rabbitmq-tools.mk
4417

45-
DEP_PLUGINS += elvis_mk
46-
dep_elvis_mk = git https://github.com/inaka/elvis.mk.git master
47-
4818
include rabbitmq-components.mk
4919
include erlang.mk
50-
51-
HEX_TARBALL_FILES += rabbitmq-components.mk \
52-
git-revisions.txt
53-
54-
# --------------------------------------------------------------------
55-
# Compiler flags.
56-
# --------------------------------------------------------------------
57-
58-
# gen_fsm is deprecated starting from Erlang 20, but we want to support
59-
# Erlang 19 as well.
60-
61-
ERTS_VER := $(shell erl -version 2>&1 | sed -E 's/.* version //')
62-
ERLANG_20_ERTS_VER := 9.0
63-
64-
ifeq ($(call compare_version,$(ERTS_VER),$(ERLANG_20_ERTS_VER),>=),true)
65-
ERLC_OPTS += -Dnowarn_deprecated_gen_fsm
66-
endif
67-
68-
# Dialyze the tests.
69-
DIALYZER_OPTS += --src -r test
70-
71-
# --------------------------------------------------------------------
72-
# ActiveMQ for the testsuite.
73-
# --------------------------------------------------------------------
74-
75-
tests:: $(ACTIVEMQ)
76-
77-
ct ct-system: $(ACTIVEMQ)

deps/rabbitmq_ct_client_helpers/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@ DEPS = rabbit_common rabbitmq_ct_helpers amqp_client
66
DEP_PLUGINS = rabbit_common/mk/rabbitmq-build.mk \
77
rabbit_common/mk/rabbitmq-tools.mk
88

9+
PLT_APPS = common_test
10+
911
include ../../rabbitmq-components.mk
1012
include ../../erlang.mk

deps/rabbitmq_ct_helpers/Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ PROJECT_DESCRIPTION = Common Test helpers for RabbitMQ
44
DEPS = rabbit_common proper inet_tcp_proxy meck
55
TEST_DEPS = rabbit
66

7-
dep_rabbit_common = git-subfolder https://github.com/rabbitmq/rabbitmq-server main deps/rabbit_common
8-
dep_rabbit = git-subfolder https://github.com/rabbitmq/rabbitmq-server main deps/rabbit
7+
XREF_IGNORE = [ \
8+
{'Elixir.OptionParser',split,1}, \
9+
{'Elixir.RabbitMQCtl',exec_command,2}]
10+
911
dep_inet_tcp_proxy = git https://github.com/rabbitmq/inet_tcp_proxy master
1012

1113
DEP_PLUGINS = rabbit_common/mk/rabbitmq-build.mk \

deps/rabbitmq_ct_helpers/WORKSPACE.bazel

Lines changed: 0 additions & 18 deletions
This file was deleted.

deps/rabbitmq_stream_common/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ endef
1010
DEPS =
1111
TEST_DEPS = rabbitmq_ct_helpers rabbitmq_ct_client_helpers
1212

13+
PLT_APPS = osiris
14+
1315
DEP_EARLY_PLUGINS = rabbit_common/mk/rabbitmq-early-plugin.mk
1416
DEP_PLUGINS = rabbit_common/mk/rabbitmq-plugin.mk
1517

0 commit comments

Comments
 (0)