Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove CHIPClusters.h and corresponding .zapt file from the build #32004

Merged
merged 6 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions build/chip/chip_codegen.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ endfunction()
# GENERATOR "app-templates"
# OUTPUTS
# "zap-generated/access.h",
# "zap-generated/CHIPClusters.h"
# "zap-generated/endpoint_config.h",
# "zap-generated/gen_config.h",
# "zap-generated/IMClusterCommandHandler.cpp"
Expand Down Expand Up @@ -162,7 +161,6 @@ function(chip_zapgen TARGET_NAME)
SET(EXTRA_DEPENDENCIES
"${CHIP_ROOT}/src/app/zap-templates/partials/header.zapt"
"${CHIP_ROOT}/src/app/zap-templates/templates/app/access.zapt"
"${CHIP_ROOT}/src/app/zap-templates/templates/app/CHIPClusters.zapt"
"${CHIP_ROOT}/src/app/zap-templates/templates/app/endpoint_config.zapt"
"${CHIP_ROOT}/src/app/zap-templates/templates/app/gen_config.zapt"
"${CHIP_ROOT}/src/app/zap-templates/templates/app/im-cluster-command-handler.zapt"
Expand Down
1 change: 0 additions & 1 deletion build/chip/chip_codegen.gni
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ template("_chip_build_time_zapgen") {

# Application templates, actually generating files
"${_template_dir}/access.zapt",
"${_template_dir}/CHIPClusters.zapt",
"${_template_dir}/endpoint_config.zapt",
"${_template_dir}/gen_config.zapt",
"${_template_dir}/im-cluster-command-handler.zapt",
Expand Down
1 change: 0 additions & 1 deletion build/chip/esp32/esp32_codegen.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ macro(chip_app_component_zapgen ZAP_NAME)
GENERATOR "app-templates"
OUTPUTS
"zap-generated/access.h"
"zap-generated/CHIPClusters.h"
"zap-generated/endpoint_config.h"
"zap-generated/gen_config.h"
"zap-generated/IMClusterCommandHandler.cpp"
Expand Down
80 changes: 0 additions & 80 deletions examples/thermostat/asr/include/CHIPClusters.h

This file was deleted.

4 changes: 2 additions & 2 deletions examples/tv-app/android/java/TVApp-JNI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@
#include <app/app-platform/ContentAppPlatform.h>
#include <app/server/Dnssd.h>
#include <app/server/java/AndroidAppServerWrapper.h>
#include <controller/CHIPCluster.h>
#include <credentials/DeviceAttestationCredsProvider.h>
#include <credentials/examples/DeviceAttestationCredsExample.h>
#include <jni.h>
#include <lib/core/CHIPError.h>
#include <lib/support/CHIPJNIError.h>
#include <lib/support/JniReferences.h>
#include <lib/support/JniTypeWrappers.h>
#include <zap-generated/CHIPClusters.h>

using namespace chip;
using namespace chip::app;
Expand Down Expand Up @@ -216,7 +216,7 @@ class MyPostCommissioningListener : public PostCommissioningListener
const SessionHandle & sessionHandle) override
{
// read current binding list
chip::Controller::BindingCluster cluster(exchangeMgr, sessionHandle, kTargetBindingClusterEndpointId);
chip::Controller::ClusterBase cluster(exchangeMgr, sessionHandle, kTargetBindingClusterEndpointId);

cacheContext(vendorId, productId, nodeId, exchangeMgr, sessionHandle);

Expand Down
9 changes: 5 additions & 4 deletions examples/tv-app/tv-common/src/AppTv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,17 @@

#include "AppTv.h"

#include <cstdio>
#include <inttypes.h>

#include <app-common/zap-generated/attributes/Accessors.h>
#include <app-common/zap-generated/ids/Attributes.h>
#include <app-common/zap-generated/ids/Clusters.h>
#include <app/CommandHandler.h>
#include <app/server/Dnssd.h>
#include <app/server/Server.h>
#include <app/util/af.h>
#include <cstdio>
#include <inttypes.h>
#include <controller/CHIPCluster.h>
#include <lib/core/CHIPCore.h>
#include <lib/core/DataModelTypes.h>
#include <lib/support/CHIPArgParser.hpp>
Expand All @@ -38,7 +40,6 @@
#include <lib/support/ZclString.h>
#include <platform/CHIPDeviceLayer.h>
#include <platform/DeviceInstanceInfoProvider.h>
#include <zap-generated/CHIPClusters.h>

#if CHIP_DEVICE_CONFIG_ENABLE_BOTH_COMMISSIONER_AND_COMMISSIONEE
#include <controller/CHIPDeviceController.h>
Expand Down Expand Up @@ -126,7 +127,7 @@ class MyPostCommissioningListener : public PostCommissioningListener
const SessionHandle & sessionHandle) override
{
// read current binding list
chip::Controller::BindingCluster cluster(exchangeMgr, sessionHandle, kTargetBindingClusterEndpointId);
chip::Controller::ClusterBase cluster(exchangeMgr, sessionHandle, kTargetBindingClusterEndpointId);

cacheContext(vendorId, productId, nodeId, exchangeMgr, sessionHandle);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include <lib/support/CHIPJNIError.h>
#include <lib/support/JniReferences.h>
#include <lib/support/JniTypeWrappers.h>
#include <zap-generated/CHIPClusters.h>

using namespace chip;
using namespace chip::app;
Expand Down
2 changes: 0 additions & 2 deletions scripts/tools/zap/tests/available_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,13 @@
# and the expected content for those output files.
inputs/all-clusters-app.zap:
../../../../src/app/zap-templates/app-templates.json:
CHIPClusters.h: outputs/all-clusters-app/app-templates/CHIPClusters.h
endpoint_config.h: outputs/all-clusters-app/app-templates/endpoint_config.h
gen_config.h: outputs/all-clusters-app/app-templates/gen_config.h
access.h: outputs/all-clusters-app/app-templates/access.h
IMClusterCommandHandler.cpp: outputs/all-clusters-app/app-templates/IMClusterCommandHandler.cpp

inputs/lighting-app.zap:
../../../../src/app/zap-templates/app-templates.json:
CHIPClusters.h: outputs/lighting-app/app-templates/CHIPClusters.h
endpoint_config.h: outputs/lighting-app/app-templates/endpoint_config.h
gen_config.h: outputs/lighting-app/app-templates/gen_config.h
access.h: outputs/lighting-app/app-templates/access.h
Expand Down

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion src/app/chip_data_model.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ function(chip_configure_data_model APP_TARGET)
GENERATOR "app-templates"
OUTPUTS
"zap-generated/access.h"
"zap-generated/CHIPClusters.h"
"zap-generated/endpoint_config.h"
"zap-generated/gen_config.h"
"zap-generated/IMClusterCommandHandler.cpp"
Expand Down
14 changes: 6 additions & 8 deletions src/app/chip_data_model.gni
Original file line number Diff line number Diff line change
Expand Up @@ -66,24 +66,22 @@ template("chip_data_model") {
input = rebase_path(invoker.zap_file)
generator = "app-templates"

# NOTE: these files MUST be in sync with outputs in
# src/app/zap-templates/app-templates.json
outputs = [
"zap-generated/access.h",
"zap-generated/gen_config.h",
"zap-generated/endpoint_config.h",
]

# NOTE: these are ALSO auto-generated but handled below:
# "zap-generated/IMClusterCommandHandler.cpp"
# -> contains one large DispatchSingleClusterCommand and DispatchServerCommand

if (chip_code_pre_generated_directory == "") {
prune_outputs = []
}

if (chip_controller) {
outputs += [ "zap-generated/CHIPClusters.h" ]
} else {
if (defined(prune_outputs)) {
prune_outputs += [ "zap-generated/CHIPClusters.h" ]
}
}

# TODO: It is unclear here why `zap_pregenerated_dir` has any relevance
# in including IMClusterCommandHandler or not.
#
Expand Down
5 changes: 0 additions & 5 deletions src/app/zap-templates/app-templates.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@
"name": "CHIP Client Callbacks for Interaction Model",
"output": "IMClusterCommandHandler.cpp"
},
{
"path": "templates/app/CHIPClusters.zapt",
"name": "C++ ZCL API Header",
"output": "CHIPClusters.h"
},
{
"path": "templates/app/access.zapt",
"name": "Matter access definitions",
Expand Down
24 changes: 0 additions & 24 deletions src/app/zap-templates/templates/app/CHIPClusters.zapt

This file was deleted.

10 changes: 0 additions & 10 deletions src/lib/shell/commands/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,6 @@ source_set("commands") {
if (chip_enable_ota_requestor && chip_device_platform != "none" &&
chip_device_platform != "linux" && chip_device_platform != "darwin") {
sources += [ "Ota.cpp" ]

# TODO: the ota commands in shell should use the interfaces in /src/app/clusters/ota-requestor
#
# Awkward dependencies below say:
# - codegen via zap the CHIPClusters.h (which is the CLIENT SIDE)
# - ensure include path can see zap-generated/CHIPClusters.h
deps = [ "${chip_root}/src/controller/data_model:data_model_zapgen_files" ]

configs +=
[ "${chip_root}/src/controller/data_model:data_model_zapgen_config" ]
}

if (chip_system_config_provide_statistics) {
Expand Down
Loading