Setup the message bridge key sharing services

This implements 2 new services that will be used to share the active
SCTP authentication key. For context, if SCTP authentication is wanted,
then we will need a way to securely distribute a shared key across every
node. We use gRPC to distribute the key.

* message_bridge_auth_server

This service should only run in one node. It generates a 128-bit
random-key during initialization. It sets up the gRPC service using
mutual-TLS authentication.

* message_bridge_auth_client

This service will run in every node. It listens for requests
in /aos aos.message_bridge.SctpConfigRequest and requests the
active key from the gRPC server which gets propagated into /aos
aos.message_bridge.SctpConfig. message_bridge reads this value and sets
the authentication key (previous change in relation).

These have some additional side-effects:
* This change also forces us to bring in an appropriate version of GRPC,
  which itself forces updates to protobuf and other dependencies. We
  take the opportunity to remove the protobuf subtree in favor of
  a more sanitized import in the WORKSPACE.
* The various upgrades also upgraded our version of buildifier,
  which now performs more aggressive linting.
* Our version of abseil was upgraded, which now forces you to only
  have access to const references to things stored in absl::btree_set's
  (see https://github.com/abseil/abseil-cpp/commit/a74b796ab3f114f6991479c9ad9e4c1a0dad3a4b).

Change-Id: I870b8f93451056e011cefa3cdf3c5dc01c19a6f9
Signed-off-by: James Kuszmaul <james.kuszmaul@bluerivertech.com>
Signed-off-by: Adam Snaider <adsnaider@gmail.com>
diff --git a/tools/build_rules/autocxx.bzl b/tools/build_rules/autocxx.bzl
index 01a9197..6cb74de 100644
--- a/tools/build_rules/autocxx.bzl
+++ b/tools/build_rules/autocxx.bzl
@@ -9,10 +9,6 @@
         requested_features = ctx.features,
         unsupported_features = ctx.disabled_features,
     )
-    compiler_path = cc_common.get_tool_for_action(
-        feature_configuration = feature_configuration,
-        action_name = ACTION_NAMES.cpp_compile,
-    )
     preprocessor_defines = []
     for lib in ctx.attr.libs:
         preprocessor_defines.append(lib[CcInfo].compilation_context.defines)
@@ -43,8 +39,6 @@
 # the path. There are headers involved which use `#pragma once`, so just copying
 # them is a bad idea. Instead, we generate forwarding headers.
 def _autocxx_library_gen_impl(ctx):
-    rust_toolchain = ctx.toolchains[Label("@rules_rust//rust:toolchain")]
-
     # TODO(Brian): Provide some way to override this globally in WORKSPACE? Need
     # a real strategy for coordinating toolchains and flags, see the TODO below
     # where cc_command_line is used for details.
diff --git a/tools/build_rules/js.bzl b/tools/build_rules/js.bzl
index 55f440b..4b11ea7 100644
--- a/tools/build_rules/js.bzl
+++ b/tools/build_rules/js.bzl
@@ -57,12 +57,10 @@
 def ng_application(
         name,
         deps = [],
-        test_deps = [],
         extra_srcs = [],
         assets = None,
         html_assets = APPLICATION_HTML_ASSETS,
-        visibility = ["//visibility:public"],
-        **kwargs):
+        visibility = ["//visibility:public"]):
     """
     Bazel macro for compiling an Angular application. Creates {name}, test, serve targets.
 
@@ -81,11 +79,9 @@
     Args:
       name: the rule name
       deps: direct dependencies of the application
-      test_deps: additional dependencies for tests
       html_assets: assets to insert into the index.html, [styles.css, favicon.ico] by default
       assets: assets to include in the file bundle
       visibility: visibility of the primary targets ({name}, 'test', 'serve')
-      **kwargs: extra args passed to main Angular CLI rules
     """
     assets = assets if assets else native.glob(["assets/**/*"])
     html_assets = html_assets if html_assets else []
@@ -231,7 +227,7 @@
     #    visibility = visibility,
     #)
 
-def ng_pkg(name, generate_public_api = True, extra_srcs = [], deps = [], test_deps = [], visibility = ["//visibility:public"], **kwargs):
+def ng_pkg(name, generate_public_api = True, extra_srcs = [], deps = [], visibility = ["//visibility:public"], **kwargs):
     """
     Bazel macro for compiling an npm-like Angular package project. Creates '{name}' and 'test' targets.
 
@@ -247,7 +243,6 @@
     Args:
       name: the rule name
       deps: package dependencies
-      test_deps: additional dependencies for tests
       visibility: visibility of the primary targets ('{name}', 'test')
     """
 
@@ -284,8 +279,7 @@
         name = name,
         srcs = srcs + [":_index"],
         deps = deps + PACKAGE_DEPS,
-        #visibility = ["//visibility:private"],
-        visibility = ["//visibility:public"],
+        visibility = visibility,
         **kwargs
     )
 
diff --git a/tools/build_rules/template.bzl b/tools/build_rules/template.bzl
index f5da196..1ad06d8 100644
--- a/tools/build_rules/template.bzl
+++ b/tools/build_rules/template.bzl
@@ -40,7 +40,7 @@
         ),
         "_jinja2": attr.label(
             default = "//tools/build_rules:jinja2_generator",
-            cfg = "host",
+            cfg = "exec",
             executable = True,
         ),
     },
diff --git a/tools/cpp/toolchain_config.bzl b/tools/cpp/toolchain_config.bzl
index 31632ce..8bab5c7 100644
--- a/tools/cpp/toolchain_config.bzl
+++ b/tools/cpp/toolchain_config.bzl
@@ -98,19 +98,6 @@
 
     builtin_sysroot = None
 
-    all_compile_actions = [
-        ACTION_NAMES.c_compile,
-        ACTION_NAMES.cpp_compile,
-        ACTION_NAMES.linkstamp_compile,
-        ACTION_NAMES.assemble,
-        ACTION_NAMES.preprocess_assemble,
-        ACTION_NAMES.cpp_header_parsing,
-        ACTION_NAMES.cpp_module_compile,
-        ACTION_NAMES.cpp_module_codegen,
-        ACTION_NAMES.clif_match,
-        ACTION_NAMES.lto_backend,
-    ]
-
     all_cpp_compile_actions = [
         ACTION_NAMES.cpp_compile,
         ACTION_NAMES.linkstamp_compile,
@@ -120,26 +107,6 @@
         ACTION_NAMES.clif_match,
     ]
 
-    preprocessor_compile_actions = [
-        ACTION_NAMES.c_compile,
-        ACTION_NAMES.cpp_compile,
-        ACTION_NAMES.linkstamp_compile,
-        ACTION_NAMES.preprocess_assemble,
-        ACTION_NAMES.cpp_header_parsing,
-        ACTION_NAMES.cpp_module_compile,
-        ACTION_NAMES.clif_match,
-    ]
-
-    codegen_compile_actions = [
-        ACTION_NAMES.c_compile,
-        ACTION_NAMES.cpp_compile,
-        ACTION_NAMES.linkstamp_compile,
-        ACTION_NAMES.assemble,
-        ACTION_NAMES.preprocess_assemble,
-        ACTION_NAMES.cpp_module_codegen,
-        ACTION_NAMES.lto_backend,
-    ]
-
     all_link_actions = [
         ACTION_NAMES.cpp_link_executable,
         ACTION_NAMES.cpp_link_dynamic_library,
diff --git a/tools/dependency_rewrite b/tools/dependency_rewrite
index 16fe927..2cc90cf 100644
--- a/tools/dependency_rewrite
+++ b/tools/dependency_rewrite
@@ -17,6 +17,7 @@
 rewrite cdn.cypress.io/(.*) software.frc971.org/Build-Dependencies/cdn.cypress.io/$1
 rewrite www.googleapis.com/(.*) software.frc971.org/Build-Dependencies/www.googleapis.com/$1
 allow crates.io
+allow golang.org
 allow go.dev
 allow registry.npmjs.org