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

Handle typedef in zapt templates & matter_idl #36124

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gmarcosb
Copy link
Contributor

@gmarcosb gmarcosb commented Oct 17, 2024

Dependent on zap updates at project-chip/zap#1458

Update zap templaets to processtypedef in zap, supporting things like defining a VideoStreamID as a uint16, see the camera spec: https://github.com/CHIP-Specifications/connectedhomeip-spec/pull/10004

This should also eliminate the need for many of the things in chip-types.xml, which can now be simply defined in the XML files as a simple typedef

See also discussion with @bzbarsky-apple: #35773 (comment)

Testing

Verified by CI

@gmarcosb gmarcosb requested review from a team as code owners October 17, 2024 15:32
Copy link

semanticdiff-com bot commented Oct 17, 2024

Review changes with  SemanticDiff

Changed Files
File Status
  src/app/zap-templates/zcl/zcl-with-test-extensions.json  82% smaller
  src/app/zap-templates/zcl/zcl.json  82% smaller
  scripts/py_matter_idl/matter_idl/generators/java/__init__.py  21% smaller
  scripts/py_matter_idl/matter_idl/matter_idl_parser.py  10% smaller
  examples/darwin-framework-tool/templates/commands.zapt Unsupported file format
  examples/darwin-framework-tool/templates/partials/decodable_value.zapt Unsupported file format
  scripts/py_matter_idl/matter_idl/data_model_xml/handlers/handlers.py  0% smaller
  scripts/py_matter_idl/matter_idl/generators/idl/MatterIdl.jinja Unsupported file format
  scripts/py_matter_idl/matter_idl/generators/kotlin/__init__.py  0% smaller
  scripts/py_matter_idl/matter_idl/generators/type_definitions.py  0% smaller
  scripts/py_matter_idl/matter_idl/matter_grammar.lark Unsupported file format
  scripts/py_matter_idl/matter_idl/matter_idl_types.py  0% smaller
  scripts/py_matter_idl/matter_idl/test_matter_idl_parser.py  0% smaller
  scripts/py_matter_idl/matter_idl/zapxml/handlers/handlers.py  0% smaller
  scripts/tools/zap_regen_all.py  0% smaller
  src/app/common/BUILD.gn Unsupported file format
  src/app/common/templates/templates.json  0% smaller
  src/app/zap-templates/partials/cluster-typedefs-typedef.zapt Unsupported file format
  src/app/zap-templates/partials/idl/cluster_definition.zapt Unsupported file format
  src/app/zap-templates/partials/idl/global_types.zapt Unsupported file format
  src/app/zap-templates/templates/app/cluster-objects.zapt Unsupported file format
  src/app/zap-templates/templates/app/cluster-typedefs.zapt Unsupported file format
  src/app/zap-templates/zcl/data-model/chip/global-structs.xml  0% smaller
  src/app/zap-templates/zcl/data-model/chip/global-typedefs.xml  0% smaller
  src/app/zap-templates/zcl/data-model/chip/test-cluster.xml  0% smaller
  src/app/zap-templates/zcl/zcl.xsd  0% smaller
  src/controller/java/templates/partials/decode_value.zapt Unsupported file format
  src/controller/java/templates/templates.json  0% smaller
  src/controller/python/templates/partials/typedef_def.zapt Unsupported file format
  src/controller/python/templates/python-CHIPClusters-py.zapt Unsupported file format
  src/controller/python/templates/python-cluster-Objects-py.zapt Unsupported file format
  src/controller/python/templates/templates.json  0% smaller
  src/darwin/Framework/CHIP/templates/MTRBaseClusters.zapt Unsupported file format
  src/darwin/Framework/CHIP/templates/partials/decode_value.zapt Unsupported file format
  src/darwin/Framework/CHIP/templates/partials/encode_value.zapt Unsupported file format
  src/darwin/Framework/CHIP/templates/partials/typedef_decl.zapt Unsupported file format
  src/darwin/Framework/CHIP/templates/templates.json  0% smaller
  src/lib/core/BUILD.gn Unsupported file format

@@ -24,10 +24,6 @@
"name": "cluster_header",
"path": "../../../app/zap-templates/partials/cluster_header.zapt"
},
{
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is somewhat unrelated & really more just cleanup: this file no longer exists

Copy link

PR #36124: Size comparison from dead378 to 61d1605

Full report (1 build for stm32)
platform target config section dead378 61d1605 change % change
stm32 light STM32WB5MM-DK FLASH 481896 481896 0 0.0
RAM 144844 144844 0 0.0

Copy link
Contributor

@bzbarsky-apple bzbarsky-apple left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs some test coverage to exercise these bits: please add something with typedefs to the UnitTesting cluster.

@github-actions github-actions bot added the inet label Nov 26, 2024
@gmarcosb gmarcosb force-pushed the camera-webrtc-provider branch from 06f10b0 to 638b4bd Compare December 9, 2024 22:53
@gmarcosb gmarcosb force-pushed the camera-webrtc-provider branch from 0bfb909 to d8dbcb4 Compare January 15, 2025 21:11
@gmarcosb gmarcosb mentioned this pull request Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

3 participants