Skip to content

Commit 70c9b2a

Browse files
Using flatbuffer rules from baselibs
1 parent 7fc47fb commit 70c9b2a

15 files changed

Lines changed: 141 additions & 3285 deletions

File tree

.bazelrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ build:toolchain_common --host_platform=@score_bazel_platforms//:x86_64-linux
3636
## Ferrocene must be common compiler for HOST. To ensure metadata compatibility for proc macro crate
3737
build:toolchain_common --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_unknown_linux_gnu
3838
build:stub --@score_baselibs//score/mw/log/flags:KRemote_Logging=False
39-
build:stub --@score_logging//score/mw/log/flags:KRemote_Logging=False
4039
build:stub --@score_baselibs//score/json:base_library=nlohmann
4140

4241
# Target configuration for running integration tests on localhost

MODULE.bazel

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,11 @@ use_repo(oci, "debian-test-runtime", "debian-test-runtime_linux_amd64")
154154

155155
bazel_dep(name = "score_baselibs_rust", version = "0.1.1")
156156
bazel_dep(name = "score_baselibs", version = "0.2.4")
157-
bazel_dep(name = "score_logging", version = "0.1.0")
157+
git_override(
158+
module_name = "score_baselibs",
159+
commit = "4de0029b909ae039e159c73d17511926cf476d19",
160+
remote = "https://github.com/eclipse-score/baselibs.git",
161+
)
158162

159163
# TODO: remove once inherited properly from `score_logging`.
160164
bazel_dep(name = "trlc", version = "0.0.0", dev_dependency = True)

MODULE.bazel.lock

Lines changed: 61 additions & 239 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/flatbuffers_rules.bzl

Lines changed: 0 additions & 77 deletions
This file was deleted.

scripts/config_mapping/config.bzl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,17 +117,17 @@ launch_manager_config = rule(
117117
),
118118
"lm_schema": attr.label(
119119
allow_single_file = [".fbs"],
120-
default = Label("//src/launch_manager_daemon:lm_flatcfg_fbs"),
120+
default = Label("//src/launch_manager_daemon/config:lm_flatcfg.fbs"),
121121
doc = "Launch Manager fbs file to use",
122122
),
123123
"hm_schema": attr.label(
124124
allow_single_file = [".fbs"],
125-
default = Label("//src/launch_manager_daemon/health_monitor_lib:hm_flatcfg_fbs"),
125+
default = Label("//src/launch_manager_daemon/health_monitor_lib/config:hm_flatcfg.fbs"),
126126
doc = "HealthMonitor fbs file to use",
127127
),
128128
"hmcore_schema": attr.label(
129129
allow_single_file = [".fbs"],
130-
default = Label("//src/launch_manager_daemon/health_monitor_lib:hmcore_flatcfg_fbs"),
130+
default = Label("//src/launch_manager_daemon/health_monitor_lib/config:hmcore_flatcfg.fbs"),
131131
doc = "HealthMonitor core fbs file to use",
132132
),
133133
},

src/launch_manager_daemon/BUILD

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,6 @@ load("//config:common_cc.bzl", "cc_binary_with_common_opts", "cc_library_with_co
1414

1515
package(default_visibility = ["//tests:__subpackages__"])
1616

17-
filegroup(
18-
name = "lm_flatcfg_fbs",
19-
srcs = ["//src/launch_manager_daemon/config:lm_flatcfg.fbs"],
20-
visibility = ["//visibility:public"],
21-
)
22-
23-
cc_library(
24-
name = "config",
25-
hdrs = ["//src/launch_manager_daemon/config:lm_flatcfg_generated.h"],
26-
includes = ["config"],
27-
visibility = ["//src:__pkg__"],
28-
)
2917

3018
cc_binary_with_common_opts(
3119
name = "launch_manager",
@@ -42,7 +30,7 @@ cc_binary_with_common_opts(
4230
}),
4331
visibility = ["//visibility:public"],
4432
deps = [
45-
":config",
33+
"//src/launch_manager_daemon/config:config_lib",
4634
"//externals/ipc_dropin",
4735
"//src/launch_manager_daemon/common",
4836
"//src/launch_manager_daemon/common:control_client_channel",
@@ -74,8 +62,7 @@ cc_library(
7462
"src",
7563
],
7664
deps = [
77-
# Must match launch_manager deps
78-
":config",
65+
"//src/launch_manager_daemon/config:config_lib",
7966
"//externals/ipc_dropin",
8067
"//src/launch_manager_daemon/common",
8168
"//src/launch_manager_daemon/common:control_client_channel",

src/launch_manager_daemon/config/BUILD

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,24 @@
1010
#
1111
# SPDX-License-Identifier: Apache-2.0
1212
# *******************************************************************************
13+
load("@score_baselibs//score/flatbuffers/bazel:codegen.bzl", "generate_cpp")
14+
1315
exports_files([
1416
"lm_flatcfg.fbs",
15-
"lm_flatcfg_generated.h",
16-
])
17+
],
18+
visibility = ["//visibility:public"],
19+
)
20+
21+
generate_cpp(
22+
name = "config",
23+
output = "lm_flatcfg_generated.h",
24+
schema = "lm_flatcfg.fbs",
25+
visibility = ["//visibility:public"],
26+
)
27+
28+
cc_library(
29+
name = "config_lib",
30+
hdrs = [":config"],
31+
strip_include_prefix = ".",
32+
visibility = ["//visibility:public"],
33+
)

0 commit comments

Comments
 (0)