Using flatbuffer rules from baselibs#173
Draft
MaciejKaszynski wants to merge 1 commit intoeclipse-score:mainfrom
Draft
Using flatbuffer rules from baselibs#173MaciejKaszynski wants to merge 1 commit intoeclipse-score:mainfrom
MaciejKaszynski wants to merge 1 commit intoeclipse-score:mainfrom
Conversation
License Check Results🚀 The license check job ran with the Bazel command: bazel run --lockfile_mode=error //:license-checkStatus: Click to expand output |
|
The created documentation from the pull request is available at: docu-html |
| @@ -1,77 +0,0 @@ | |||
| def _flatbuffer_json_to_bin_impl(ctx): | |||
There was a problem hiding this comment.
If you want to provide a Starlark rule for a user of lifecycle please consider creating something like this:
load("@score_baselibs//score/flatbuffers/bazel:tools.bzl", "serialize_buffer")
_LIFECYCLE_CONFIG_SCHEMA = "@score_lifecycle_health//<bazel target of schema>"
def generate_lifecycle_config_bin(name, input, output, **kwargs):
"""Generates a binary buffer file from a Lifecycle config JSON file.
Wraps serialize_buffer with the hardcoded Lifecycle config FlatBuffer schema.
Args:
name: The name of the target.
input: The JSON input file to convert to binary (label or path).
output: The name of the generated binary file (should end with .bin).
Example:
load("@score_lifecycle_health//...:<this file>.bzl", "generate_lifecycle_config_bin")
generate_lifecycle_config_bin(
name = "my_lifecycle_config_bin",
input = "my_lifecycle_config.json",
output = "my_lifecycle_config.bin",
)
"""
serialize_buffer(
name = name,
data = input,
schema = _LIFECYCLE_CONFIG_SCHEMA,
output = output,
**kwargs
)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #154