Expose CcSkylarkApiProvider as a first-class provider in Skylark #4370
Labels
P1
I'll work on this now. (Assignee required)
team-Rules-CPP
Issues for C++ rules
type: feature request
Description of the feature request
It's possible to write Skylark rules that have
cc_*
rules as dependencies. Via theCcSkylarkApiProvider
, it's possible for these Skylark rules to e.g. collect the list of transitive header files from these dependencies. But,CcSkylarkApiProvider
,CcSkylarkApiProvider
.A workaround for (2) is:
where one would expect to be able to use:
Underlying both (1) and (2) is the fact that unlike say
DefaultInfo
andOutputGroupInfo
,CcSkylarkApiProvider
, along with many other native providers, are not exported to Skylark as a global.My use case for (1) is writing a replacement for
cc_import
in Skylark, since that rule does not currently provideCcSkylarkApiProvider
.Environment info
bazel info release
): 0.9.0Have you found anything relevant by searching the web?
I've seen mention of "Bazel sandwiches" where is some language. e.g. https://blog.bazel.build/2017/03/07/java-sandwich.html. It looks like for Java at least, the equivalent of (2) above is possible. Though the blog post mentions that the equivalent of (1) is still not possible. The Java functionality is provided via the
java_common
struct. For C/C++, the corresponding structcc_common
does not expose the corresponding methods.Also related: #2163
Anything else, information or logs or outputs that would be helpful?
(If they are large, please upload as attachment or provide link).
The text was updated successfully, but these errors were encountered: