From e9d8aefbf07112a1287bafae2c316e0431448ecb Mon Sep 17 00:00:00 2001 From: Vinnie Magro Date: Wed, 30 Oct 2024 15:49:40 -0700 Subject: [PATCH] [metalos][macros] rely on antlir to normalize rust deps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: Rely on antlir macros to normalize rust deps instead of maintaining the same logic in the metalos macros. Test Plan: ``` ❯ buck targets fbcode//antlir/... fbcode//metalos/... ... ❯ arc rust-check fbcode//antlir/... fbcode//metalos/... ``` Reviewed By: sergeyfd Differential Revision: D61400481 fbshipit-source-id: 06afc848c96d43aaf186f9aae5ecdbda544f26e0 --- antlir/bzl/build_defs.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/antlir/bzl/build_defs.bzl b/antlir/bzl/build_defs.bzl index 10e51aff332..9b2b7cbe6b0 100644 --- a/antlir/bzl/build_defs.bzl +++ b/antlir/bzl/build_defs.bzl @@ -70,7 +70,7 @@ def _rust_common(rule, **kwargs): deps = selects.apply(kwargs.pop("deps", []), lambda deps: [_normalize_rust_dep(d) for d in deps]) named_deps = selects.apply(kwargs.pop("named_deps", {}), lambda named_deps: { key: _normalize_rust_dep(_ensure_dep_is_public(d)) - for key, d in named_deps.items() + for key, d in (named_deps or {}).items() }) rule(deps = deps, named_deps = named_deps, **kwargs)