## SanderMertens/flecs — v4.1.5…v4.1.6

_200+ commits._

### Features
- **[build] Update amalgamated sources for new bake** (216bd6e)
- **Add link to Data Oriented Hierarchies blog** (757d05e)
- **[core] Add optimized function for moving small component values across tables** (e0f296c)
- **[script] Add bounds check to expression element access** (a1e18b3)
- **[commands] Don't transfer parent table records twice for batched remove+add** (799adf1)
- **Add reproducers for bugs** (380e731)
- **[script] Extend iterator field name array to support up to 32 fields** (1a43205)
- **[queries] Widen query tokens_len to 32 bits to support expressions longer than 16kb** (89d892f)
- **[meta] Add bounds check to flecs_parse_digit to reject too-long number literals** (ee231ea)
- **Add reproducers for bugs** (87edff7)
- **#2120 [observers] Add names to singleton constraint observers** (1ff98b8)
- **[docs] Add Appulse to README** (1fa861e)
- **[observers] Add fast trivial query check for multi-term observers** (c86478d)
- **#2114 [core] Allow for overriding component hooks to support hot reloading** (d5b981d)
- **#2112 [script] Add support for swizzle member expressions** (39f95a9)
- **#2109 [script] Add support for UUID annotation to flecs script** (3aa0f97)

### Fixes
- **[core] Fix missing OnAdd event for dont-fragment component on prefab instantiation** (2373562)
- **[queries] Fix buffer overflow from double-parse in flecs_term_parse** (8512a14)
- **[queries] Fix null pointer deref when parsing id with too many pair args** (a5ff056)
- **[queries] Fix query parser bugs** (06f1652)
- **[script] Fix issue where 'using' wasn't taken into account inside of script function bodies** (8d11f84)
- **[commands] Fix removal of dont-fragment component on entity deleted by batched command flush** (725f39e)
- **[commands] Fix spurious unparent when add/remove of ChildOf is batched on dont-fragment entity** (b0a0cf7)
- **[observers] Fix issue where observer for variable component is not always invoked** (51aa18f)
- **[core] Fix issue where prefab already in use assert would trigger during world cleanup** (de32a23)
- **#2146 [pipelines] Fix issue where .write() on singleton component doesn't trigger sync point** (3906a01)
- **#2152 [observers] Fix issue where observers with non-this sources can return invalid references during world fini** (f38d9e3)
- **#2142 [observers] Fix issue with yield_existing OnRemove observers where component is deleted before observer** (80a5736)
- **[queries] Fix issue where component wildcard term doesn't match DontFragment component for entities without fragmenting components** (b869aa2)
- **[query] Fix issue where component wildcard term doesn't match DontFragment components** (58ef654)
- **[ci] Fix new VS2026 warnings** (0e50447)
- **[cpp] Fix -Wzero-as-null-pointer-constant warnings in C++ headers** (7bb7de8)
- **[core] Fix issue in hashmap iterator** (1f2b556)
- **[script] Fix template preprocessing of new expression in const** (678acf8)
- **#2140 [doc] Fix incorrect doc comment for ecs_new_w_id()** (3c3e1e6)
- **[script] Fix issues with reporting line numbers for script errors** (8a33cea)
- **[script] Fix issue with partial updates and expression folding** (3da1b7d)
- **[script] Fix default child component resolution in nested scopes** (88dc983)
- **[parser] Fix out of bounds read when string ends with backslash** (51438cc)
- **[script] Fix component assignment with match expression** (fe25ad9)
- **[query] Fix crash when equality predicate with wildcard is in OR chain** (223ea66)
- **[entity] Fix off-by-one in prefab instance child bounds check** (ed7e572)
- **[script] Fix template preprocessing of component pairs and entity names with vars** (498a48a)
- **[ci] Fix CI** (f31e8a5)
- **[query] Fix optional up termination bound for ranges with offset** (1d4f1da)
- **[meta] Fix ecs_meta_get_char returning boolean instead of char value** (0f82ef5)
- **[queries] Fix crash when constrained pair target variable has no component record** (02dae9b)
- **[queries] Fix 32-bit shift overflow when constraining iterator variable with id >= 31** (1526709)
- **[queries] Fix neq predicate slice clamping and stale redo state for written sources** (00156ff)
- **[meta] Fix rtt vector equals returning true for vectors of different length** (c545374)
- **[core] Fix sparse storage not zeroing memory on remove when size param is 0** (b71ac39)
- **[core] Fix ecs_value_move_ctor invoking move instead of move_ctor** (d02d088)
- **[core] Fix ecs_add_path_w_sep adding ChildOf self pair when path is null** (48ab9f3)
- **[core] Fix integer overflow in strbuf float serializer for values >= 2^63** (c48cfea)
- **[core] Fix childof base index when prefab child has auto override pair sorting before ChildOf** (ffd9a08)
- **[core] Fix ecs_clone using wrong type info when cloning pair components from named entity** (cdfcaf3)
- **#2128 [queries] Fix issue where cached query for parent hierarchy could go out of sync after a shrink()** (869c420)
- **#2126 [query] Fix change detection for fixed-source writes with tag before component** (89ee611)
- **#2125 [ci] Fix emscripten CI build** (427e399)
- **#2122 [queries] Fix issue with dynamic component queries for Any source** (bc12e8e)
- **#2119 [query] Fix assert when cascade source loses component with change detection** (c2243be)
- **#2116 [observers] Fix duplicate OnSet for sparse overrides during prefab instantiation** (e4957ac)
- **#2104 [http] Fix idle HTTP connection purge and the stale-fd race** (7593c05)
- **#2107 [observers] Fix issue where filter terms would not correctly forward table events** (25b9fa8)
- **#1755 [modules] Fix issue with loading module from dynamic library** (9c2533f)
- **#2099 [observers] Fix stale trs/sizes during observer event forwarding** (f6bc373)
- **#2098 [observers] Fix issue where code read relationship from id without making sure id is a pair (2)** (749277a)
- **#2097 [observers] Fix observer up-traversal matching non-pair ids with colliding generation** (fb5ba4f)
- **#2096 [core] Fix stale EcsIdMarkedForDelete flag on non-fragmenting ChildOf after delete_with** (149e8e9)
- **#2093 [json] Fix issue where sparse tags aren't serialized to JSON** (0f6af3b)
- **#2092 [core] Fix issue where delete_with(*, parent) leaves non-fragmenting children orphaned** (937305d)
- **#2091 [core] Fix issue with stale entity in traversal cache when using non-fragmenting hierarchies** (faa4fb5)
- **#2089 [core] Fix issue where observer invoked during non-fragmenting ChildOf cleanup can see not-alive children** (1e19bae)
- **#2088 [core] Fix issue with generating deterministic entity ids for prefab children** (199c9d1)
- **#2087 [script] Fix issue where statements after if-else block would not be evaluated** (f92ed08)

### Backend
- **[core] Update version number to 4.1.6** (fb55f3c)
- **[core] Remove redundant condition in observable.c** (7c2816a)
- **[pipelines] Remove unused iters and iter_count members from pipeline state** (e42c0ea)
- **[queries] Allocate iterator vars and written arrays in a single block** (6653b01)
- **[queries] Skip op context allocation for cached queries without compiled ops** (c668e41)
- **[cpp] Replace usage of NULL with nullptr in C++ API headers** (1bf3e7c)
- **#2147 [cpp] Replace deprecated std::is_trivial for C++26 compliance** (323f3f0)
- **[script] Return error instead of aborting on float equality comparison** (fa1b59e)
- **[script] Fail script evaluation when annotation cannot be applied** (69b820f)
- **[query] Don't allow change detection on queries with order_by** (cda1622)
- **[query] Rebuild sorted table slices when shared order_by component changes** (3ff097d)
- **[parser] Don't allow mixing != with || in query expressions** (163cd8c)
- **[query] Don't decrement cacheable term count for non-cacheable scope terms** (0f8a598)
- **[query] Skip (ChildOf, 0) when matching ChildOf with wildcard target** (12f8aca)
- **[query] Match all rows of non-fragmenting child tables in written sparse up** (2cb3b61)
- **[core] Get prefab child name at spawn time instead of caching it** (e5966bc)
- **[ci] Implement reproducers for bugs** (cbfa433)
- **[query] Reset cache iteration cursor when cache op is re-entered** (72c9f25)
- **[query] Truncate wildcard match vector when rematch yields fewer matches** (8f986fb)
- **[query] Detect multi-level up matches for sparse and non-fragmenting components** (9e2c602)
- **[query] Continue scanning sibling targets when building up cache** (6d31a2e)
- **[query] Clamp neq second slice to the source range** (25eb19c)
- **[core] Map toggle bitset columns without assuming contiguous ids** (efd243f)
- **[parser] Size token buffer to input in flecs_id_parse to prevent overflow** (b152249)
- **[commands] Don't drop batched ensure on non-fragmenting components** (c4d4a89)
- **[entity] Skip non-entity ids when enabling/disabling a prefab** (d1e7bfb)
- **[entity] Return NULL when getting an inherited tag through IsA** (d1df888)
- **[json] Limit control character escaping to component value strings** (b6d6d3b)
- **[meta] Accept NaN and Inf when deserializing floating point values** (e9051ae)
- **[meta] Parse unsigned 64-bit values without signed overflow in set_string** (4f88825)
- **[json] Handle invalid escape sequences when parsing JSON strings** (f5c3aee)
- **[meta] Compare all elements of array members in RTT cmp/equals hooks** (b4837f6)
- **[json] Escape control characters in serialized JSON strings** (4f42f17)
- **[json] Sign-extend signed enum values when serializing to JSON** (4be2a6f)
- **[meta] Serialize uintptr values as full 64-bit unsigned** (163e31a)
- **[meta] Read enum underlying type in ecs_meta_set_value** (8b310eb)
- **[ci] Ci fixes** (92685e0)
- **[queries] Use field index instead of term index for toggle instruction masks** (fe2c0ed)
- **[queries] Use field index of order_by term when checking change detection during sort** (b6fe3fa)
- **[queries] Use field index instead of term index for sparse row_fields bitmask** (10d3778)
- **[queries] Map iterator set_fields to cache fields when checking change detection for partially cached queries** (47e64a2)
- **[queries] Sync wildcard match monitors when skipping empty tables during iteration** (61eaf56)
- **[meta] Free all serializer value contexts when serializing table to JSON** (a35fc2f)
- **[meta] Reject single-character string literals in ecs_meta_set_string_literal** (e154ac3)
- **[observers] Advance component record when forwarding multiple IsA pairs with dirty reachable cache** (2a3a8d9)
- **[core] Batch deferred delete commands so adds after delete are not applied** (04b0f8f)
- **[core] Refetch component pointer after on_replace hook in batched command flush** (6963962)
- **[observers] Don't forward Parent component as ChildOf pair twice when wildcard event observer exists** (8d0e583)
- **[core] Throw error when changing children of already instantiated prefab** (ebfeacc)
- **[core] Don't destroy source toggle bitset when moving single entity that removes a toggle** (47e0e9e)
- **[core] Clear toggle bitset bits when clearing table entities without deallocating** (e08cd52)
- **[core] Apply ChildOf side effects when replacing exclusive pair in table graph** (f3ae1a5)
- **#2127 [core] Improve performance of reparenting for parent hierarchies** (e5781d7)
- **#2124 [core] Create default range for already created entities when calling ecs_entity_range_new()** (26332aa)
- **[core] Don't force empty ChildOf reparent diff for non-fragmenting pair tables** (c0b0d81)
- **[core] Don't delete prefab tables and dangling pairs during delete_with/remove_all** (363f185)
- **[core] Update prefab-children flag on ChildOf record when parent promoted to prefab** (29e4b91)
- **[core] Gate ChildOf unparent cleanup on diff flags to avoid spurious depth recompute** (4e80b7a)
- **[observers] Invalidate reachable-id cache when target deleted via non-fragmenting cleanup** (04930cc)
- **[core] Skip already-deleted ordered children during fini depth propagation** (283d823)
- **[core] Propagate ordered-children tracking flag to pre-existing child tables** (5c6d076)
- **[core] Cleanup prefab tree spawners at fini before deleting entities** (d2c8f37)
- **[core] Throw INVALID_OPERATION assert when parenting to not-alive parent** (3a2a2ed)
- **#2118 [build] Update amalgamation configuration** (0b1237f)
- **[queries] Skip down-traversal leaf check for non-traversable tables** (e3f4d11)
- **[queries] Resolve top-level up target without the traversal cache map** (d00804d)
- **[queries] Improve up traversal performance by reusing down cache buffer** (0e1037f)
- **[observers] Don't eat observer table locking overhead in release mode** (3a764e7)
- **[queries] Improve performance of iterator creation** (6274a87)
- **#2111 [script] Allow for direct assigning of expressions to components** (6523a34)
- **#2070 [queries] Refactor query cache to store column indices directly** (8ac64f4)
- **#2106 [core] Reduce the size of ecs_ref_t** (35fa96a)
- **#2101 [script] Skip stale deferred template instantiation events** (1094ec7)
- **#2100 [script] Allow newlines in scripts between with expressions and with scope** (4e177c0)
- **#2090 [script] Implement script functions** (5a6960e)

_Recap by [Repo Wrapped](https://repowrapped.com/gh/SanderMertens/flecs?utm_source=github-action)._