Skip to content

Commit 31d4d3a

Browse files
authored
Merge pull request #53 from rabbitmq/xref2-bugfix
Fix xref2 rule for use with the root package in a workspace
2 parents 5c1ca07 + bf01508 commit 31d4d3a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

private/xref2.bzl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,12 @@ def _expand_xref_erl(ctx, method = None, arg = None):
6969

7070
extra_dirs = [f.short_path for f in ctx.files.extra_dirs]
7171

72-
target_dir = "../{}".format(target_info.app_name)
73-
7472
xref_erl = _replace_all(XREF_ERL, {
7573
SCOPE_PATTERN: to_erlang_atom_list(ctx.attr.scopes),
7674
EXTRA_APP_DIRS_PATTERN: to_erlang_string_list(extra_app_dirs),
7775
DEPS_DIRS_PATTERN: to_erlang_string_list(deps_dirs),
7876
APPS_DIRS_PATTERN: to_erlang_string_list(apps_dirs),
79-
TARGET_DIR_PATTERN: target_dir,
77+
TARGET_DIR_PATTERN: ".",
8078
EXTRA_DIRS_PATTERN: to_erlang_string_list(extra_dirs),
8179
IGNORE_CALLBACKS_PATTERN: ctx.attr.ignore_callbacks,
8280
IGNORE_PATTERN: to_erlang_atom_list(ctx.attr.ignore),

0 commit comments

Comments
 (0)