intellij
intellij copied to clipboard
intellij_aspect does not recognize `additional_compiler_inputs` as a prerequisite
Description of the bug:
I'm using CLion with C++ and in one of our cc_library we have @$(execpath {BAZEL_TARGET}) in cops. This target is defined inside additional_compiler_inputs above, and build this rule in command line works fine. But if I run bazel sync, I get something that looks like this:
ERROR: path/to/my/buildBUILD:xx:xx: in @@intellij_aspect//:intellij_info_bundled.bzl%intellij_info_aspect[optimize_building_jars="enabled"] aspect on cc_library rule //path/to/my:target: label '//path/to/rule/in:additional_compiler_inputs' in $(location) expression is not a declared prerequisite of this rule
Which category does this issue belong to?
CLion
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
This in BUILD:
cc_library(
name = "test",
srcs = [
":test.cpp",
],
hdrs = glob(["*.hpp"]),
additional_compiler_inputs = [
"//some_target/for/compiler/input",
],
copts = [
"@$(execpath //some_target/for/compiler/input)",
],
)
Which Intellij IDE are you using? Please provide the specific version.
CLion 2024.1.5
What programming languages and tools are you using? Please provide specific versions.
C++
What Bazel plugin version are you using?
Any version
Have you found anything relevant by searching the web?
No
Any other information, logs, or outputs that you want to share?
I have a branch that fixes this issue for me that I'd like to make a pull request on https://github.com/bazelbuild/intellij/compare/master...luyi326:intellij:yi/cpp