From 27a478f0088ec978a56e383483ef11463125163b Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Mon, 18 Mar 2024 14:32:00 -0400 Subject: [PATCH] Add 3 more headers from ember src/app/util to be known to gn (#32622) * Add 3 more headers from ember to be known to gn * Restyle * Fix lint --- .github/workflows/lint.yml | 3 --- src/app/BUILD.gn | 1 + src/app/util/BUILD.gn | 16 ++++++++++++++++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 8e67de5878ccf9..7e6206bc6374ff 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -101,10 +101,8 @@ jobs: --known-failure app/reporting/tests/MockReportScheduler.h \ --known-failure app/TestEventTriggerDelegate.h \ --known-failure app/util/af.h \ - --known-failure app/util/af-types.h \ --known-failure app/util/attribute-storage.cpp \ --known-failure app/util/attribute-storage.h \ - --known-failure app/util/attribute-storage-null-handling.h \ --known-failure app/util/attribute-table.cpp \ --known-failure app/util/attribute-table.h \ --known-failure app/util/binding-table.cpp \ @@ -118,7 +116,6 @@ jobs: --known-failure app/util/generic-callback-stubs.cpp \ --known-failure app/util/im-client-callbacks.h \ --known-failure app/util/MatterCallbacks.h \ - --known-failure app/util/odd-sized-integers.h \ --known-failure app/util/util.cpp \ --known-failure app/util/util.h \ --known-failure app/WriteHandler.h \ diff --git a/src/app/BUILD.gn b/src/app/BUILD.gn index 453a3fd2259df6..2ac041439aaa5f 100644 --- a/src/app/BUILD.gn +++ b/src/app/BUILD.gn @@ -202,6 +202,7 @@ static_library("interaction-model") { "${chip_root}/src/app/MessageDef", "${chip_root}/src/app/icd/server:icd-server-config", "${chip_root}/src/app/icd/server:observer", + "${chip_root}/src/app/util:af-types", "${chip_root}/src/lib/address_resolve", "${chip_root}/src/lib/support", "${chip_root}/src/lib/support:static-support", diff --git a/src/app/util/BUILD.gn b/src/app/util/BUILD.gn index b1ebd36312901d..dfb2e4c248dc92 100644 --- a/src/app/util/BUILD.gn +++ b/src/app/util/BUILD.gn @@ -15,22 +15,38 @@ import("//build_overrides/chip.gni") import("${chip_root}/src/app/common_flags.gni") +# These headers/cpp only depend on core/common source_set("types") { sources = [ "att-storage.h", "attribute-metadata.cpp", "attribute-metadata.h", + "attribute-storage-null-handling.h", "basic-types.h", "ember-strings.cpp", "ember-strings.h", "endpoint-config-defines.h", + "odd-sized-integers.h", "types_stub.h", ] deps = [ "${chip_root}/src/app/common:attribute-type", + "${chip_root}/src/lib/core", "${chip_root}/src/lib/core:encoding", "${chip_root}/src/lib/core:types", ] public_configs = [ "${chip_root}/src:includes" ] } + +# This source set also depends on data-model +source_set("af-types") { + sources = [ "af-types.h" ] + deps = [ + ":types", + "${chip_root}/src/app:paths", + "${chip_root}/src/app/data-model", + "${chip_root}/src/messaging", + "${chip_root}/src/protocols/interaction_model", + ] +}