Skip to content

Release v1.0.1

Latest

Choose a tag to compare

@leoafarias leoafarias released this 04 Jul 22:56
036092a

Release v1.0.1

This patch hardens recursive schemas built with Ack.lazy against unbounded recursion.

Bug Fixes

  • Recursion depth guard for Ack.lazy / LazySchema (#122): recursive schemas now
    enforce a maximum recursion depth (default 100) on parse, runtime validation, and
    encode. Previously, cyclic or arbitrarily deep input could recurse without bound and
    risk a stack overflow. Exceeding the limit now fails fast with a descriptive validation
    error (lazy_max_depth: "Maximum recursion depth (N) exceeded.") instead of crashing.

Improvements

  • Ack.lazy(...) accepts an optional maxDepth (default LazySchema.defaultMaxDepth
    = 100; must be >= 1), carried through copyWith, equality, and serialization.
  • JSON Schema export warns that the runtime-only maxDepth check can't be expressed via
    $ref and is omitted from the exported schema.

Behavior note: recursion is now capped at depth 100 by default. Structures that
legitimately nest deeper must pass an explicit higher maxDepth.

The other packages (ack_annotations, ack_generator, ack_json_schema_builder,
ack_firebase_ai) are version-aligned to 1.0.1 with no functional changes.