Update ~all flatbuffer rules to static_flatbuffer rules
Don't update things that use unions or circular dependencies.
Used buildozer to make most changes; didn't document the precise steps,
but the approximate steps were:
* Alter the load statements to use the new rule.
* Make all flatbuffer_cc_library rules:
* No longer specify gen_reflections.
* Move all includes attributes to use deps (including stripping the
_includes prefix off of the items in the includes list).
* Rename all flatbuffer_cc_library rules to static_flatbuffer rules.
* Manually fix the spyglass flatbuffer_py_library target that depended
directly on some outputs of the flatbuffer_cc_library macro.
* Manually undo anything that can't build with the new rules (should
just be the json_to_flatbuffer target, web_proxy_fbs, and one of the
flatbuffers used to test the static flatbuffers codegen itself).
* Run the cleanup to get rid of unused load statements.
Change-Id: Ie37a13585228847b19177dc86a9aa603ad90e890
Signed-off-by: James Kuszmaul <james.kuszmaul@bluerivertech.com>
diff --git a/aos/BUILD b/aos/BUILD
index 899d4eb..4d041ca 100644
--- a/aos/BUILD
+++ b/aos/BUILD
@@ -1,4 +1,5 @@
load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library", "flatbuffer_py_library", "flatbuffer_rust_library")
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library")
load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test")
load("//aos:flatbuffers.bzl", "cc_static_flatbuffer")
@@ -233,10 +234,9 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "configuration_fbs",
srcs = ["configuration.fbs"],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
@@ -364,7 +364,7 @@
flatbuffer_cc_library(
name = "json_to_flatbuffer_fbs",
srcs = ["json_to_flatbuffer.fbs"],
- gen_reflections = 1,
+ gen_reflections = True,
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//aos:__subpackages__"],
)
diff --git a/aos/actions/BUILD b/aos/actions/BUILD
index a76dc3f..5667c12 100644
--- a/aos/actions/BUILD
+++ b/aos/actions/BUILD
@@ -1,4 +1,4 @@
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("//aos:config.bzl", "aos_config")
package(default_visibility = ["//visibility:public"])
@@ -23,24 +23,21 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "actions_fbs",
srcs = ["actions.fbs"],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "test_action_fbs",
srcs = ["test_action.fbs"],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "test_action2_fbs",
srcs = ["test_action2.fbs"],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
diff --git a/aos/events/BUILD b/aos/events/BUILD
index 4d76023..9910fc6 100644
--- a/aos/events/BUILD
+++ b/aos/events/BUILD
@@ -1,4 +1,4 @@
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library", "flatbuffer_rust_library")
+load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_rust_library")
load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library")
load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("//aos:flatbuffers.bzl", "cc_static_flatbuffer")
@@ -19,10 +19,9 @@
target = ":test_message_fbs_fbs_reflection_out",
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "event_loop_fbs",
srcs = ["event_loop.fbs"],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
deps = ["//aos:configuration_fbs"],
)
diff --git a/aos/events/logging/BUILD b/aos/events/logging/BUILD
index a9c8497..37238d9 100644
--- a/aos/events/logging/BUILD
+++ b/aos/events/logging/BUILD
@@ -1,22 +1,20 @@
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("//aos:config.bzl", "aos_config")
load("//aos:flatbuffers.bzl", "cc_static_flatbuffer")
-flatbuffer_cc_library(
+static_flatbuffer(
name = "logger_fbs",
srcs = ["logger.fbs"],
- gen_reflections = True,
- includes = [
- "//aos:configuration_fbs_includes",
- ],
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
+ deps = [
+ "//aos:configuration_fbs",
+ ],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "replay_timing_fbs",
srcs = ["replay_timing.fbs"],
- gen_reflections = True,
target_compatible_with = ["@platforms//os:linux"],
)
@@ -27,10 +25,9 @@
visibility = ["//visibility:public"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "log_replayer_stats_fbs",
srcs = ["log_replayer_stats.fbs"],
- gen_reflections = True,
target_compatible_with = ["@platforms//os:linux"],
deps = [
":replay_config_fbs",
@@ -44,10 +41,9 @@
visibility = ["//visibility:public"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "replay_config_fbs",
srcs = ["log_replayer_config.fbs"],
- gen_reflections = True,
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
deps = [
@@ -958,10 +954,9 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "test_message_fbs",
srcs = ["test_message.fbs"],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
diff --git a/aos/logging/BUILD b/aos/logging/BUILD
index e179d6b..9bd4807 100644
--- a/aos/logging/BUILD
+++ b/aos/logging/BUILD
@@ -1,4 +1,4 @@
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("//aos:flatbuffers.bzl", "cc_static_flatbuffer")
# The primary client logging interface.
@@ -52,10 +52,9 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "log_message_fbs",
srcs = ["log_message.fbs"],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
@@ -67,12 +66,11 @@
visibility = ["//visibility:public"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "dynamic_log_command_fbs",
srcs = [
"dynamic_log_command.fbs",
],
- gen_reflections = 1,
visibility = ["//visibility:public"],
)
diff --git a/aos/network/BUILD b/aos/network/BUILD
index 7a8ceb5..cd31731 100644
--- a/aos/network/BUILD
+++ b/aos/network/BUILD
@@ -1,3 +1,4 @@
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("//aos/seasocks:gen_embedded.bzl", "gen_embedded")
load("//aos:config.bzl", "aos_config")
load("//aos:flatbuffers.bzl", "cc_static_flatbuffer")
@@ -9,10 +10,9 @@
package(default_visibility = ["//visibility:public"])
-flatbuffer_cc_library(
+static_flatbuffer(
name = "remote_message_fbs",
srcs = ["remote_message.fbs"],
- gen_reflections = 1,
)
cc_static_flatbuffer(
@@ -21,14 +21,13 @@
target = ":remote_message_fbs_reflection_out",
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "connect_fbs",
srcs = ["connect.fbs"],
- gen_reflections = 1,
- includes = [
- "//aos:configuration_fbs_includes",
- ],
target_compatible_with = ["@platforms//os:linux"],
+ deps = [
+ "//aos:configuration_fbs",
+ ],
)
flatbuffer_ts_library(
@@ -40,21 +39,19 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "remote_data_fbs",
srcs = ["remote_data.fbs"],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "timestamp_fbs",
srcs = ["timestamp.fbs"],
- gen_reflections = 1,
- includes = [
- "//aos:configuration_fbs_includes",
- ],
target_compatible_with = ["@platforms//os:linux"],
+ deps = [
+ "//aos:configuration_fbs",
+ ],
)
cc_static_flatbuffer(
@@ -64,10 +61,9 @@
visibility = ["//visibility:public"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "message_bridge_client_fbs",
srcs = ["message_bridge_client.fbs"],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
deps = [
":message_bridge_server_fbs",
@@ -90,10 +86,9 @@
visibility = ["//visibility:public"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "sctp_config_fbs",
srcs = ["sctp_config.fbs"],
- gen_reflections = 1,
)
cc_static_flatbuffer(
@@ -102,10 +97,9 @@
target = ":sctp_config_fbs_reflection_out",
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "sctp_config_request_fbs",
srcs = ["sctp_config_request.fbs"],
- gen_reflections = 1,
)
cc_static_flatbuffer(
@@ -115,10 +109,9 @@
visibility = ["//visibility:public"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "message_bridge_server_fbs",
srcs = ["message_bridge_server.fbs"],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
deps = [
"//aos:configuration_fbs",
@@ -624,11 +617,11 @@
name = "web_proxy_fbs",
srcs = ["web_proxy.fbs"],
gen_reflections = True,
- includes = [
- ":connect_fbs_includes",
- "//aos:configuration_fbs_includes",
- ],
target_compatible_with = ["@platforms//os:linux"],
+ deps = [
+ ":connect_fbs_fbs",
+ "//aos:configuration_fbs_fbs",
+ ],
)
flatbuffer_ts_library(
diff --git a/aos/starter/BUILD b/aos/starter/BUILD
index 1873166..a7d7e02 100644
--- a/aos/starter/BUILD
+++ b/aos/starter/BUILD
@@ -1,4 +1,4 @@
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("//aos:config.bzl", "aos_config")
exports_files(["roborio_irq_config.json"])
@@ -183,27 +183,24 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "starter_fbs",
srcs = ["starter.fbs"],
- gen_reflections = True,
- includes = ["//aos/util:process_info_fbs_includes"],
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
+ deps = ["//aos/util:process_info_fbs"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "kthread_fbs",
srcs = ["kthread.fbs"],
- gen_reflections = True,
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "starter_rpc_fbs",
srcs = ["starter_rpc.fbs"],
- gen_reflections = True,
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
diff --git a/aos/util/BUILD b/aos/util/BUILD
index 8450298..2caea22 100644
--- a/aos/util/BUILD
+++ b/aos/util/BUILD
@@ -1,4 +1,4 @@
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("//aos:flatbuffers.bzl", "cc_static_flatbuffer")
load("config_validator_macro.bzl", "config_validator_test")
@@ -79,10 +79,9 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "clock_timepoints_fbs",
srcs = ["clock_timepoints.fbs"],
- gen_reflections = True,
deps = ["//aos:configuration_fbs"],
)
@@ -368,10 +367,9 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "process_info_fbs",
srcs = ["process_info.fbs"],
- gen_reflections = True,
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
@@ -536,7 +534,7 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "config_validator_config_fbs",
srcs = ["config_validator_config.fbs"],
target_compatible_with = ["@platforms//os:linux"],
diff --git a/documentation/aos/examples/BUILD b/documentation/aos/examples/BUILD
index f224409..bf3e2eb 100644
--- a/documentation/aos/examples/BUILD
+++ b/documentation/aos/examples/BUILD
@@ -1,9 +1,8 @@
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
-flatbuffer_cc_library(
+static_flatbuffer(
name = "sensor_data_fbs",
srcs = ["sensor_data.fbs"],
- gen_reflections = True,
)
cc_library(
diff --git a/frc971/BUILD b/frc971/BUILD
index 4287462..a861316 100644
--- a/frc971/BUILD
+++ b/frc971/BUILD
@@ -1,4 +1,4 @@
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
package(default_visibility = ["//visibility:public"])
@@ -26,12 +26,11 @@
visibility = ["//visibility:public"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "can_configuration_fbs",
srcs = [
":can_configuration.fbs",
],
- gen_reflections = 1,
visibility = ["//visibility:public"],
)
diff --git a/frc971/analysis/BUILD b/frc971/analysis/BUILD
index 9b9ab86..93f50f4 100644
--- a/frc971/analysis/BUILD
+++ b/frc971/analysis/BUILD
@@ -1,5 +1,5 @@
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("//tools/build_rules:js.bzl", "rollup_bundle", "ts_project")
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library")
load("//aos:config.bzl", "aos_config")
@@ -112,12 +112,11 @@
target_compatible_with = ["@platforms//os:linux"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "plot_data_fbs",
srcs = [
"plot_data.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
diff --git a/frc971/autonomous/BUILD b/frc971/autonomous/BUILD
index 58dce60..d5b8cdc 100644
--- a/frc971/autonomous/BUILD
+++ b/frc971/autonomous/BUILD
@@ -1,20 +1,18 @@
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("//aos:config.bzl", "aos_config")
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
package(default_visibility = ["//visibility:public"])
-flatbuffer_cc_library(
+static_flatbuffer(
name = "auto_fbs",
srcs = ["auto.fbs"],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "auto_mode_fbs",
srcs = ["auto_mode.fbs"],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
diff --git a/frc971/can_logger/BUILD b/frc971/can_logger/BUILD
index a18a379..f568aa9 100644
--- a/frc971/can_logger/BUILD
+++ b/frc971/can_logger/BUILD
@@ -1,4 +1,4 @@
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
cc_binary(
name = "can_logger",
@@ -29,12 +29,11 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "can_logging_fbs",
srcs = [
"can_logging.fbs",
],
- gen_reflections = 1,
visibility = ["//visibility:public"],
)
diff --git a/frc971/codelab/BUILD b/frc971/codelab/BUILD
index 4e1da3d..5e0c1ea 100644
--- a/frc971/codelab/BUILD
+++ b/frc971/codelab/BUILD
@@ -1,4 +1,4 @@
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("//aos:config.bzl", "aos_config")
package(default_visibility = ["//visibility:public"])
@@ -37,39 +37,35 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "basic_goal_fbs",
srcs = [
"basic_goal.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "basic_output_fbs",
srcs = [
"basic_output.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "basic_status_fbs",
srcs = [
"basic_status.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "basic_position_fbs",
srcs = [
"basic_position.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
diff --git a/frc971/constants/testdata/BUILD b/frc971/constants/testdata/BUILD
index a20264c..fee7b86 100644
--- a/frc971/constants/testdata/BUILD
+++ b/frc971/constants/testdata/BUILD
@@ -1,26 +1,24 @@
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("//aos:config.bzl", "aos_config")
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
exports_files([
"test_constants.json",
"syntax_error.json",
])
-flatbuffer_cc_library(
+static_flatbuffer(
name = "constants_list_fbs",
srcs = ["constants_list.fbs"],
- gen_reflections = 1,
- includes = [
- ":constants_data_fbs_includes",
- ],
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
+ deps = [
+ ":constants_data_fbs",
+ ],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "constants_data_fbs",
srcs = ["constants_data.fbs"],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
diff --git a/frc971/control_loops/BUILD b/frc971/control_loops/BUILD
index c03a964..1a98691 100644
--- a/frc971/control_loops/BUILD
+++ b/frc971/control_loops/BUILD
@@ -1,5 +1,5 @@
load("//aos:config.bzl", "aos_config")
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library")
package(default_visibility = ["//visibility:public"])
@@ -192,7 +192,7 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "control_loops_fbs",
srcs = [
"control_loops.fbs",
@@ -206,7 +206,7 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "can_falcon_fbs",
srcs = [
"can_falcon.fbs",
@@ -395,15 +395,15 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "profiled_subsystem_fbs",
srcs = [
"profiled_subsystem.fbs",
],
- includes = [
- ":control_loops_fbs_includes",
- ],
target_compatible_with = ["@platforms//os:linux"],
+ deps = [
+ ":control_loops_fbs",
+ ],
)
cc_library(
@@ -575,76 +575,70 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "static_zeroing_single_dof_profiled_subsystem_test_subsystem_goal_fbs",
srcs = [
"static_zeroing_single_dof_profiled_subsystem_test_subsystem_goal.fbs",
],
- gen_reflections = 1,
- includes = [
- ":control_loops_fbs_includes",
- ":profiled_subsystem_fbs_includes",
- ],
target_compatible_with = ["@platforms//os:linux"],
+ deps = [
+ ":control_loops_fbs",
+ ":profiled_subsystem_fbs",
+ ],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "static_zeroing_single_dof_profiled_subsystem_test_subsystem_output_fbs",
srcs = [
"static_zeroing_single_dof_profiled_subsystem_test_subsystem_output.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_position_fbs",
srcs = [
"static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_position.fbs",
],
- gen_reflections = 1,
- includes = [
- ":control_loops_fbs_includes",
- ],
target_compatible_with = ["@platforms//os:linux"],
+ deps = [
+ ":control_loops_fbs",
+ ],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "static_zeroing_single_dof_profiled_subsystem_test_absolute_position_fbs",
srcs = [
"static_zeroing_single_dof_profiled_subsystem_test_absolute_position.fbs",
],
- gen_reflections = 1,
- includes = [
- ":control_loops_fbs_includes",
- ],
target_compatible_with = ["@platforms//os:linux"],
+ deps = [
+ ":control_loops_fbs",
+ ],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_encoder_status_fbs",
srcs = [
"static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_encoder_status.fbs",
],
- gen_reflections = 1,
- includes = [
- ":control_loops_fbs_includes",
- ":profiled_subsystem_fbs_includes",
- ],
target_compatible_with = ["@platforms//os:linux"],
+ deps = [
+ ":control_loops_fbs",
+ ":profiled_subsystem_fbs",
+ ],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "static_zeroing_single_dof_profiled_subsystem_test_absolute_encoder_status_fbs",
srcs = [
"static_zeroing_single_dof_profiled_subsystem_test_absolute_encoder_status.fbs",
],
- gen_reflections = 1,
- includes = [
- ":control_loops_fbs_includes",
- ":profiled_subsystem_fbs_includes",
- ],
target_compatible_with = ["@platforms//os:linux"],
+ deps = [
+ ":control_loops_fbs",
+ ":profiled_subsystem_fbs",
+ ],
)
cc_test(
diff --git a/frc971/control_loops/drivetrain/BUILD b/frc971/control_loops/drivetrain/BUILD
index e631799..424c257 100644
--- a/frc971/control_loops/drivetrain/BUILD
+++ b/frc971/control_loops/drivetrain/BUILD
@@ -1,5 +1,5 @@
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("//tools/build_rules:js.bzl", "ts_project")
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library")
load("//aos:config.bzl", "aos_config")
load("//tools/build_rules:select.bzl", "cpu_select")
@@ -7,54 +7,47 @@
package(default_visibility = ["//visibility:public"])
-flatbuffer_cc_library(
+static_flatbuffer(
name = "drivetrain_can_position_fbs",
srcs = ["drivetrain_can_position.fbs"],
- gen_reflections = 1,
deps = ["//frc971/control_loops:can_falcon_fbs"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "spline_goal_fbs",
srcs = ["spline_goal.fbs"],
- gen_reflections = 1,
- includes = ["//frc971/control_loops:control_loops_fbs_includes"],
+ deps = ["//frc971/control_loops:control_loops_fbs"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "drivetrain_goal_fbs",
srcs = ["drivetrain_goal.fbs"],
- gen_reflections = 1,
- includes = [
- ":spline_goal_fbs_includes",
- "//frc971/control_loops:control_loops_fbs_includes",
+ deps = [
+ ":spline_goal_fbs",
+ "//frc971/control_loops:control_loops_fbs",
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "drivetrain_output_fbs",
srcs = ["drivetrain_output.fbs"],
- gen_reflections = 1,
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "drivetrain_position_fbs",
srcs = ["drivetrain_position.fbs"],
- gen_reflections = 1,
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "drivetrain_status_fbs",
srcs = ["drivetrain_status.fbs"],
- gen_reflections = 1,
- includes = ["//frc971/control_loops:control_loops_fbs_includes"],
+ deps = ["//frc971/control_loops:control_loops_fbs"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "trajectory_fbs",
srcs = ["trajectory.fbs"],
- gen_reflections = 1,
- includes = ["//frc971/control_loops:control_loops_fbs_includes"],
+ deps = ["//frc971/control_loops:control_loops_fbs"],
)
cc_static_flatbuffer(
@@ -112,33 +105,29 @@
cmd = "cat $(SRCS) | sed 's/double/float/g' > $(OUTS)",
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "drivetrain_goal_float_fbs",
srcs = ["drivetrain_goal_float.fbs"],
- gen_reflections = 1,
- includes = [
- ":spline_goal_fbs_includes",
- "//frc971/control_loops:control_loops_fbs_includes",
+ deps = [
+ ":spline_goal_fbs",
+ "//frc971/control_loops:control_loops_fbs",
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "drivetrain_output_float_fbs",
srcs = ["drivetrain_output_float.fbs"],
- gen_reflections = 1,
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "drivetrain_position_float_fbs",
srcs = ["drivetrain_position_float.fbs"],
- gen_reflections = 1,
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "drivetrain_status_float_fbs",
srcs = ["drivetrain_status_float.fbs"],
- gen_reflections = 1,
- includes = ["//frc971/control_loops:control_loops_fbs_includes"],
+ deps = ["//frc971/control_loops:control_loops_fbs"],
)
aos_config(
@@ -228,10 +217,9 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "localizer_fbs",
srcs = ["localizer.fbs"],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
diff --git a/frc971/control_loops/drivetrain/localization/BUILD b/frc971/control_loops/drivetrain/localization/BUILD
index 06c8d57..7b86f09 100644
--- a/frc971/control_loops/drivetrain/localization/BUILD
+++ b/frc971/control_loops/drivetrain/localization/BUILD
@@ -1,4 +1,4 @@
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library")
cc_library(
@@ -49,12 +49,11 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "localizer_output_fbs",
srcs = [
"localizer_output.fbs",
],
- gen_reflections = True,
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
diff --git a/frc971/control_loops/drivetrain/swerve/BUILD b/frc971/control_loops/drivetrain/swerve/BUILD
index 06ba36a..5b94fa8 100644
--- a/frc971/control_loops/drivetrain/swerve/BUILD
+++ b/frc971/control_loops/drivetrain/swerve/BUILD
@@ -1,15 +1,13 @@
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
package(default_visibility = ["//visibility:public"])
-flatbuffer_cc_library(
+static_flatbuffer(
name = "swerve_drivetrain_output_fbs",
srcs = ["swerve_drivetrain_output.fbs"],
- gen_reflections = 1,
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "swerve_drivetrain_position_fbs",
srcs = ["swerve_drivetrain_position.fbs"],
- gen_reflections = 1,
)
diff --git a/frc971/control_loops/flywheel/BUILD b/frc971/control_loops/flywheel/BUILD
index 6399abe..0cf5d00 100644
--- a/frc971/control_loops/flywheel/BUILD
+++ b/frc971/control_loops/flywheel/BUILD
@@ -1,12 +1,11 @@
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library")
-flatbuffer_cc_library(
+static_flatbuffer(
name = "flywheel_controller_status_fbs",
srcs = [
"flywheel_controller_status.fbs",
],
- gen_reflections = 1,
visibility = ["//visibility:public"],
)
diff --git a/frc971/imu_reader/BUILD b/frc971/imu_reader/BUILD
index 4825900..cf2df44 100644
--- a/frc971/imu_reader/BUILD
+++ b/frc971/imu_reader/BUILD
@@ -1,4 +1,4 @@
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library")
cc_library(
@@ -22,7 +22,7 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "imu_failures_fbs",
srcs = [
"imu_failures.fbs",
diff --git a/frc971/input/BUILD b/frc971/input/BUILD
index 8515153..329dfce 100644
--- a/frc971/input/BUILD
+++ b/frc971/input/BUILD
@@ -1,5 +1,5 @@
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("//aos:config.bzl", "aos_config")
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
package(default_visibility = ["//visibility:public"])
@@ -90,17 +90,15 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "robot_state_fbs",
srcs = ["robot_state.fbs"],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "joystick_state_fbs",
srcs = ["joystick_state.fbs"],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
diff --git a/frc971/queues/BUILD b/frc971/queues/BUILD
index 17b610c..8d7563b 100644
--- a/frc971/queues/BUILD
+++ b/frc971/queues/BUILD
@@ -1,21 +1,19 @@
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
package(default_visibility = ["//visibility:public"])
-flatbuffer_cc_library(
+static_flatbuffer(
name = "gyro_fbs",
srcs = [
"gyro.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "gyro_uid_fbs",
srcs = [
"gyro_uid.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
diff --git a/frc971/vision/BUILD b/frc971/vision/BUILD
index 84f3be7..3c94b35 100644
--- a/frc971/vision/BUILD
+++ b/frc971/vision/BUILD
@@ -1,11 +1,11 @@
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library", "flatbuffer_py_library")
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
+load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_py_library")
load("//aos:config.bzl", "aos_config")
load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library")
-flatbuffer_cc_library(
+static_flatbuffer(
name = "vision_fbs",
srcs = ["vision.fbs"],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
@@ -17,10 +17,9 @@
visibility = ["//visibility:public"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "calibration_fbs",
srcs = ["calibration.fbs"],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
@@ -146,10 +145,9 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "target_map_fbs",
srcs = ["target_map.fbs"],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
diff --git a/frc971/wpilib/BUILD b/frc971/wpilib/BUILD
index ac9446e..1941a96 100644
--- a/frc971/wpilib/BUILD
+++ b/frc971/wpilib/BUILD
@@ -1,16 +1,15 @@
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("//tools/build_rules:js.bzl", "ts_project")
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library")
load("//aos:config.bzl", "aos_config")
package(default_visibility = ["//visibility:public"])
-flatbuffer_cc_library(
+static_flatbuffer(
name = "logging_fbs",
srcs = [
"logging.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
@@ -126,12 +125,11 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "loop_output_handler_test_fbs",
srcs = [
"loop_output_handler_test.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
@@ -229,12 +227,11 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "pdp_values_fbs",
srcs = [
"pdp_values.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
@@ -268,25 +265,23 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "imu_fbs",
srcs = [
"imu.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "imu_batch_fbs",
srcs = [
"imu_batch.fbs",
],
- gen_reflections = 1,
- includes = [
- ":imu_fbs_includes",
- ],
target_compatible_with = ["@platforms//os:linux"],
+ deps = [
+ ":imu_fbs",
+ ],
)
flatbuffer_ts_library(
diff --git a/third_party/foxglove/schemas/schemas.BUILD b/third_party/foxglove/schemas/schemas.BUILD
index a1a5d29..51b762f 100644
--- a/third_party/foxglove/schemas/schemas.BUILD
+++ b/third_party/foxglove/schemas/schemas.BUILD
@@ -1,12 +1,12 @@
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library", "DEFAULT_FLATC_ARGS")
+load("@com_github_google_flatbuffers//:build_defs.bzl", "DEFAULT_FLATC_ARGS", "flatbuffer_cc_library")
+load("@org_frc971//aos/flatbuffers:generate.bzl", "static_flatbuffer")
FLATC_ARGS = [arg for arg in DEFAULT_FLATC_ARGS if arg != "--require-explicit-ids"]
-flatbuffer_cc_library(
+static_flatbuffer(
name = "schemas",
srcs = glob(["*.fbs"]),
flatc_args = FLATC_ARGS,
- gen_reflections = True,
visibility = ["//visibility:public"],
)
diff --git a/y2014/control_loops/claw/BUILD b/y2014/control_loops/claw/BUILD
index 7c530e8..bc1007e 100644
--- a/y2014/control_loops/claw/BUILD
+++ b/y2014/control_loops/claw/BUILD
@@ -1,43 +1,39 @@
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
package(default_visibility = ["//visibility:public"])
-flatbuffer_cc_library(
+static_flatbuffer(
name = "claw_goal_fbs",
srcs = [
"claw_goal.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "claw_position_fbs",
srcs = [
"claw_position.fbs",
],
- gen_reflections = 1,
- includes = [
- "//frc971/control_loops:control_loops_fbs_includes",
- ],
target_compatible_with = ["@platforms//os:linux"],
+ deps = [
+ "//frc971/control_loops:control_loops_fbs",
+ ],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "claw_output_fbs",
srcs = [
"claw_output.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "claw_status_fbs",
srcs = [
"claw_status.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
diff --git a/y2014/control_loops/shooter/BUILD b/y2014/control_loops/shooter/BUILD
index 7552462..5c4e8fe 100644
--- a/y2014/control_loops/shooter/BUILD
+++ b/y2014/control_loops/shooter/BUILD
@@ -1,43 +1,39 @@
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
package(default_visibility = ["//visibility:public"])
-flatbuffer_cc_library(
+static_flatbuffer(
name = "shooter_goal_fbs",
srcs = [
"shooter_goal.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "shooter_position_fbs",
srcs = [
"shooter_position.fbs",
],
- gen_reflections = 1,
- includes = [
- "//frc971/control_loops:control_loops_fbs_includes",
- ],
target_compatible_with = ["@platforms//os:linux"],
+ deps = [
+ "//frc971/control_loops:control_loops_fbs",
+ ],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "shooter_output_fbs",
srcs = [
"shooter_output.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "shooter_status_fbs",
srcs = [
"shooter_status.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
diff --git a/y2014/queues/BUILD b/y2014/queues/BUILD
index 87a0de4..8c76aee 100644
--- a/y2014/queues/BUILD
+++ b/y2014/queues/BUILD
@@ -1,21 +1,19 @@
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
package(default_visibility = ["//visibility:public"])
-flatbuffer_cc_library(
+static_flatbuffer(
name = "auto_mode_fbs",
srcs = [
"auto_mode.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "hot_goal_fbs",
srcs = [
"hot_goal.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
diff --git a/y2014_bot3/control_loops/rollers/BUILD b/y2014_bot3/control_loops/rollers/BUILD
index ccbd94d..f3116de 100644
--- a/y2014_bot3/control_loops/rollers/BUILD
+++ b/y2014_bot3/control_loops/rollers/BUILD
@@ -1,40 +1,36 @@
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
package(default_visibility = ["//visibility:public"])
-flatbuffer_cc_library(
+static_flatbuffer(
name = "rollers_goal_fbs",
srcs = [
"rollers_goal.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "rollers_position_fbs",
srcs = [
"rollers_position.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "rollers_output_fbs",
srcs = [
"rollers_output.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "rollers_status_fbs",
srcs = [
"rollers_status.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
diff --git a/y2016/actors/BUILD b/y2016/actors/BUILD
index 403cfa8..0033677 100644
--- a/y2016/actors/BUILD
+++ b/y2016/actors/BUILD
@@ -1,4 +1,4 @@
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
package(default_visibility = ["//visibility:public"])
@@ -10,12 +10,11 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "superstructure_action_fbs",
srcs = [
"superstructure_action.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
@@ -92,12 +91,11 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "vision_align_action_fbs",
srcs = [
"vision_align_action.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
diff --git a/y2016/control_loops/shooter/BUILD b/y2016/control_loops/shooter/BUILD
index 6f8d7e1..4e23089 100644
--- a/y2016/control_loops/shooter/BUILD
+++ b/y2016/control_loops/shooter/BUILD
@@ -1,40 +1,36 @@
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
package(default_visibility = ["//visibility:public"])
-flatbuffer_cc_library(
+static_flatbuffer(
name = "shooter_goal_fbs",
srcs = [
"shooter_goal.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "shooter_position_fbs",
srcs = [
"shooter_position.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "shooter_output_fbs",
srcs = [
"shooter_output.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "shooter_status_fbs",
srcs = [
"shooter_status.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
diff --git a/y2016/control_loops/superstructure/BUILD b/y2016/control_loops/superstructure/BUILD
index 3c6a771..211b55c 100644
--- a/y2016/control_loops/superstructure/BUILD
+++ b/y2016/control_loops/superstructure/BUILD
@@ -1,47 +1,43 @@
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
package(default_visibility = ["//visibility:public"])
-flatbuffer_cc_library(
+static_flatbuffer(
name = "superstructure_goal_fbs",
srcs = [
"superstructure_goal.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "superstructure_position_fbs",
srcs = [
"superstructure_position.fbs",
],
- gen_reflections = 1,
- includes = [
- "//frc971/control_loops:control_loops_fbs_includes",
- ],
target_compatible_with = ["@platforms//os:linux"],
+ deps = [
+ "//frc971/control_loops:control_loops_fbs",
+ ],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "superstructure_output_fbs",
srcs = [
"superstructure_output.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "superstructure_status_fbs",
srcs = [
"superstructure_status.fbs",
],
- gen_reflections = 1,
- includes = [
- "//frc971/control_loops:control_loops_fbs_includes",
- ],
target_compatible_with = ["@platforms//os:linux"],
+ deps = [
+ "//frc971/control_loops:control_loops_fbs",
+ ],
)
genrule(
diff --git a/y2016/queues/BUILD b/y2016/queues/BUILD
index 43694d6..e07fb3b 100644
--- a/y2016/queues/BUILD
+++ b/y2016/queues/BUILD
@@ -1,12 +1,11 @@
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
package(default_visibility = ["//visibility:public"])
-flatbuffer_cc_library(
+static_flatbuffer(
name = "ball_detector_fbs",
srcs = [
"ball_detector.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
diff --git a/y2016/vision/BUILD b/y2016/vision/BUILD
index fed16c3..f1925a6 100644
--- a/y2016/vision/BUILD
+++ b/y2016/vision/BUILD
@@ -1,15 +1,14 @@
load("@rules_cc//cc:defs.bzl", "cc_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
load("//tools/build_rules:gtk_dependent.bzl", "gtk_dependent_cc_binary")
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("//tools:platforms.bzl", "platforms")
-flatbuffer_cc_library(
+static_flatbuffer(
name = "vision_fbs",
srcs = [
"vision.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
diff --git a/y2017/control_loops/superstructure/BUILD b/y2017/control_loops/superstructure/BUILD
index b974b15..5339798 100644
--- a/y2017/control_loops/superstructure/BUILD
+++ b/y2017/control_loops/superstructure/BUILD
@@ -1,50 +1,46 @@
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
package(default_visibility = ["//visibility:public"])
-flatbuffer_cc_library(
+static_flatbuffer(
name = "superstructure_goal_fbs",
srcs = [
"superstructure_goal.fbs",
],
- gen_reflections = 1,
- includes = [
- "//frc971/control_loops:control_loops_fbs_includes",
- ],
target_compatible_with = ["@platforms//os:linux"],
+ deps = [
+ "//frc971/control_loops:control_loops_fbs",
+ ],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "superstructure_position_fbs",
srcs = [
"superstructure_position.fbs",
],
- gen_reflections = 1,
- includes = [
- "//frc971/control_loops:control_loops_fbs_includes",
- ],
target_compatible_with = ["@platforms//os:linux"],
+ deps = [
+ "//frc971/control_loops:control_loops_fbs",
+ ],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "superstructure_status_fbs",
srcs = [
"superstructure_status.fbs",
],
- gen_reflections = 1,
- includes = [
- "//frc971/control_loops:control_loops_fbs_includes",
- "//frc971/control_loops:profiled_subsystem_fbs_includes",
- ],
target_compatible_with = ["@platforms//os:linux"],
+ deps = [
+ "//frc971/control_loops:control_loops_fbs",
+ "//frc971/control_loops:profiled_subsystem_fbs",
+ ],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "superstructure_output_fbs",
srcs = [
"superstructure_output.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
diff --git a/y2017/vision/BUILD b/y2017/vision/BUILD
index aa6c96b..c4045b8 100644
--- a/y2017/vision/BUILD
+++ b/y2017/vision/BUILD
@@ -1,16 +1,15 @@
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("//tools/build_rules:gtk_dependent.bzl", "gtk_dependent_cc_binary")
load("@rules_cc//cc:defs.bzl", "cc_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")
package(default_visibility = ["//visibility:public"])
-flatbuffer_cc_library(
+static_flatbuffer(
name = "vision_fbs",
srcs = [
"vision.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
diff --git a/y2018/BUILD b/y2018/BUILD
index 34be4dc..e3531b2 100644
--- a/y2018/BUILD
+++ b/y2018/BUILD
@@ -1,8 +1,8 @@
load("//frc971:downloader.bzl", "robot_downloader")
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("//aos:config.bzl", "aos_config")
load("@rules_cc//cc:defs.bzl", "cc_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
robot_downloader(
start_binaries = [
@@ -109,12 +109,11 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "status_light_fbs",
srcs = [
"status_light.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
diff --git a/y2018/control_loops/superstructure/BUILD b/y2018/control_loops/superstructure/BUILD
index a3cb808..c7bfdc0 100644
--- a/y2018/control_loops/superstructure/BUILD
+++ b/y2018/control_loops/superstructure/BUILD
@@ -1,49 +1,45 @@
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
package(default_visibility = ["//visibility:public"])
-flatbuffer_cc_library(
+static_flatbuffer(
name = "superstructure_goal_fbs",
srcs = [
"superstructure_goal.fbs",
],
- gen_reflections = 1,
- includes = [
- "//frc971/control_loops:control_loops_fbs_includes",
- ],
target_compatible_with = ["@platforms//os:linux"],
+ deps = [
+ "//frc971/control_loops:control_loops_fbs",
+ ],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "superstructure_position_fbs",
srcs = [
"superstructure_position.fbs",
],
- gen_reflections = 1,
- includes = [
- "//frc971/control_loops:control_loops_fbs_includes",
- ],
target_compatible_with = ["@platforms//os:linux"],
+ deps = [
+ "//frc971/control_loops:control_loops_fbs",
+ ],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "superstructure_status_fbs",
srcs = [
"superstructure_status.fbs",
],
- gen_reflections = 1,
- includes = [
- "//frc971/control_loops:control_loops_fbs_includes",
- ],
target_compatible_with = ["@platforms//os:linux"],
+ deps = [
+ "//frc971/control_loops:control_loops_fbs",
+ ],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "superstructure_output_fbs",
srcs = [
"superstructure_output.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
diff --git a/y2018/vision/BUILD b/y2018/vision/BUILD
index 09a70d9..a2c2d8c 100644
--- a/y2018/vision/BUILD
+++ b/y2018/vision/BUILD
@@ -1,4 +1,4 @@
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
cc_binary(
name = "image_streamer",
@@ -17,12 +17,11 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "vision_fbs",
srcs = [
"vision.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
diff --git a/y2019/BUILD b/y2019/BUILD
index 864cb57..fee2db9 100644
--- a/y2019/BUILD
+++ b/y2019/BUILD
@@ -1,8 +1,8 @@
load("//frc971:downloader.bzl", "robot_downloader")
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("//aos:config.bzl", "aos_config")
load("@rules_cc//cc:defs.bzl", "cc_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
robot_downloader(
data = [
@@ -162,22 +162,20 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "camera_log_fbs",
srcs = [
"camera_log.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "status_light_fbs",
srcs = [
"status_light.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
diff --git a/y2019/control_loops/drivetrain/BUILD b/y2019/control_loops/drivetrain/BUILD
index 2ac689b..9da671d 100644
--- a/y2019/control_loops/drivetrain/BUILD
+++ b/y2019/control_loops/drivetrain/BUILD
@@ -1,4 +1,4 @@
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("//aos:config.bzl", "aos_config")
load("//tools/build_rules:select.bzl", "cpu_select")
@@ -104,20 +104,18 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "target_selector_fbs",
srcs = ["target_selector.fbs"],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "camera_fbs",
srcs = [
"camera.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
diff --git a/y2019/control_loops/superstructure/BUILD b/y2019/control_loops/superstructure/BUILD
index f97c6f0..9336cb7 100644
--- a/y2019/control_loops/superstructure/BUILD
+++ b/y2019/control_loops/superstructure/BUILD
@@ -1,53 +1,49 @@
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
package(default_visibility = ["//visibility:public"])
-flatbuffer_cc_library(
+static_flatbuffer(
name = "superstructure_goal_fbs",
srcs = [
"superstructure_goal.fbs",
],
- gen_reflections = 1,
- includes = [
- "//frc971/control_loops:control_loops_fbs_includes",
- "//frc971/control_loops:profiled_subsystem_fbs_includes",
- ],
target_compatible_with = ["@platforms//os:linux"],
+ deps = [
+ "//frc971/control_loops:control_loops_fbs",
+ "//frc971/control_loops:profiled_subsystem_fbs",
+ ],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "superstructure_output_fbs",
srcs = [
"superstructure_output.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "superstructure_status_fbs",
srcs = [
"superstructure_status.fbs",
],
- gen_reflections = 1,
- includes = [
- "//frc971/control_loops:control_loops_fbs_includes",
- "//frc971/control_loops:profiled_subsystem_fbs_includes",
- ],
target_compatible_with = ["@platforms//os:linux"],
+ deps = [
+ "//frc971/control_loops:control_loops_fbs",
+ "//frc971/control_loops:profiled_subsystem_fbs",
+ ],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "superstructure_position_fbs",
srcs = [
"superstructure_position.fbs",
],
- gen_reflections = 1,
- includes = [
- "//frc971/control_loops:control_loops_fbs_includes",
- "//frc971/control_loops:profiled_subsystem_fbs_includes",
- ],
target_compatible_with = ["@platforms//os:linux"],
+ deps = [
+ "//frc971/control_loops:control_loops_fbs",
+ "//frc971/control_loops:profiled_subsystem_fbs",
+ ],
)
cc_library(
diff --git a/y2020/BUILD b/y2020/BUILD
index 04ca0d8..001ef89 100644
--- a/y2020/BUILD
+++ b/y2020/BUILD
@@ -1,6 +1,6 @@
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("//frc971:downloader.bzl", "robot_downloader")
load("//aos:config.bzl", "aos_config")
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
load("//tools/build_rules:template.bzl", "jinja2_template")
load("//aos/util:config_validator_macro.bzl", "config_validator_test")
@@ -300,12 +300,11 @@
target_compatible_with = ["@platforms//os:linux"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "setpoint_fbs",
srcs = [
"setpoint.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
diff --git a/y2020/control_loops/drivetrain/BUILD b/y2020/control_loops/drivetrain/BUILD
index 8191404..5e859ab 100644
--- a/y2020/control_loops/drivetrain/BUILD
+++ b/y2020/control_loops/drivetrain/BUILD
@@ -1,5 +1,5 @@
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("//tools/build_rules:js.bzl", "ts_project")
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library")
load("//aos:config.bzl", "aos_config")
@@ -57,10 +57,9 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "localizer_debug_fbs",
srcs = ["localizer_debug.fbs"],
- gen_reflections = 1,
visibility = ["//visibility:public"],
)
diff --git a/y2020/control_loops/superstructure/BUILD b/y2020/control_loops/superstructure/BUILD
index fc2c0b4..c77f35d 100644
--- a/y2020/control_loops/superstructure/BUILD
+++ b/y2020/control_loops/superstructure/BUILD
@@ -1,28 +1,26 @@
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("//tools/build_rules:js.bzl", "ts_project")
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library")
package(default_visibility = ["//visibility:public"])
-flatbuffer_cc_library(
+static_flatbuffer(
name = "superstructure_goal_fbs",
srcs = [
"superstructure_goal.fbs",
],
- gen_reflections = 1,
- includes = [
- "//frc971/control_loops:control_loops_fbs_includes",
- "//frc971/control_loops:profiled_subsystem_fbs_includes",
- ],
target_compatible_with = ["@platforms//os:linux"],
+ deps = [
+ "//frc971/control_loops:control_loops_fbs",
+ "//frc971/control_loops:profiled_subsystem_fbs",
+ ],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "superstructure_output_fbs",
srcs = [
"superstructure_output.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
@@ -39,12 +37,11 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "superstructure_status_fbs",
srcs = [
"superstructure_status.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
deps = [
"//frc971/control_loops:control_loops_fbs",
@@ -53,17 +50,16 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "superstructure_position_fbs",
srcs = [
"superstructure_position.fbs",
],
- gen_reflections = 1,
- includes = [
- "//frc971/control_loops:control_loops_fbs_includes",
- "//frc971/control_loops:profiled_subsystem_fbs_includes",
- ],
target_compatible_with = ["@platforms//os:linux"],
+ deps = [
+ "//frc971/control_loops:control_loops_fbs",
+ "//frc971/control_loops:profiled_subsystem_fbs",
+ ],
)
cc_library(
diff --git a/y2020/control_loops/superstructure/shooter/BUILD b/y2020/control_loops/superstructure/shooter/BUILD
index 82e9fec..96c933f 100644
--- a/y2020/control_loops/superstructure/shooter/BUILD
+++ b/y2020/control_loops/superstructure/shooter/BUILD
@@ -1,4 +1,4 @@
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
package(default_visibility = ["//visibility:public"])
@@ -32,21 +32,19 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "shooter_tuning_readings_fbs",
srcs = [
"shooter_tuning_readings.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "shooter_tuning_params_fbs",
srcs = [
"shooter_tuning_params.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
diff --git a/y2020/vision/BUILD b/y2020/vision/BUILD
index aa4e5bf..ccff6b7 100644
--- a/y2020/vision/BUILD
+++ b/y2020/vision/BUILD
@@ -1,9 +1,8 @@
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
-flatbuffer_cc_library(
+static_flatbuffer(
name = "galactic_search_path_fbs",
srcs = ["galactic_search_path.fbs"],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//y2020:__subpackages__"],
)
diff --git a/y2020/vision/sift/BUILD b/y2020/vision/sift/BUILD
index 1920cce..1d4083e 100644
--- a/y2020/vision/sift/BUILD
+++ b/y2020/vision/sift/BUILD
@@ -1,5 +1,6 @@
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load(":fast_gaussian.bzl", "fast_gaussian")
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library", "flatbuffer_py_library")
+load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_py_library")
load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library")
# Note that this file is also used directly by :fast_gaussian_halide_generator,
@@ -229,10 +230,9 @@
visibility = ["//visibility:public"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "sift_fbs",
srcs = ["sift.fbs"],
- gen_reflections = True,
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
@@ -244,13 +244,12 @@
visibility = ["//y2020:__subpackages__"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "sift_training_fbs",
srcs = ["sift_training.fbs"],
- gen_reflections = True,
- includes = [":sift_fbs_includes"],
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
+ deps = [":sift_fbs"],
)
py_binary(
diff --git a/y2021_bot3/control_loops/superstructure/BUILD b/y2021_bot3/control_loops/superstructure/BUILD
index be18cbe..606c6df 100644
--- a/y2021_bot3/control_loops/superstructure/BUILD
+++ b/y2021_bot3/control_loops/superstructure/BUILD
@@ -1,49 +1,45 @@
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("//tools/build_rules:js.bzl", "ts_project")
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
package(default_visibility = ["//visibility:public"])
-flatbuffer_cc_library(
+static_flatbuffer(
name = "superstructure_goal_fbs",
srcs = [
"superstructure_goal.fbs",
],
- gen_reflections = 1,
- includes = [
- "//frc971/control_loops:control_loops_fbs_includes",
- "//frc971/control_loops:profiled_subsystem_fbs_includes",
+ deps = [
+ "//frc971/control_loops:control_loops_fbs",
+ "//frc971/control_loops:profiled_subsystem_fbs",
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "superstructure_output_fbs",
srcs = [
"superstructure_output.fbs",
],
- gen_reflections = 1,
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "superstructure_status_fbs",
srcs = [
"superstructure_status.fbs",
],
- gen_reflections = 1,
- includes = [
- "//frc971/control_loops:control_loops_fbs_includes",
- "//frc971/control_loops:profiled_subsystem_fbs_includes",
+ deps = [
+ "//frc971/control_loops:control_loops_fbs",
+ "//frc971/control_loops:profiled_subsystem_fbs",
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "superstructure_position_fbs",
srcs = [
"superstructure_position.fbs",
],
- gen_reflections = 1,
- includes = [
- "//frc971/control_loops:control_loops_fbs_includes",
- "//frc971/control_loops:profiled_subsystem_fbs_includes",
+ deps = [
+ "//frc971/control_loops:control_loops_fbs",
+ "//frc971/control_loops:profiled_subsystem_fbs",
],
)
diff --git a/y2022/BUILD b/y2022/BUILD
index 8d9d901..a839f37 100644
--- a/y2022/BUILD
+++ b/y2022/BUILD
@@ -1,6 +1,6 @@
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("//frc971:downloader.bzl", "robot_downloader")
load("//aos:config.bzl", "aos_config")
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
load("//tools/build_rules:template.bzl", "jinja2_template")
load("//aos/util:config_validator_macro.bzl", "config_validator_test")
@@ -303,12 +303,11 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "setpoint_fbs",
srcs = [
"setpoint.fbs",
],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
)
diff --git a/y2022/control_loops/superstructure/BUILD b/y2022/control_loops/superstructure/BUILD
index e370f0e..0f2737d 100644
--- a/y2022/control_loops/superstructure/BUILD
+++ b/y2022/control_loops/superstructure/BUILD
@@ -1,46 +1,42 @@
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("//tools/build_rules:js.bzl", "ts_project")
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library")
package(default_visibility = ["//visibility:public"])
-flatbuffer_cc_library(
+static_flatbuffer(
name = "superstructure_goal_fbs",
srcs = [
"superstructure_goal.fbs",
],
- gen_reflections = 1,
- includes = [
- "//frc971/control_loops:control_loops_fbs_includes",
- "//frc971/control_loops:profiled_subsystem_fbs_includes",
+ deps = [
+ "//frc971/control_loops:control_loops_fbs",
+ "//frc971/control_loops:profiled_subsystem_fbs",
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "superstructure_output_fbs",
srcs = [
"superstructure_output.fbs",
],
- gen_reflections = 1,
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "superstructure_can_position_fbs",
srcs = [
"superstructure_can_position.fbs",
],
- gen_reflections = 1,
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "superstructure_status_fbs",
srcs = [
"superstructure_status.fbs",
],
- gen_reflections = 1,
- includes = [
- "//frc971/control_loops:control_loops_fbs_includes",
- "//frc971/control_loops:profiled_subsystem_fbs_includes",
+ deps = [
+ "//frc971/control_loops:control_loops_fbs",
+ "//frc971/control_loops:profiled_subsystem_fbs",
],
)
@@ -55,15 +51,14 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "superstructure_position_fbs",
srcs = [
"superstructure_position.fbs",
],
- gen_reflections = 1,
- includes = [
- "//frc971/control_loops:control_loops_fbs_includes",
- "//frc971/control_loops:profiled_subsystem_fbs_includes",
+ deps = [
+ "//frc971/control_loops:control_loops_fbs",
+ "//frc971/control_loops:profiled_subsystem_fbs",
],
)
diff --git a/y2022/localizer/BUILD b/y2022/localizer/BUILD
index 7f076e8..63f720f 100644
--- a/y2022/localizer/BUILD
+++ b/y2022/localizer/BUILD
@@ -1,5 +1,5 @@
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("//tools/build_rules:js.bzl", "ts_project")
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library")
load("//aos:flatbuffers.bzl", "cc_static_flatbuffer")
@@ -16,12 +16,11 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "localizer_status_fbs",
srcs = [
"localizer_status.fbs",
],
- gen_reflections = True,
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
deps = [
@@ -42,16 +41,15 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "localizer_visualization_fbs",
srcs = ["localizer_visualization.fbs"],
- gen_reflections = 1,
- includes = [
- ":localizer_status_fbs_includes",
- "//frc971/control_loops:control_loops_fbs_includes",
- "//frc971/control_loops/drivetrain:drivetrain_status_fbs_includes",
- ],
visibility = ["//visibility:public"],
+ deps = [
+ ":localizer_status_fbs",
+ "//frc971/control_loops:control_loops_fbs",
+ "//frc971/control_loops/drivetrain:drivetrain_status_fbs",
+ ],
)
flatbuffer_ts_library(
diff --git a/y2022/vision/BUILD b/y2022/vision/BUILD
index 99fb95d..523ee04 100644
--- a/y2022/vision/BUILD
+++ b/y2022/vision/BUILD
@@ -1,5 +1,5 @@
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("//tools/build_rules:js.bzl", "ts_project")
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library")
ts_project(
@@ -176,15 +176,14 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "ball_color_fbs",
srcs = ["ball_color.fbs"],
- gen_reflections = 1,
- includes = [
- "//frc971/input:joystick_state_fbs_includes",
- ],
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//y2022:__subpackages__"],
+ deps = [
+ "//frc971/input:joystick_state_fbs",
+ ],
)
cc_library(
@@ -231,15 +230,14 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "target_estimate_fbs",
srcs = ["target_estimate.fbs"],
- gen_reflections = 1,
- includes = [
- "//frc971/vision:calibration_fbs_includes",
- ],
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//y2022:__subpackages__"],
+ deps = [
+ "//frc971/vision:calibration_fbs",
+ ],
)
flatbuffer_ts_library(
diff --git a/y2022_bot3/control_loops/superstructure/BUILD b/y2022_bot3/control_loops/superstructure/BUILD
index 5b44e2a..a3f74f9 100644
--- a/y2022_bot3/control_loops/superstructure/BUILD
+++ b/y2022_bot3/control_loops/superstructure/BUILD
@@ -1,37 +1,34 @@
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library")
package(default_visibility = ["//visibility:public"])
-flatbuffer_cc_library(
+static_flatbuffer(
name = "superstructure_goal_fbs",
srcs = [
"superstructure_goal.fbs",
],
- gen_reflections = 1,
- includes = [
- "//frc971/control_loops:control_loops_fbs_includes",
- "//frc971/control_loops:profiled_subsystem_fbs_includes",
+ deps = [
+ "//frc971/control_loops:control_loops_fbs",
+ "//frc971/control_loops:profiled_subsystem_fbs",
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "superstructure_output_fbs",
srcs = [
"superstructure_output.fbs",
],
- gen_reflections = 1,
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "superstructure_status_fbs",
srcs = [
"superstructure_status.fbs",
],
- gen_reflections = 1,
- includes = [
- "//frc971/control_loops:control_loops_fbs_includes",
- "//frc971/control_loops:profiled_subsystem_fbs_includes",
+ deps = [
+ "//frc971/control_loops:control_loops_fbs",
+ "//frc971/control_loops:profiled_subsystem_fbs",
],
)
@@ -46,15 +43,14 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "superstructure_position_fbs",
srcs = [
"superstructure_position.fbs",
],
- gen_reflections = 1,
- includes = [
- "//frc971/control_loops:control_loops_fbs_includes",
- "//frc971/control_loops:profiled_subsystem_fbs_includes",
+ deps = [
+ "//frc971/control_loops:control_loops_fbs",
+ "//frc971/control_loops:profiled_subsystem_fbs",
],
)
diff --git a/y2023/constants/BUILD b/y2023/constants/BUILD
index c91aa56..512e400 100644
--- a/y2023/constants/BUILD
+++ b/y2023/constants/BUILD
@@ -1,4 +1,4 @@
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("//tools/build_rules:template.bzl", "jinja2_template")
cc_library(
@@ -49,10 +49,9 @@
visibility = ["//y2023:__subpackages__"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "constants_fbs",
srcs = ["constants.fbs"],
- gen_reflections = True,
visibility = ["//visibility:public"],
deps = [
"//frc971/vision:calibration_fbs",
@@ -61,10 +60,9 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "constants_list_fbs",
srcs = ["constants_list.fbs"],
- gen_reflections = True,
visibility = ["//visibility:public"],
deps = [":constants_fbs"],
)
diff --git a/y2023/control_loops/drivetrain/BUILD b/y2023/control_loops/drivetrain/BUILD
index f6b5655..01c360b 100644
--- a/y2023/control_loops/drivetrain/BUILD
+++ b/y2023/control_loops/drivetrain/BUILD
@@ -1,5 +1,5 @@
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("//aos:config.bzl", "aos_config")
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
genrule(
name = "genrule_drivetrain",
@@ -115,21 +115,19 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "target_selector_status_fbs",
srcs = [
":target_selector_status.fbs",
],
- gen_reflections = 1,
visibility = ["//visibility:public"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "target_selector_hint_fbs",
srcs = [
":target_selector_hint.fbs",
],
- gen_reflections = 1,
visibility = ["//visibility:public"],
deps = [
"//frc971/control_loops/drivetrain:drivetrain_status_fbs",
diff --git a/y2023/control_loops/superstructure/BUILD b/y2023/control_loops/superstructure/BUILD
index 3d35dae..f62d790 100644
--- a/y2023/control_loops/superstructure/BUILD
+++ b/y2023/control_loops/superstructure/BUILD
@@ -1,35 +1,32 @@
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("//tools/build_rules:js.bzl", "ts_project")
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library")
package(default_visibility = ["//visibility:public"])
-flatbuffer_cc_library(
+static_flatbuffer(
name = "superstructure_goal_fbs",
srcs = [
"superstructure_goal.fbs",
],
- gen_reflections = 1,
deps = [
"//frc971/control_loops:control_loops_fbs",
"//frc971/control_loops:profiled_subsystem_fbs",
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "superstructure_output_fbs",
srcs = [
"superstructure_output.fbs",
],
- gen_reflections = 1,
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "superstructure_status_fbs",
srcs = [
"superstructure_status.fbs",
],
- gen_reflections = 1,
deps = [
"//frc971/control_loops:control_loops_fbs",
"//frc971/control_loops:profiled_subsystem_fbs",
@@ -49,12 +46,11 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "superstructure_position_fbs",
srcs = [
"superstructure_position.fbs",
],
- gen_reflections = 1,
deps = [
"//frc971/control_loops:control_loops_fbs",
"//frc971/control_loops:profiled_subsystem_fbs",
diff --git a/y2023/control_loops/superstructure/arm/BUILD b/y2023/control_loops/superstructure/arm/BUILD
index 768a54e..2f4e7d6 100644
--- a/y2023/control_loops/superstructure/arm/BUILD
+++ b/y2023/control_loops/superstructure/arm/BUILD
@@ -1,4 +1,4 @@
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
cc_library(
name = "arm",
@@ -73,12 +73,11 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "arm_trajectories_fbs",
srcs = [
"arm_trajectories.fbs",
],
- gen_reflections = 1,
visibility = ["//visibility:public"],
)
diff --git a/y2023/localizer/BUILD b/y2023/localizer/BUILD
index f9d0d28..eb0f886 100644
--- a/y2023/localizer/BUILD
+++ b/y2023/localizer/BUILD
@@ -1,4 +1,4 @@
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("//tools/build_rules:js.bzl", "ts_project")
load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library")
@@ -15,12 +15,11 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "status_fbs",
srcs = [
"status.fbs",
],
- gen_reflections = True,
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
deps = [
@@ -39,12 +38,11 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "visualization_fbs",
srcs = [
"visualization.fbs",
],
- gen_reflections = True,
visibility = ["//visibility:public"],
deps = [
":status_fbs",
@@ -60,24 +58,22 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "scoring_map_fbs",
srcs = [
"scoring_map.fbs",
],
- gen_reflections = True,
visibility = ["//visibility:public"],
deps = [
"//frc971/vision:target_map_fbs",
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "relative_scoring_map_fbs",
srcs = [
"relative_scoring_map.fbs",
],
- gen_reflections = True,
visibility = ["//visibility:public"],
deps = [
":scoring_map_fbs",
diff --git a/y2023/vision/BUILD b/y2023/vision/BUILD
index 512bb58..82b804b 100644
--- a/y2023/vision/BUILD
+++ b/y2023/vision/BUILD
@@ -1,7 +1,7 @@
load("//frc971:halide.bzl", "halide_library")
load("//tools/build_rules:select.bzl", "cpu_select")
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library")
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
cc_binary(
name = "camera_reader",
@@ -308,10 +308,9 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "game_pieces_fbs",
srcs = ["game_pieces.fbs"],
- gen_reflections = 1,
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
diff --git a/y2023_bot3/constants/BUILD b/y2023_bot3/constants/BUILD
index 6833ec4..967bba0 100644
--- a/y2023_bot3/constants/BUILD
+++ b/y2023_bot3/constants/BUILD
@@ -1,4 +1,4 @@
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("//tools/build_rules:template.bzl", "jinja2_template")
cc_library(
@@ -35,17 +35,15 @@
visibility = ["//visibility:public"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "constants_fbs",
srcs = ["constants.fbs"],
- gen_reflections = True,
visibility = ["//visibility:public"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "constants_list_fbs",
srcs = ["constants_list.fbs"],
- gen_reflections = True,
visibility = ["//visibility:public"],
deps = [":constants_fbs"],
)
diff --git a/y2023_bot3/control_loops/superstructure/BUILD b/y2023_bot3/control_loops/superstructure/BUILD
index fe41eed..f096ee4 100644
--- a/y2023_bot3/control_loops/superstructure/BUILD
+++ b/y2023_bot3/control_loops/superstructure/BUILD
@@ -1,34 +1,31 @@
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library")
package(default_visibility = ["//visibility:public"])
-flatbuffer_cc_library(
+static_flatbuffer(
name = "superstructure_goal_fbs",
srcs = [
"superstructure_goal.fbs",
],
- gen_reflections = 1,
deps = [
"//frc971/control_loops:control_loops_fbs",
"//frc971/control_loops:profiled_subsystem_fbs",
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "superstructure_output_fbs",
srcs = [
"superstructure_output.fbs",
],
- gen_reflections = 1,
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "superstructure_status_fbs",
srcs = [
"superstructure_status.fbs",
],
- gen_reflections = 1,
deps = [
"//frc971/control_loops:control_loops_fbs",
"//frc971/control_loops:profiled_subsystem_fbs",
@@ -46,12 +43,11 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "superstructure_position_fbs",
srcs = [
"superstructure_position.fbs",
],
- gen_reflections = 1,
deps = [
"//frc971:can_configuration_fbs",
"//frc971/control_loops:can_falcon_fbs",
diff --git a/y2023_bot4/BUILD b/y2023_bot4/BUILD
index 1a4ed64..24a7c73 100644
--- a/y2023_bot4/BUILD
+++ b/y2023_bot4/BUILD
@@ -1,4 +1,4 @@
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
+load("//aos/flatbuffers:generate.bzl", "static_flatbuffer")
load("//frc971:downloader.bzl", "robot_downloader")
load("//aos:config.bzl", "aos_config")
load("//aos/util:config_validator_macro.bzl", "config_validator_test")
@@ -80,17 +80,15 @@
],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "drivetrain_position_fbs",
srcs = ["drivetrain_position.fbs"],
- gen_reflections = 1,
deps = ["//frc971/control_loops:control_loops_fbs"],
)
-flatbuffer_cc_library(
+static_flatbuffer(
name = "drivetrain_can_position_fbs",
srcs = ["drivetrain_can_position.fbs"],
- gen_reflections = 1,
deps = ["//frc971/control_loops:can_falcon_fbs"],
)