Skip to content

Commit a236bf7

Browse files
Merge pull request #8416 from rabbitmq/mergify/bp/v3.11.x/pr-8413
Add looking_glass (backport #8344) (backport #8413)
2 parents 03b1ec8 + fbb4101 commit a236bf7

File tree

4 files changed

+17
-4
lines changed

4 files changed

+17
-4
lines changed

BUILD.bazel

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,10 @@ plt(
134134

135135
PLUGINS = all_plugins(
136136
rabbitmq_workspace = "",
137-
)
137+
) + select({
138+
"@rules_erlang//:debug_build": ["@looking_glass//:erlang_app"],
139+
"//conditions:default": [],
140+
})
138141

139142
rabbitmq_home(
140143
name = "broker-home",

MODULE.bazel

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ bazel_dep(
3434
version = "3.10.5",
3535
)
3636

37+
bazel_dep(
38+
name = "com_github_rabbitmq_looking_glass",
39+
version = "0.2.1",
40+
repo_name = "looking_glass",
41+
dev_dependency = True,
42+
)
43+
3744
erlang_config = use_extension(
3845
"@rules_erlang//bzlmod:extensions.bzl",
3946
"erlang_config",

deps/rabbit/BUILD.bazel

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,15 +237,18 @@ plt(
237237
name = "deps_plt",
238238
apps = [
239239
"mnesia", # keep
240+
"runtime_tools", # keep
240241
],
241242
for_target = ":erlang_app",
242243
plt = "//:base_plt",
244+
deps = [
245+
"@looking_glass//:erlang_app", # keep
246+
],
243247
)
244248

245249
dialyze(
246250
name = "dialyze",
247-
# A few `lg` functions are unknown
248-
dialyzer_opts = without("-Wunknown", RABBITMQ_DIALYZER_OPTS),
251+
dialyzer_opts = RABBITMQ_DIALYZER_OPTS,
249252
plt = ":deps_plt",
250253
target = ":erlang_app",
251254
)

deps/rabbit/src/rabbit_looking_glass.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ trace_qq() ->
7878
]
7979
)),
8080
timer:sleep(10000),
81-
lg:stop(),
81+
_ = lg:stop(),
8282
profile().
8383

8484
profile() ->

0 commit comments

Comments
 (0)