Release History
This page documents the evolution of Higher-Kinded-J from its initial release through to the current version. Each release builds on the foundations established by earlier versions, progressively adding type classes, monads, optics, and the Effect Path API.
- Detailed release notes for recent versions (0.3.0–0.4.1) with links to documentation
- Summary release notes for earlier versions (pre-0.3.0)
- Links to GitHub release pages for full changelogs
Recent Releases
v0.4.1 -- 8 April 2026
Effect Handlers, Spring Observability, and Monad Transformer Enhancements
This release introduces algebraic effect handlers with annotation-driven code generation, delivers a complete payment processing example with four interpretation modes, adds FreePath for-comprehension support, extends Spring Boot integration with VTask/VStream metrics and virtual thread health monitoring, adds mapT to all monad transformers, and includes significant bug fixes for stack safety, traverse performance, and resilience patterns.
@EffectAlgebra- Annotation processor generating five classes per sealed interface: Kind marker + Witness, KindHelper, Functor (auto-detectsmapKfor CPS vs cast-through), Ops (smart constructors +Boundinner class), and abstract interpreter skeleton with exhaustiveswitchdispatch@ComposeEffects- Annotation processor generating composition infrastructure for 2-4 effect algebras:Injectfactory methods via right-nestedEitherF, composedFunctor,BoundSetrecord, andinterpret()bridge method@Handles- Compile-time validation that interpreter classes handle all operations in an effect algebra; reports missing handlers as errors and extra handlers as warnings- EitherF - Sum type for composing effect algebras via right-nesting, with
Injectfor embedding operations,Free.translatefor program transformation, andInterpreters.combine()for 2-4 effect dispatch - HandleError --
Free.HandleErrorwraps sub-programs with typed error recovery; delegates toMonadError.handleErrorWithwhen available, silently ignored otherwise. Supports subclass matching viaClass<E>token - ErrorOp - Effect algebra for typed error raising within Free programs, with
ErrorOps.raise()smart constructor andBound<E, G>for composed effects - StateOp - Optics-native state effect algebra with 6 operations (
View,Over,Assign,Preview,TraverseOver,GetState), CPS for correct functor mapping, andStateOpInterpreter/IOStateOpInterpreterinterpreters - ProgramAnalyser - Static analysis of Free program trees: counts instructions (
Suspend), recovery points (HandleError), parallel scopes (Ap), and opaque regions (FlatMapped). All counts are lower bounds. - Payment Processing - Complete worked example with 4 effect algebras, 13 interpreters across production (
IO), testing (Id), quote (fee estimation), and audit (WriterT) modes; 12 tests and 6 tutorials - Effect Handlers Introduction - Motivational documentation covering the DI gap, programs-as-data, DOP connection, terminology bridge mapping FP concepts to Java equivalents, and when-to-use guidance
- FreePath For-Comprehensions - FreePath as the 10th path type in the
ForPathsystem, withfrom(),let(),focus(),par(),traverse(),sequence(),flatTraverse(), andyield()steps - FreePath.attempt() - Captures outcome as
Either<Throwable, A>, mapping success toRightand handling errors asLeft - mapT - New method on all 6 monad transformers (
EitherT,MaybeT,OptionalT,WriterT,ReaderT,StateT) for transforming the outer monad layer without unwrapping. Custom AssertJ assertions added forWriterT,ReaderT, andStateT - VTask/VStream Metrics -
HkjMetricsServicerecords success/error counts and execution duration forVTaskPathReturnValueHandlerand element counts forVStreamPathReturnValueHandler; metrics exposed via/actuator/hkjendpoint - Virtual Thread Health Indicator - Spring Boot health indicator monitoring virtual thread availability with configurable threshold
- OpenRewrite Recipes -
AddHandleErrorCaseRecipefor missingHandleError/Apswitch cases,ConvertRawFreeToFreePathRecipeforFreePathmigration,DetectInjectBoilerplateRecipefor@ComposeEffectsadoption - FList - Lightweight immutable cons-list replacing O(n^2)
LinkedListcopy inListTraverse,StreamTraverse, andVStreamTraversewith O(n) cons accumulation - Free.foldMap stack safety: added trampolining to prevent
StackOverflowErroron deep program chains - FreeAp.foldMap stack safety: added trampolining for deep applicative trees
- CircuitBreaker: reset failure count on success in
HALF_OPENstate - ConstBifunctor: fix NPE in
second()by applying function to second element - IO.raceIO: fix
ClassCastExceptioninfirstVTaskSuccessfor checked exceptions - Lazy: add reentrant-call detection to prevent infinite recursion
- Bulkhead: add permit-release guard to prevent negative permits
- VStreamPar.merge: join background producer thread on close to prevent thread leak
- VStreamThrottle: replace dual
AtomicLongwithAtomicReference<WindowState>CAS loop - Free
Fparameter tightened fromWitnessArity<?>toWitnessArity<TypeArity.Unary>across the entire hierarchy, eliminating raw type usage - Additional edge case tests for
NavigatorClassGenerator,FocusProcessor, andForPathStepGenerator - JMH Benchmarks -- 7 new benchmarks for EitherF dispatch, Free.translate, HandleError overhead, ProgramAnalyser traversal, and program construction cost
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
v0.3.7 -- 15 March 2026
WriterT Transformer, For-Comprehension Power-Ups, Build Tooling, and Spring Virtual Thread Support
This release introduces the WriterT monad transformer with MTL-style capability interfaces, enriches for-comprehensions with parallel composition, traversal operations, and optics integration, adds compile-time Path type checking via the new hkj-checker javac plugin, delivers one-line project setup through build tool plugins (hkj-gradle-plugin and hkj-maven-plugin), and extends Spring MVC with virtual-thread-native return value handlers for VTaskPath and VStreamPath.
- WriterT -- Monad transformer for output accumulation across effect boundaries, wrapping
Kind<F, Pair<A, W>>with automatic Monoid-based combining duringflatMapchains - MonadWriter -- MTL-style capability interface with
tell,listen,pass,listens, andcensorfor output accumulation - MonadReader -- MTL-style capability interface with
ask,local,reader, andasksfor shared environment access - MonadState -- MTL-style capability interface with
get,put,modify, andgetsfor stateful computation - par() -- Parallel/applicative composition for
ForandForPathcomprehensions; true concurrency onVTask, intent-documenting on sequential monads - traverse/sequence/flatTraverse -- Bulk effectful operations within comprehension chains: apply an effectful function across a structure, flip
Structure<Effect<A>>toEffect<Structure<A>>, or traverse-and-flatten in one step - For-Comprehension Optics Integration --
through(Iso)for type-safe value conversion inFor;traverseOver(),modifyThrough(),modifyVia(), andupdateVia()for optics-driven state operations inForState - Fold Combinators --
Fold.plus(),Fold.empty(), andFold.sum()forming a monoid on folds for multi-path data extraction - Compile-Time Path Checks --
hkj-checkerjavac plugin detecting Path type mismatches at compile time forvia,then,zipWith,zipWith3,recoverWith, andorElse - Build Plugins --
hkj-gradle-plugin(one-line Gradle setup) andhkj-maven-plugin(Maven lifecycle extension) that auto-configure HKJ dependencies,--enable-previewflags, compile-time checking, and optional Spring Boot integration - hkj-bom -- Bill of Materials POM for version-aligned dependency management across all HKJ modules in both Gradle and Maven
- Diagnostics --
hkjDiagnosticsGradle task andmvn hkj:diagnosticsgoal reporting active dependencies, compiler arguments, and checks - VTaskPath Spring MVC --
VTaskPathReturnValueHandlerconverting controller return values to asyncDeferredResultresponses on virtual threads - VStreamPath SSE --
VStreamPathReturnValueHandlerconverting controller return values to Server-Sent Events with pull-based backpressure, no Reactor required - Dependency updates: Gradle 9.4.0, JUnit 6.0.3, Jackson 3.1.0, Spring Boot 4.0.3, jOOQ 3.20.11, javapoet 0.12.0, and others
- Faster
FunctionValidatorandKindValidatorwith simplified implementation - Test reliability improvements: replaced
Thread.sleepwith Awaitility across test suite
v0.3.6 -- 6 March 2026
VStream Lazy Streaming, Resilience Patterns, and ForState Comprehensions
This release introduces VStream, a lazy pull-based streaming type built on virtual threads with full HKT integration, adds four core resilience patterns (Circuit Breaker, Bulkhead, Retry, Saga) with Effect Path integration, extends ForState with filtering and pattern matching, and delivers a Market Data Pipeline capstone example.
- VStream -- Lazy pull-based streaming on virtual threads with
Stepprotocol (Emit/Done/Skip), factory methods (of,range,iterate,generate,unfold), transformation combinators, and error recovery - VStream HKT Integration --
VStreamKindwitness type with Functor, Applicative, Monad, Foldable, Traverse, and Alternative type class instances - VStream Parallel Operations --
VStreamParwithparEvalMap,parEvalMapUnordered,parEvalFlatMap,merge,parCollect, and chunking combinators - VStream Resources --
bracket/onFinalizeresource lifecycle management andVStreamReactivebidirectionalFlow.Publisherbridge with backpressure - VStreamPath -- Effect Path bridge with factory methods,
PathOpsoperations, terminal operations bridging toVTaskPath, and optics focus bridge - Circuit Breaker -- State machine (Closed/Open/HalfOpen) with configurable failure thresholds and recovery timeouts
- Bulkhead -- Concurrency limiting for isolating resource access
- Retry -- Configurable retry policies with fixed delay, exponential backoff, and jitter
- Saga -- Distributed transaction compensation with ordered rollback
- Combined Resilience -- Composing multiple resilience patterns and Path API ergonomic methods:
retry(),circuitBreaker(),bulkhead(),timeout() - ForState -- Filtering (
when), pattern matching (matchThen), traversals, zoom, andtoState()bridge from For comprehensions at all arities (1–12) - traverseWith() -- Parallel effectful optics traversal for
FocusPath,AffinePath, andTraversalPathviaVTaskPathandStructuredTaskScope - Market Data Pipeline -- 14-feature capstone example demonstrating concurrent feed merging, parallel enrichment, risk assessment, windowed aggregation, anomaly detection, and circuit breaker failover
- Refreshed Monads chapter with problem-first structure, real-world analogies, and consistent formatting
FunctionValidatoroptimisation: deferred error-message construction avoidsStringallocation on the happy path; fixed Gradle benchmark commands (-Pincludes)- Javadoc generation fix to include annotation-processor-generated sources (
Tuple2–Tuple12,MonadicSteps, etc.) - JMH benchmarks for VStream construction, combinators, terminals, and parallel operations
v0.3.5 -- 15 February 2026
Extended For-Comprehensions, VTask API Refinement, and Documentation Restructure
This release extends for-comprehension arity to 12, simplifies the VTask API, adds Maybe-to-Either conversions, upgrades to JUnit 6, and delivers a comprehensive documentation restructure with quickstart guides, cheat sheets, migration cookbooks, and railway diagrams.
- For-Comprehension Arity 12 --
ForandForPathnow support up to 12 monadic bindings (previously 5), with generatedTuple9–Tuple12andFunction9–Function12 - VTask API --
VTask.run()no longer declaresthrows Throwable; checked exceptions are wrapped inVTaskExecutionException - Maybe.toEither -- New
toEither(L)andtoEither(Supplier<L>)conversion methods for seamlessMaybe→Eithertransitions - Quickstart -- New getting-started guide with Gradle and Maven setup including
--enable-previewconfiguration - Cheat Sheet -- Quick-reference for Path types, operators, escape hatches, and type conversions
- Stack Archetypes -- 7 named transformer stack archetypes with colour-coded railway diagrams
- Migration Cookbook -- 6 recipes for migrating from try/catch, Optional chains, null checks, CompletableFuture, validation, and nested records
- Compiler Error Guide -- Solutions for the 5 most common Effect Path compiler errors
- Effects-Optics Capstone -- Combined effects and optics pipeline example
- Railway operator diagrams for all 8 Effect Path operators and for EitherT, MaybeT, OptionalT transformers
- JUnit 6.0.2 upgrade (from 5.14.1) across all test modules
- Golden file test infrastructure with automated sync verification and pitest mutation coverage improvements
v0.3.4 -- 31 January 2026
External Type Optics and Examples Gallery
This release introduces powerful optics generation for external types you cannot modify, plus a new Examples Gallery chapter documenting all runnable examples.
- @ImportOptics -- Generate optics for JDK classes and third-party library types via auto-detection of withers and accessors
- Spec Interfaces -- Fine-grained control over external type optics with
OpticsSpec<S>for complex types like Jackson'sJsonNode - @ThroughField Auto-Detection -- Automatic traversal type detection for
List,Set,Optional, arrays, andMapfields - Examples Gallery -- New chapter with categorised, runnable examples demonstrating core types, transformers, Effect Path API, and optics
- Comprehensive hkj-processor testing improvements with enhanced coverage
v0.3.3 -- 24 January 2026
Structured Concurrency, Atomic Optics, and Enhanced Examples
This release introduces structured concurrency primitives, atomic coupled-field updates, and a comprehensive Order Workflow example demonstrating these patterns.
- Structured Concurrency --
Scopefor parallel operations withallSucceed(),anySucceed(),firstComplete(), andaccumulating()joiners - Resource Management --
Resourcefor bracket-pattern cleanup with guaranteed release - Coupled Fields --
Lens.pairedfor atomic multi-field updates bypassing invalid intermediate states - Order Workflow Overview -- Reorganised documentation with focused sub-pages
- Concurrency and Scale -- Context, Scope, Resource, VTaskPath patterns in practice
EnhancedOrderWorkflow-- Full workflow demonstrating Context, Scope, Resource, VTaskPathOrderContext-- ScopedValue keys for trace ID, tenant isolation, and deadline enforcement- Scope & Resource Tutorials -- 18 exercises on concurrency patterns
- Release History -- New page documenting all releases
v0.3.2 -- 17 January 2026
Virtual Thread Concurrency with VTask
This release introduces VTask<A>, a lazy computation effect leveraging Java 25's virtual threads for lightweight concurrent programming.
- VTask -- Lazy computation effect for virtual thread execution
- Structured Concurrency --
Scopefor parallel operations withallSucceed(),anySucceed(), andaccumulating()patterns - Resource Management --
Resourcefor bracket-pattern cleanup guarantees - VTaskPath -- Integration with the Effect Path API
- Concurrency and Scale -- Practical patterns in the Order Workflow example
Parparallel combinators for concurrent execution- Comprehensive benchmarks comparing virtual vs. platform threads
v0.3.1 -- 15 January 2026
Static Analysis Utilities
This release adds utilities for statically analysing Free Applicative and Selective functors without execution.
- Choosing Abstraction Levels -- Guide to selecting Functor, Applicative, Selective, or Monad
- Free Applicative -- Static analysis with
FreeApAnalyzer - Selective -- Conditional effects with
SelectiveAnalyzer - Tutorial 11 on static analysis patterns
v0.3.0 -- 4 January 2026
Effect Path Focus Integration
Major release introducing the unified Effect Path API and Focus DSL integration. Requires Java 25 baseline.
- Effect Path Overview -- The railway model for composable effects
- Path Types -- 17+ composable Path types including
EitherPath,MaybePath,IOPath - Focus DSL -- Type-safe optics with annotation-driven generation
- Focus-Effect Integration -- Bridge between optics and effects
- ForPath Comprehension -- For-comprehension syntax for Path types
- Spring Boot Integration -- Spring Boot 4.0.1+ support
- Order Workflow -- Complete example demonstrating Effect Path patterns
Earlier Releases
v0.2.8 -- 26 December 2025
- Introduced
ForPathfor Path-native for-comprehension syntax - Complete Spring Boot 4.0.1 migration of
hkj-springfromEitherTto Effect Path API - New return value handlers for Spring integration
v0.2.7 -- 20 December 2025
- Effect Contexts:
ErrorContext,OptionalContext,ConfigContext,MutableContext - Bridge API enabling seamless transitions between optics and effects
v0.2.6 -- 19 December 2025
- New Effect Path API with 17+ Path types
- Retry policies and parallel execution utilities
- Kind field support in Focus DSL
v0.2.5 -- 9 December 2025
- Annotation-driven Focus DSL for fluent optics composition
- Free Applicative and Coyoneda functors
- Natural Transformation support
v0.2.4 -- 3 December 2025
- Affine optic for focusing on zero or one element
ForTraversal,ForState, andForIndexedcomprehension builders- For-comprehension and optics integration
v0.2.3 -- 1 December 2025
- Cross-optic composition (Lens + Prism → Traversal)
- Experimental Spring Boot starter
- Custom target package support for annotation processor
v0.2.2 -- 29 November 2025
- Java 25 baseline
- Experimental
hkj-springmodule - Validation helpers and ArchUnit architecture tests
- Thread-safety fix in Lazy memoisation
v0.2.1 -- 23 November 2025
- 7-part Core Types tutorial series
- 9-part Optics tutorial (~150 minutes total)
- Versioned documentation system
- Property-based testing infrastructure
- JMH benchmarking framework
v0.2.0 -- 21 November 2025
- Six new optic types: Fold, Getter, Setter, and indexed variants
- FreeMonad for DSL construction
- Trampoline for stack-safe recursion
- Const Functor
- Enhanced Monoid with new methods
- Alternative type class
v0.1.9 -- 14 November 2025
- Selective type class for conditional effects
- Enhanced optics with
modifyWhen()andmodifyBranch() - Bifunctor for Either, Tuple2, Validated, and Writer
- Higher-kinded Stream support
v0.1.8 -- 9 September 2025
- Profunctor type class
- Profunctor operations in universal Optic interface
v0.1.7 -- 29 August 2025
- Generated
with*helper methods for records via@GenerateLenses Traversals.forMap()for key-specific Map operations- Semigroup interface with Monoid extending it
- Validated Applicative with error accumulation
v0.1.6 -- 14 July 2025
- Optics introduction: Lens, Iso, Prism, and Traversals
- Annotation-based optics generation
- Plugin architecture for extending Traversal types
- Modular release structure
v0.1.5 -- 12 June 2025
- For comprehension with generators, bindings, guards, and yield
- Tuple1-5 and Function5 support
v0.1.4 -- 5 June 2025
- Validated Monad
- Standardised widen/narrow pattern for KindHelpers (breaking change)
v0.1.3 -- 31 May 2025
- First Maven Central publication
- 12 monads, 5 transformers
- Comprehensive documentation
v0.1.0 -- 3 May 2025
- Initial release
- Core types: Either, Try, CompletableFuture, IO, Lazy, Reader, State, Writer
- EitherT transformer
- GitHub Releases -- Full changelogs and assets
- Contributing -- How to contribute to Higher-Kinded-J
Previous: Glossary Next: Benchmarks & Performance