hilla
hilla copied to clipboard
Feature: Limit depth of nested data structures in the Binder
Using entities in property types of other entities can easily create recursive data structures. Such recursive structures work for code generation, but in runtime they sometimes trigger a “Maximum call stack size exceeded” when the Binder is scanning children. The error is not descriptive, and from the call stack it is not clear why recursion happens.
As a solution, introduce a configurable depth limit for scanning the nested data in the Binder. For example, with a default limit of 8, when the Binder throws when reaching the 9th level, it throws with the message: Maximum depth for nested data structures exceeded.