hilla icon indicating copy to clipboard operation
hilla copied to clipboard

Feature: Limit depth of nested data structures in the Binder

Open platosha opened this issue 3 years ago • 0 comments

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.

platosha avatar Sep 27 '22 12:09 platosha