Skip to content

Commit

Permalink
Merge pull request #8413 from rabbitmq/mergify/bp/v3.12.x/pr-8344
Browse files Browse the repository at this point in the history
Add looking_glass (backport #8344)
  • Loading branch information
michaelklishin authored May 30, 2023
2 parents b67c08e + 1674707 commit 2f071b8
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
5 changes: 4 additions & 1 deletion BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,10 @@ plt(

PLUGINS = all_plugins(
rabbitmq_workspace = "",
)
) + select({
"@rules_erlang//:debug_build": ["@looking_glass//:erlang_app"],
"//conditions:default": [],
})

rabbitmq_home(
name = "broker-home",
Expand Down
7 changes: 7 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ bazel_dep(
version = "3.10.5",
)

bazel_dep(
name = "com_github_rabbitmq_looking_glass",
version = "0.2.1",
repo_name = "looking_glass",
dev_dependency = True,
)

erlang_config = use_extension(
"@rules_erlang//bzlmod:extensions.bzl",
"erlang_config",
Expand Down
7 changes: 5 additions & 2 deletions deps/rabbit/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -236,16 +236,19 @@ plt(
name = "deps_plt",
apps = [
"mnesia", # keep
"runtime_tools", # keep
],
for_target = ":erlang_app",
ignore_warnings = True,
plt = "//:base_plt",
deps = [
"@looking_glass//:erlang_app", # keep
],
)

dialyze(
name = "dialyze",
# A few `lg` functions are unknown
dialyzer_opts = without("-Wunknown", RABBITMQ_DIALYZER_OPTS),
dialyzer_opts = RABBITMQ_DIALYZER_OPTS,
plt = ":deps_plt",
target = ":erlang_app",
)
Expand Down
2 changes: 1 addition & 1 deletion deps/rabbit/src/rabbit_looking_glass.erl
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ trace_qq() ->
]
)),
timer:sleep(10000),
lg:stop(),
_ = lg:stop(),
profile().

profile() ->
Expand Down

0 comments on commit 2f071b8

Please sign in to comment.