Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 689520709
  • Loading branch information
mai93 authored and copybara-github committed Oct 25, 2024
1 parent 4ff0f69 commit f2fb9f6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
2 changes: 2 additions & 0 deletions aspect/intellij_info.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ load(

EXTRA_DEPS = [
"embed", # From go rules (bazel only)
"_cc_toolchain", # From rules_cc (bazel only)
"_kt_toolchain", # From rules_kotlin (bazel only)
]

def tool_label(tool_name):
Expand Down
17 changes: 13 additions & 4 deletions aspect/intellij_info_impl.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ load(
)

IntelliJInfo = provider(
doc = "Collected infromation about the targets visited by the aspect.",
doc = "Collected information about the targets visited by the aspect.",
fields = [
"export_deps",
"kind",
Expand All @@ -38,7 +38,6 @@ UNSUPPORTED_FEATURES = [

# Compile-time dependency attributes, grouped by type.
DEPS = [
"_cc_toolchain", # From cc rules
"_stl", # From cc rules
"malloc", # From cc_binary rules
"_java_toolchain", # From java rules
Expand All @@ -52,7 +51,6 @@ DEPS = [
"test_app", # android_instrumentation_test
"instruments", # android_instrumentation_test
"tests", # From test_suite
"_kt_toolchain", # From rules_kotlin
]

# Run-time dependency attributes, grouped by type.
Expand Down Expand Up @@ -1071,6 +1069,16 @@ def intellij_info_aspect_impl(target, ctx, semantics):
rule_attrs,
semantics_extra_deps(DEPS, semantics, "extra_deps"),
)

# Collect direct toolchain type-based dependencies
if hasattr(semantics, "toolchains_propagation"):
direct_dep_targets.extend(
semantics.toolchains_propagation.collect_toolchain_deps(
ctx,
semantics.toolchains_propagation.toolchain_types,
),
)

direct_deps = make_deps(direct_dep_targets, COMPILE_TIME)

# Add exports from direct dependencies
Expand Down Expand Up @@ -1209,7 +1217,7 @@ def semantics_extra_deps(base, semantics, name):
extra_deps = getattr(semantics, name)
return base + extra_deps

def make_intellij_info_aspect(aspect_impl, semantics):
def make_intellij_info_aspect(aspect_impl, semantics, **kwargs):
"""Creates the aspect given the semantics."""
tool_label = semantics.tool_label
flag_hack_label = semantics.flag_hack_label
Expand Down Expand Up @@ -1253,4 +1261,5 @@ def make_intellij_info_aspect(aspect_impl, semantics):
fragments = ["cpp"],
required_aspect_providers = [[JavaInfo], [CcInfo]] + semantics.extra_required_aspect_providers,
implementation = aspect_impl,
**kwargs
)

0 comments on commit f2fb9f6

Please sign in to comment.