Skip to content

Commit 2f071b8

Browse files
Merge pull request #8413 from rabbitmq/mergify/bp/v3.12.x/pr-8344
Add looking_glass (backport #8344)
2 parents b67c08e + 1674707 commit 2f071b8

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
@@ -137,7 +137,10 @@ plt(
137137

138138
PLUGINS = all_plugins(
139139
rabbitmq_workspace = "",
140-
)
140+
) + select({
141+
"@rules_erlang//:debug_build": ["@looking_glass//:erlang_app"],
142+
"//conditions:default": [],
143+
})
141144

142145
rabbitmq_home(
143146
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
@@ -236,16 +236,19 @@ plt(
236236
name = "deps_plt",
237237
apps = [
238238
"mnesia", # keep
239+
"runtime_tools", # keep
239240
],
240241
for_target = ":erlang_app",
241242
ignore_warnings = True,
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)