Skip to content
This repository has been archived by the owner on Mar 17, 2024. It is now read-only.

Commit

Permalink
Ignore incompatible targets (#100)
Browse files Browse the repository at this point in the history
Currently incompatible targets are included by the aspect until the
linked PR lands. In this case the targets don't have CcInfo, so we can
use that as a workaround for ignoring them for now.
  • Loading branch information
keith authored Jul 27, 2022
1 parent 4001dd2 commit 58672f5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion aspects.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,9 @@ def _compilation_database_aspect_impl(target, ctx):
all_compdb_files.append(dep[OutputGroupInfo].compdb_files)
all_header_files.append(dep[OutputGroupInfo].header_files)

# TODO: Remove CcInfo check once https://github.com/bazelbuild/bazel/pull/15426 is released
# We support only these rule kinds.
if ctx.rule.kind not in _all_rules:
if ctx.rule.kind not in _all_rules or CcInfo not in target:
return [
CompilationAspect(compilation_db = depset(transitive = transitive_compilation_db)),
OutputGroupInfo(
Expand Down

0 comments on commit 58672f5

Please sign in to comment.