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

Open
abergmeier opened this Issue Dec 1, 2016 · 7 comments

Comments

@abergmeier
Contributor

abergmeier commented Dec 1, 2016

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.

@mhlopko

This comment has been minimized.

Contributor

mhlopko 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.

@mhlopko

This comment has been minimized.

Contributor

mhlopko commented May 23, 2017

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

@mhlopko mhlopko modified the milestones: 0.8, 0.6 Sep 3, 2017

@steeve

This comment has been minimized.

steeve commented Dec 20, 2017

@mhlopko hey, did the work start ? :)

@mhlopko

This comment has been minimized.

Contributor

mhlopko 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

This comment has been minimized.

steeve commented Dec 20, 2017

Awesome! Thank you for the quick response

@RNabel

This comment has been minimized.

Contributor

RNabel commented Jun 19, 2018

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

@oquenchil

This comment has been minimized.

Contributor

oquenchil commented Jun 20, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment