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

Restrict the set of structs for which we generate legacy definitions. #24309

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
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: 1 addition & 1 deletion .github/workflows/zap_regeneration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

runs-on: ubuntu-20.04
container:
image: connectedhomeip/chip-build:0.6.28
image: connectedhomeip/chip-build:0.6.30
bzbarsky-apple marked this conversation as resolved.
Show resolved Hide resolved
defaults:
run:
shell: sh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/zap_templates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

runs-on: ubuntu-20.04
container:
image: connectedhomeip/chip-build:0.6.28
image: connectedhomeip/chip-build:0.6.30
defaults:
run:
shell: sh
Expand Down
4 changes: 4 additions & 0 deletions src/app/common/templates/legacy-struct-list.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# List of structs for which we output a legacy definition in af-structs.h
# Ideally this list should become empty.
- DlCredential
- ApplicationBasicApplication
3 changes: 2 additions & 1 deletion src/app/common/templates/templates.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"templates/chip/helper.js"
],
"resources": {
"weak-enum-list": "weak-enum-list.yaml"
"weak-enum-list": "weak-enum-list.yaml",
"legacy-struct-list": "legacy-struct-list.yaml"
},
"override": "../../zap-templates/common/override.js",
"partials": [
Expand Down
2 changes: 2 additions & 0 deletions src/app/zap-templates/templates/app/af-structs.zapt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

{{#zcl_structs}}

{{#if (isLegacyStruct (asUnderlyingType label))}}
{{#if itemCnt}}
// Struct for {{label}}
typedef struct _{{asType label}} {
Expand All @@ -27,4 +28,5 @@ typedef struct _{{asType label}} {
// this will result in all the references to the data being as uint8_t*
typedef uint8_t {{asUnderlyingType label}};
{{/if}}
{{/if}}
{{/zcl_structs}}
Loading