Skip to content

struct_contains_array must calculate transitive dependencies #1500

Open
@gmarcosb

Description

ZAP templates currently decide how to generate Type vs DecodableType based on struct_contains_array

However, this only works if the array is a field in the struct; if the array is contained > 1 level (a struct referencing a struct with an array field), the resulting cluster-objects generated file is invalid

Fix @ #1501

Effectively, DecodableType is aliased to Type if a struct does not have an array field

Problem is: TransportOptionsStruct referenced from the command does not have an array, so Type ends up being aliased to DecodableType - but it contains a field to a struct (TransportTriggerOptionsStruct) which does have an array, an then we get a compiler failure

When deciding whether TransportOptionsStruct should have its DecodableType aliased to Type, we also need to check if its children (such as TransportTriggerOptionsStruct) are also eligible, otherwise it cannot alias

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions