Skip to content

Using flatbuffer rules from baselibs#173

Draft
MaciejKaszynski wants to merge 1 commit intoeclipse-score:mainfrom
etas-contrib:use-fbs-rules
Draft

Using flatbuffer rules from baselibs#173
MaciejKaszynski wants to merge 1 commit intoeclipse-score:mainfrom
etas-contrib:use-fbs-rules

Conversation

@MaciejKaszynski
Copy link
Copy Markdown
Contributor

Fixes #154

@github-actions
Copy link
Copy Markdown

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run --lockfile_mode=error //:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
Extracting Bazel installation...
Starting local Bazel server (8.4.2) and connecting to it...
INFO: Invocation ID: aaf01b6e-ec43-40ce-8198-5eec9bd73184
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
WARNING: For repository 'rules_python', the root module requires module version rules_python@1.8.3, but got rules_python@1.8.5 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'rules_cc', the root module requires module version rules_cc@0.2.16, but got rules_cc@0.2.17 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'score_bazel_platforms', the root module requires module version score_bazel_platforms@0.0.4, but got score_bazel_platforms@0.1.2 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'score_tooling', the root module requires module version score_tooling@1.1.0, but got score_tooling@1.1.2 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'score_rust_policies', the root module requires module version score_rust_policies@0.0.3, but got score_rust_policies@0.0.5 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
Computing main repo mapping: 
Loading: 
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
    currently loading: 
Loading: 0 packages loaded
    currently loading: 
Loading: 0 packages loaded
    currently loading: 
Loading: 0 packages loaded
    currently loading: 
Analyzing: target //:license-check (1 packages loaded, 0 targets configured)
Analyzing: target //:license-check (1 packages loaded, 0 targets configured)

Analyzing: target //:license-check (45 packages loaded, 10 targets configured)

Analyzing: target //:license-check (106 packages loaded, 68 targets configured)

Analyzing: target //:license-check (147 packages loaded, 2658 targets configured)

Analyzing: target //:license-check (151 packages loaded, 5887 targets configured)

Analyzing: target //:license-check (163 packages loaded, 7899 targets configured)

Analyzing: target //:license-check (163 packages loaded, 7899 targets configured)

INFO: Analyzed target //:license-check (168 packages loaded, 10037 targets configured).
[1 / 13] [Prepa] Expanding template license.check.license_check
[14 / 16] [Prepa] JavaToolchainCompileBootClasspath external/rules_java+/toolchains/platformclasspath.jar
[15 / 16] Building license.check.license_check.jar (); 0s disk-cache
INFO: Found 1 target...
Target //:license.check.license_check up-to-date:
  bazel-bin/license.check.license_check
  bazel-bin/license.check.license_check.jar
INFO: Elapsed time: 23.651s, Critical Path: 2.65s
INFO: 16 processes: 12 internal, 3 processwrapper-sandbox, 1 worker.
INFO: Build completed successfully, 16 total actions
INFO: Running command line: bazel-bin/license.check.license_check ./formatted.txt <args omitted>
usage: org.eclipse.dash.licenses.cli.Main [-batch <int>] [-cd <url>]
       [-confidence <int>] [-ef <url>] [-excludeSources <sources>] [-help] [-lic
       <url>] [-project <shortname>] [-repo <url>] [-review] [-summary <file>]
       [-timeout <seconds>] [-token <token>]

@github-actions
Copy link
Copy Markdown

The created documentation from the pull request is available at: docu-html

@@ -1,77 +0,0 @@
def _flatbuffer_json_to_bin_impl(ctx):
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
    )

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generate flatbuffers header files

2 participants