From 25b77c95db5d8217e77e9ba495cab5aa9e7e54d3 Mon Sep 17 00:00:00 2001 From: NathanDuPont Date: Sat, 12 Oct 2024 15:20:12 -0700 Subject: [PATCH] Fixing bazel target misconfigurations --- MODULE.bazel | 2 +- MODULE.bazel.lock | 42 +++++++++++++++++++++++---- src/drivers/dynamixel/BUILD.bazel | 1 + src/kinematics/drivetrain/BUILD.bazel | 12 ++++---- src/robot/BUILD.bazel | 32 +++++++++++--------- src/robot/actuator/BUILD.bazel | 2 ++ tools/lint/BUILD.bazel | 1 + 7 files changed, 65 insertions(+), 27 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index 52aa71b..7f64c50 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -64,7 +64,7 @@ use_repo(oci, "py3.11") oci.pull( name = "gcc", image = "index.docker.io/library/gcc", - digest = "sha256:sha256:c24e2fd069574a63513d749a90459eed8b0cc43f3fbb580a0296cdee3ae0df0d", + digest = "sha256:c24e2fd069574a63513d749a90459eed8b0cc43f3fbb580a0296cdee3ae0df0d", platforms = [ "linux/amd64", "linux/arm64", diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock index 88dcd77..d05ce34 100644 --- a/MODULE.bazel.lock +++ b/MODULE.bazel.lock @@ -770,7 +770,7 @@ }, "@@rules_go~//go:extensions.bzl%go_sdk": { "os:linux,arch:amd64": { - "bzlTransitiveDigest": "JFrCnX1tTDAqjKVGYDdGNiwf4OvEAFVF170rNP7HQPw=", + "bzlTransitiveDigest": "5n3xPN1mCJCXeO4Hcd3HDQJ5x/oBSKUP4Th4fnfyA1I=", "usagesDigest": "H5dkkAKjmd+ZmyM642KIutGzHTKexmQW0F5SKGN2sjQ=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, @@ -1128,7 +1128,7 @@ "@@rules_oci~//oci:extensions.bzl%oci": { "general": { "bzlTransitiveDigest": "FvfkapVlk3ah8GT0eVc2uLDNEe/TtsAvPke01BE83PQ=", - "usagesDigest": "gQcwF865lQuyDv0SjsrFVSfEuuz46+ZNJFBtzVGE1l8=", + "usagesDigest": "cFR82PCxW0G0gtsdkxAkJB1Pp3A7MyqW+QH4qFRkQwo=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, "envVariables": {}, @@ -1156,7 +1156,7 @@ "scheme": "https", "registry": "index.docker.io", "repository": "library/gcc", - "identifier": "sha256:sha256:c24e2fd069574a63513d749a90459eed8b0cc43f3fbb580a0296cdee3ae0df0d", + "identifier": "sha256:c24e2fd069574a63513d749a90459eed8b0cc43f3fbb580a0296cdee3ae0df0d", "platforms": { "@@platforms//cpu:x86_64": "@gcc_linux_amd64", "@@platforms//cpu:arm64": "@gcc_linux_arm64" @@ -1262,7 +1262,7 @@ "scheme": "https", "registry": "index.docker.io", "repository": "library/gcc", - "identifier": "sha256:sha256:c24e2fd069574a63513d749a90459eed8b0cc43f3fbb580a0296cdee3ae0df0d", + "identifier": "sha256:c24e2fd069574a63513d749a90459eed8b0cc43f3fbb580a0296cdee3ae0df0d", "platform": "linux/amd64", "target_name": "gcc_linux_amd64", "config_path": "@@rules_oci~~oci~oci_auth_config//:standard_authorization_config_path" @@ -1435,7 +1435,7 @@ "scheme": "https", "registry": "index.docker.io", "repository": "library/gcc", - "identifier": "sha256:sha256:c24e2fd069574a63513d749a90459eed8b0cc43f3fbb580a0296cdee3ae0df0d", + "identifier": "sha256:c24e2fd069574a63513d749a90459eed8b0cc43f3fbb580a0296cdee3ae0df0d", "platform": "linux/arm64", "target_name": "gcc_linux_arm64", "config_path": "@@rules_oci~~oci~oci_auth_config//:standard_authorization_config_path" @@ -1550,7 +1550,7 @@ }, "@@rules_python~//python/extensions:pip.bzl%pip": { "os:linux,arch:amd64": { - "bzlTransitiveDigest": "68G62SBQ36dDy4iE5F4ZgL4faDuGZKMHJ3kulWvWkfc=", + "bzlTransitiveDigest": "iL2ZYPWnWRC+GppHYa+XPuxGsfye5D1kbjbBmvynbl4=", "usagesDigest": "VzJKpnFjEbiKABxEoN/8yUwYBAZZLCXeHWF45Pxvqj0=", "recordedFileInputs": { "@@//requirements_lock.txt": "dfa778fcdad325c17e52e654838158478ae737115fcf12f93be212fee0ca11a5" @@ -1577,6 +1577,7 @@ "pip_data_exclude": [], "enable_implicit_namespace_pkgs": false, "environment": {}, + "envsubst": [], "group_name": "", "group_deps": [] } @@ -1600,6 +1601,7 @@ "pip_data_exclude": [], "enable_implicit_namespace_pkgs": false, "environment": {}, + "envsubst": [], "group_name": "", "group_deps": [] } @@ -1623,6 +1625,7 @@ "pip_data_exclude": [], "enable_implicit_namespace_pkgs": false, "environment": {}, + "envsubst": [], "group_name": "", "group_deps": [] } @@ -1646,6 +1649,7 @@ "pip_data_exclude": [], "enable_implicit_namespace_pkgs": false, "environment": {}, + "envsubst": [], "group_name": "", "group_deps": [] } @@ -1669,6 +1673,7 @@ "pip_data_exclude": [], "enable_implicit_namespace_pkgs": false, "environment": {}, + "envsubst": [], "group_name": "", "group_deps": [] } @@ -1692,6 +1697,7 @@ "pip_data_exclude": [], "enable_implicit_namespace_pkgs": false, "environment": {}, + "envsubst": [], "group_name": "", "group_deps": [] } @@ -1715,6 +1721,7 @@ "pip_data_exclude": [], "enable_implicit_namespace_pkgs": false, "environment": {}, + "envsubst": [], "group_name": "", "group_deps": [] } @@ -1738,6 +1745,7 @@ "pip_data_exclude": [], "enable_implicit_namespace_pkgs": false, "environment": {}, + "envsubst": [], "group_name": "", "group_deps": [] } @@ -1761,6 +1769,7 @@ "pip_data_exclude": [], "enable_implicit_namespace_pkgs": false, "environment": {}, + "envsubst": [], "group_name": "", "group_deps": [] } @@ -1784,6 +1793,7 @@ "pip_data_exclude": [], "enable_implicit_namespace_pkgs": false, "environment": {}, + "envsubst": [], "group_name": "", "group_deps": [] } @@ -1807,6 +1817,7 @@ "pip_data_exclude": [], "enable_implicit_namespace_pkgs": false, "environment": {}, + "envsubst": [], "group_name": "", "group_deps": [] } @@ -1830,6 +1841,7 @@ "pip_data_exclude": [], "enable_implicit_namespace_pkgs": false, "environment": {}, + "envsubst": [], "group_name": "", "group_deps": [] } @@ -1853,6 +1865,7 @@ "pip_data_exclude": [], "enable_implicit_namespace_pkgs": false, "environment": {}, + "envsubst": [], "group_name": "", "group_deps": [] } @@ -1876,6 +1889,7 @@ "pip_data_exclude": [], "enable_implicit_namespace_pkgs": false, "environment": {}, + "envsubst": [], "group_name": "", "group_deps": [] } @@ -1899,6 +1913,7 @@ "pip_data_exclude": [], "enable_implicit_namespace_pkgs": false, "environment": {}, + "envsubst": [], "group_name": "", "group_deps": [] } @@ -1922,6 +1937,7 @@ "pip_data_exclude": [], "enable_implicit_namespace_pkgs": false, "environment": {}, + "envsubst": [], "group_name": "", "group_deps": [] } @@ -1945,6 +1961,7 @@ "pip_data_exclude": [], "enable_implicit_namespace_pkgs": false, "environment": {}, + "envsubst": [], "group_name": "", "group_deps": [] } @@ -1968,6 +1985,7 @@ "pip_data_exclude": [], "enable_implicit_namespace_pkgs": false, "environment": {}, + "envsubst": [], "group_name": "", "group_deps": [] } @@ -1991,6 +2009,7 @@ "pip_data_exclude": [], "enable_implicit_namespace_pkgs": false, "environment": {}, + "envsubst": [], "group_name": "", "group_deps": [] } @@ -2014,6 +2033,7 @@ "pip_data_exclude": [], "enable_implicit_namespace_pkgs": false, "environment": {}, + "envsubst": [], "group_name": "", "group_deps": [] } @@ -2037,6 +2057,7 @@ "pip_data_exclude": [], "enable_implicit_namespace_pkgs": false, "environment": {}, + "envsubst": [], "group_name": "", "group_deps": [] } @@ -2060,6 +2081,7 @@ "pip_data_exclude": [], "enable_implicit_namespace_pkgs": false, "environment": {}, + "envsubst": [], "group_name": "", "group_deps": [] } @@ -2091,6 +2113,7 @@ "pip_data_exclude": [], "enable_implicit_namespace_pkgs": false, "environment": {}, + "envsubst": [], "group_name": "", "group_deps": [] } @@ -2114,6 +2137,7 @@ "pip_data_exclude": [], "enable_implicit_namespace_pkgs": false, "environment": {}, + "envsubst": [], "group_name": "", "group_deps": [] } @@ -2137,6 +2161,7 @@ "pip_data_exclude": [], "enable_implicit_namespace_pkgs": false, "environment": {}, + "envsubst": [], "group_name": "", "group_deps": [] } @@ -2160,6 +2185,7 @@ "pip_data_exclude": [], "enable_implicit_namespace_pkgs": false, "environment": {}, + "envsubst": [], "group_name": "", "group_deps": [] } @@ -2183,6 +2209,7 @@ "pip_data_exclude": [], "enable_implicit_namespace_pkgs": false, "environment": {}, + "envsubst": [], "group_name": "", "group_deps": [] } @@ -2206,6 +2233,7 @@ "pip_data_exclude": [], "enable_implicit_namespace_pkgs": false, "environment": {}, + "envsubst": [], "group_name": "", "group_deps": [] } @@ -2329,6 +2357,7 @@ "pip_data_exclude": [], "enable_implicit_namespace_pkgs": false, "environment": {}, + "envsubst": [], "group_name": "", "group_deps": [] } @@ -2352,6 +2381,7 @@ "pip_data_exclude": [], "enable_implicit_namespace_pkgs": false, "environment": {}, + "envsubst": [], "group_name": "", "group_deps": [] } diff --git a/src/drivers/dynamixel/BUILD.bazel b/src/drivers/dynamixel/BUILD.bazel index 5cc784b..1b41731 100644 --- a/src/drivers/dynamixel/BUILD.bazel +++ b/src/drivers/dynamixel/BUILD.bazel @@ -64,6 +64,7 @@ cc_library( hdrs = [ "dynamixel_sdk.h", ], + visibility = ["//visibility:public"], deps = [ ":group_io_lib", ":packet_handler_lib", diff --git a/src/kinematics/drivetrain/BUILD.bazel b/src/kinematics/drivetrain/BUILD.bazel index 26b9a2f..8c9b30d 100644 --- a/src/kinematics/drivetrain/BUILD.bazel +++ b/src/kinematics/drivetrain/BUILD.bazel @@ -29,12 +29,12 @@ cc_library( ) cc_library( - name = "tank_kinematics_lib", + name = "tank_drive_kinematics_lib", srcs = [ - "tank_kinematics.cpp", + "tank_drive_kinematics.cpp", ], hdrs = [ - "tank_kinematics.h", + "tank_drive_kinematics.h", ], visibility = ["//visibility:public"], deps = [ @@ -46,12 +46,12 @@ cc_library( ) cc_library( - name = "x_kinematics_lib", + name = "x_drive_kinematics_lib", srcs = [ - "x_kinematics.cpp", + "x_drive_kinematics.cpp", ], hdrs = [ - "x_kinematics.h", + "x_drive_kinematics.h", ], visibility = ["//visibility:public"], deps = [ diff --git a/src/robot/BUILD.bazel b/src/robot/BUILD.bazel index ec1a32a..00d496e 100644 --- a/src/robot/BUILD.bazel +++ b/src/robot/BUILD.bazel @@ -1,5 +1,6 @@ -load("@rules_python//python:defs.bzl", "py_library") +load("@rules_oci//oci:defs.bzl", "oci_image", "oci_tarball") load("@rules_pkg//pkg:tar.bzl", "pkg_tar") +load("@rules_python//python:defs.bzl", "py_library") # Put all robot files in this library py_library( @@ -24,23 +25,26 @@ cc_library( "robot.cpp", ], hdrs = [ - "imotor.h", "robot.h", ], - deps = ["@eigen"], -) - -cc_binary( - name = "robot", - srcs = [ - "robot.cpp", - ], deps = [ - "robot_lib", + "//src/kinematics/drivetrain:kinematics_interface_lib", + "//src/robot/actuator:dynamixel_motor_lib", "@eigen", ], ) +# cc_binary( +# name = "robot", +# srcs = [ +# "robot.cpp", +# ], +# deps = [ +# "robot_lib", +# "@eigen", +# ], +# ) + cc_binary( name = "main", srcs = [ @@ -59,13 +63,13 @@ pkg_tar( oci_image( name = "image", - base = "@docker_lib_ubuntu", - entrypoint = ["/example_binary"], + base = "@gcc", + entrypoint = ["src/robot/main"], tars = [":tar"], ) oci_tarball( name = "image_tarball", image = ":image", - repo_tags = ["example:latest"], + repo_tags = ["trentonbot_robot:latest"], ) diff --git a/src/robot/actuator/BUILD.bazel b/src/robot/actuator/BUILD.bazel index 1acc5f5..7cd8e5f 100644 --- a/src/robot/actuator/BUILD.bazel +++ b/src/robot/actuator/BUILD.bazel @@ -3,6 +3,7 @@ cc_library( hdrs = [ "imotor.h", ], + visibility = ["//visibility:public"], deps = [ "//src/math:math_lib", "//src/math:vector_lib", @@ -18,6 +19,7 @@ cc_library( hdrs = [ "dynamixel_motor.h", ], + visibility = ["//visibility:public"], deps = [ ":generic_motor_lib", "//src/drivers/dynamixel:sdk", diff --git a/tools/lint/BUILD.bazel b/tools/lint/BUILD.bazel index 468de02..92d3087 100644 --- a/tools/lint/BUILD.bazel +++ b/tools/lint/BUILD.bazel @@ -7,6 +7,7 @@ Copied from https://github.com/aspect-build/rules_lint/blob/main/example/tools/l """ load("@aspect_rules_lint//lint:shellcheck.bzl", "shellcheck_binary") +load("@rules_python//python/entry_points:py_console_script_binary.bzl", "py_console_script_binary") package(default_visibility = ["//:__subpackages__"])