Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cc provider digestable from Skylark rule implementation #2163

Closed
abergmeier opened this issue Dec 1, 2016 · 8 comments
Closed

cc provider digestable from Skylark rule implementation #2163

abergmeier opened this issue Dec 1, 2016 · 8 comments
Assignees
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) team-Rules-CPP Issues for C++ rules type: feature request

Comments

@abergmeier
Copy link
Contributor

Description of the problem / feature request / question:

I have a rule implementation, which generates a C++ header. This header then needs to be includeable by its name alone. Naively looking at CcSkylarkApiProvider I would do the following:

return struct(
    files = set([gen_file]),
    cc = struct(
        transitive_headers = set([gen_file]),
        include_directories = set([gen_dir]),
    ),
)

Which leads to the error message:

in deps attribute of cc_test rule //:flattests: cpp_schema rule '//:tests/monster_test_generated' is misplaced here (expected cc_inc_library, cc_library, objc_library or experimental_objc_library).

So it seems like there is no way of defining and digesting cc Provider in Skylark.

Environment info

  • Operating System: Ubuntu 16.04.1

  • Bazel version (output of bazel info release): 0.4.1

Anything else, information or logs or outputs that would be helpful?

Nope.

@hlopko
Copy link
Member

hlopko commented Dec 2, 2016

Hi Andreas,

what you describe is what we internally call "sandwich" (design doc). We have some rudimentary support for taking CcLinkParams from one native rule and passing it to another native rule, but not much more.

The good news is that we are going to work on this very soon, hopefully in January. The prerequisite cleanup and preparation work is already happening.

@hlopko
Copy link
Member

hlopko commented May 23, 2017

Just an update, still cleaning stuff up, actual work on C++ sandwich hasn't yet started.

@hlopko hlopko modified the milestones: 0.8, 0.6 Sep 3, 2017
@steeve
Copy link
Contributor

steeve commented Dec 20, 2017

@mhlopko hey, did the work start ? :)

@hlopko
Copy link
Member

hlopko commented Dec 20, 2017

Yes :) @ventrescadeatun is already investigating how the api should look like and doing the required cleanups. Design doc will be shared in Q1.

@steeve
Copy link
Contributor

steeve commented Dec 20, 2017

Awesome! Thank you for the quick response

@RNabel
Copy link
Contributor

RNabel commented Jun 19, 2018

@mhlopko Has there been progress on this issue, and/or did the design doc get published yet?

@oquenchil
Copy link
Contributor

I have a prototype and I am planning to send it for review to the Skylark people sometime in the next few weeks. I will update this issue: #4570

@hlopko hlopko added team-Rules-CPP Issues for C++ rules and removed category: rules > C++ labels Oct 11, 2018
@jmmv jmmv removed this from the 0.8 milestone Mar 14, 2019
@hlopko
Copy link
Member

hlopko commented Mar 27, 2019

I'm closing this one, both CcToolchainInfo and CcInfo are fully released and exposed to Starlark.

@hlopko hlopko closed this as completed Mar 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) team-Rules-CPP Issues for C++ rules type: feature request
Projects
None yet
Development

No branches or pull requests

10 participants