You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to access the second output (compilation_outputs) of cc_common.compile, some methods are private API and calling them from user-defined rules leads to the following error:
ERROR: /home/user/project/BUILD.bazel:119:37: in foo_library rule //REDACTED:
Traceback (most recent call last):
File "/home/user/...output-base.../external/rules_foo+/rule/cc/helper.bzl", line 222, column 56, in create_cc_providers_from_files
metadata_files = compilation_outputs.gcno_files() + compilation_outputs.pic_gcno_files(),
Error in gcno_files: file '@@rules_foo+//rule/cc:helper.bzl' cannot use private API
Which category does this issue belong to?
No response
What underlying problem are you trying to solve with this feature?
Use cc_common.compile and friends to build C++ code, then get valid coverage (including gcno files) forwarded to coverage_common.instrumented_files_info, just like what Bazel does internally.
Alternatively, rules_cc could maybe export create_cc_instrumented_files_info, but change the API so it takes compilation_outputs and extracts gcno files in that helper (which should be allowed to use private APIs). I implemented that here.
Which operating system are you running Bazel on?
Ubuntu 22.04
What is the output of bazel info release?
release 8.0.0
If bazel info release returns development version or (@non-git), tell us how you built Bazel.
No response
What's the output of git remote get-url origin; git rev-parse HEAD ?
N/A
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered:
Description of the feature request:
When trying to access the second output (
compilation_outputs
) ofcc_common.compile
, some methods are private API and calling them from user-defined rules leads to the following error:Which category does this issue belong to?
No response
What underlying problem are you trying to solve with this feature?
Use
cc_common.compile
and friends to build C++ code, then get valid coverage (includinggcno
files) forwarded tocoverage_common.instrumented_files_info
, just like what Bazel does internally.I think this could be as simple as changing this.
Alternatively,
rules_cc
could maybe exportcreate_cc_instrumented_files_info
, but change the API so it takescompilation_outputs
and extracts gcno files in that helper (which should be allowed to use private APIs). I implemented that here.Which operating system are you running Bazel on?
Ubuntu 22.04
What is the output of
bazel info release
?release 8.0.0
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse HEAD
?Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: