-
Notifications
You must be signed in to change notification settings - Fork 88
Implement fbs schema & json to fbs converter tool #738
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -87,6 +87,8 @@ | |
| //score/mw/com/dependability:mw_com_rst | ||
| //score/mw/com/example/com-api-example:com-api-example | ||
| //score/mw/com/impl/bindings/mock_binding:generic_skeleton_event | ||
| //score/mw/com/impl/configuration/converter:json_to_flatbuffer | ||
| //score/mw/com/impl/configuration/converter:mw_com_config.bin | ||
|
Comment on lines
+90
to
+91
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should guard this via the experimental flag - and since the experimental flag is per default off, these targets should net yet be publicly visible.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it okay if I remove them from here and add them to EXCLUDED_PUBLIC_TARGETS in quality/visibility_guard/parser.py?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, as Long as it is Experimental it should Not be public |
||
| //score/mw/com/impl/configuration:mw_com_config.json | ||
| //score/mw/com/impl/configuration:mw_com_config_disabled_trace_config.json | ||
| //score/mw/com/impl/configuration:mw_com_config_invalid_trace_config_path.json | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| # ******************************************************************************* | ||
| # Copyright (c) 2026 Contributors to the Eclipse Foundation | ||
| # | ||
| # See the NOTICE file(s) distributed with this work for additional | ||
| # information regarding copyright ownership. | ||
| # | ||
| # This program and the accompanying materials are made available under the | ||
| # terms of the Apache License Version 2.0 which is available at | ||
| # https://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # ******************************************************************************* | ||
|
|
||
| load("@rules_python//python:defs.bzl", "py_binary", "py_test") | ||
| load("//score/mw/com/impl/configuration:flatbuffers_flags.bzl", "FLATBUFFERS_TARGET_COMPATIBLE_WITH") | ||
| load(":json_to_flatbuffer_rule.bzl", "mw_com_config_to_flatbuffer") | ||
|
|
||
| py_binary( | ||
| name = "json_to_flatbuffer", | ||
| srcs = [ | ||
| "json_to_flatbuffer.py", | ||
| ], | ||
| imports = ["."], | ||
| main = "json_to_flatbuffer.py", | ||
| visibility = ["//visibility:public"], | ||
| ) | ||
|
|
||
| # Requires FlatBuffers support (see //score/mw/com/impl/configuration:flatbuffers_flags.bzl): | ||
| # bazel test --config=flatbuffers :json_to_flatbuffer_test | ||
| py_test( | ||
| name = "json_to_flatbuffer_test", | ||
| size = "small", | ||
| srcs = [ | ||
| "json_to_flatbuffer.py", | ||
| "json_to_flatbuffer_test.py", | ||
| ], | ||
| data = [ | ||
| "//score/mw/com/impl/configuration:example/mw_com_config.json", | ||
| "//score/mw/com/impl/configuration:mw_com_config.fbs", | ||
| "@flatbuffers//:flatc", | ||
| ], | ||
| env = { | ||
| "FLATC_PATH": "$(rootpath @flatbuffers//:flatc)", | ||
| }, | ||
| imports = ["."], | ||
| main = "json_to_flatbuffer_test.py", | ||
| target_compatible_with = FLATBUFFERS_TARGET_COMPATIBLE_WITH, | ||
| ) | ||
|
|
||
| # Example: build the FlatBuffer binary for the example configuration as part of | ||
| # the build graph. Requires FlatBuffers support to be enabled: | ||
| # bazel build --config=flatbuffers //score/mw/com/impl/configuration/converter:mw_com_config.bin | ||
| mw_com_config_to_flatbuffer( | ||
| name = "mw_com_config.bin", | ||
| out = "mw_com_config.bin", | ||
| config_json = "//score/mw/com/impl/configuration:example/mw_com_config.json", | ||
| target_compatible_with = FLATBUFFERS_TARGET_COMPATIBLE_WITH, | ||
| visibility = ["//visibility:public"], | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we please name this
experimental_enable_flatbuffer_configurationThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will