v0.4.0 (22 March 2026)
SPI-Aware Path Widening, Expanded Plugin Ecosystem, and Focus DSL Restructure
This release introduces SPI-aware path widening for the Focus DSL, allowing automatic AffinePath and TraversalPath generation based on container cardinality, expands the TraversableGenerator plugin ecosystem to 23 generators across 6 library families, adds Traversal.asFold() for read-only monoidal aggregation, restructures the Focus DSL documentation into dedicated pages, and delivers comprehensive test coverage and Javadoc quality improvements across processor modules.
- SPI-Aware Path Widening: Automatic path type inference based on container cardinality:
ZERO_OR_ONEproducesAffinePath,ZERO_OR_MOREproducesTraversalPath, eliminating manual.each()and.some()calls in generated navigators - Cardinality-Based Widening:
TraversableGeneratorSPI extended withCardinalityenum, priority system (PRIORITY_FALLBACK,PRIORITY_DEFAULT,PRIORITY_OVERRIDE),widenCollectionsopt-in attribute, and wildcard type resolution for? extends T,? super T, and bare? - Nested Container Widening: Compound types like
Optional<List<String>>resolve correctly through recursive cardinality analysis, with navigator field collision detection - Generator Plugin Ecosystem: 23
TraversableGeneratorimplementations across 6 library families: base JDK (Array, List, Set, Optional, MapValue), Apache Commons Collections4 (HashBag, UnmodifiableList), Eclipse Collections (ImmutableBag, MutableBag, ImmutableList, MutableList, ImmutableSet, MutableSet, ImmutableSortedSet, MutableSortedSet), Google Guava (ImmutableList, ImmutableSet), Vavr (List, Set), and HKJ native (Either, Maybe, Try, Validated) - Traversal.asFold(): Conversion from any
Traversalto a read-onlyFoldfor monoidal aggregation, existence checks, and length counting via newConstForFoldapplicative functor - AffinePath: New
AffinePath<S, A>for zero-or-one navigation in Focus DSL, withAffineoptic interface supportinggetOrModifyandset - Portfolio Risk Analysis: Capstone example demonstrating container navigation, SPI widening, and nested optics composition
- Focus DSL documentation restructured into dedicated pages: Containers, Navigation, Effects, and Reference
- Tutorial 19: Navigator Generation: 7 exercises on annotation-driven navigator code generation
- Tutorial 20: Container Navigation: 4 exercises on SPI-aware container type navigation
- Automated SPI service declarations via Avaje SPI processor for plugin discovery
Previous: v0.4.1 Next: v0.3.0 to v0.3.7