Add FlatBuffers dependency and inital set of starlark rules for cpp.#131
Add FlatBuffers dependency and inital set of starlark rules for cpp.#131OliverHeilwagen wants to merge 3 commits intoeclipse-score:mainfrom
Conversation
|
The created documentation from the pull request is available at: docu-html |
| allow_single_file = [".fbs"], | ||
| mandatory = True, | ||
| doc = "The .fbs FlatBuffer schema file that defines the data structure", | ||
| ), |
There was a problem hiding this comment.
Note: Rule will be extend to also support include of other schemas with issue #128
| ) | ||
|
|
||
| # Symlink to the requested output name | ||
| ctx.actions.symlink(output = out_header, target_file = generated_file) |
There was a problem hiding this comment.
@paulquiring I found this improvement so we don't require the mv step
| @@ -0,0 +1,59 @@ | |||
| /// Demo FlatBuffer schema for a component | |||
There was a problem hiding this comment.
@paulquiring I slightly changed the rule tests to avoid duplication of the small test schemas.
|
|
||
| return [DefaultInfo(files = depset([out_bin]))] | ||
|
|
||
| serialize_buffer = rule( |
There was a problem hiding this comment.
Note: Rule extension to also perform opt-in schema validation needs to be planned.
Common JSON schema validation rule for JSON-Library and FlatBuffers-Library should be created.
| @@ -0,0 +1,130 @@ | |||
| # ******************************************************************************* | |||
There was a problem hiding this comment.
@4og In other modules i noticed the public bazel rules are under //bazel/tools (e.g. for someip)
As the rule only belongs to the flatbuffers component i would suggest to place it here //score/flatbuffers/bazel.
Please check if the location is fine.
resolve issue #124