Skip to content

Remove dead end in parser for __ctrlFlow(enable=false) and enable=false #492

@AntoineGautier

Description

@AntoineGautier

The elements annotated with __ctrlFlow(enable=false) (deadEnd property) or enable=false with literal boolean assignments are not parsed in server/src/parser/parser.ts.

let childInputs =
  this.enable === false || this.deadEnd
    ? []
    : typeInputs[this.type]?.inputs || [];

This must be changed because these elements (such as cfg in Buildings.Templates.AirHandlersFans.Interfaces.PartialAirHandler) may contain parameters used in bindings for, e.g, enable annotations.

The dead end logic should be moved to the client interpreter.
If any parent in the instance tree is disabled, the declaration must not be displayed.

⚠️ This change is expected to significantly increase the runtime of npm run parseTemplateJSON (e.g., medium elements are currently not parsed due to this annotation). The impact must be evaluated when addressing the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions