Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this

## [Unreleased]

## [1.3.0] - 2026-02-23

### Added
- **⚡ AOT and trim compatibility** — `FunctionalStateMachine.Core` and `FunctionalStateMachine.CommandRunner` are now fully compatible with NativeAOT (`PublishAot=true`), trimming (`PublishTrimmed=true`), and single-file publishing (`PublishSingleFile=true`) when targeting `net8.0+`
- **🔧 Source-generated trigger registry** — New `FunctionalStateMachine.Core.Generator` Roslyn source generator bundled automatically inside the `FunctionalStateMachine.Core` NuGet package
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is too much detail for the changelog. The headline feature - that is is now AoT and Trimming compatible is sufficient. A sub note simply stating that reflection code has been replaced by source generated code is helpful without needing to go into any more detail.

- Detects all `StateMachine<…, TTrigger, …>.Create()` call sites at compile time and registers concrete trigger subtypes via a `[ModuleInitializer]`
- Replaces the previous reflection-based trigger type discovery (`Assembly.GetTypes()`) with zero-reflection runtime code
- Enables unused-trigger analysis on AOT and trimmed builds without any extra configuration
- **📦 Multi-targeting** — `FunctionalStateMachine.Core` and `FunctionalStateMachine.CommandRunner` now ship both `netstandard2.0` and `net8.0` builds in the same NuGet package; the correct build is selected automatically by NuGet
- **🔁 Multiple state machines sharing a trigger type** — Multiple state machines in the same project that share a `TTrigger` base type are fully supported; the generator registers trigger types once (deduplicated) and each machine independently reports unused triggers at `.Build()` time
- **📚 New documentation pages**
- `docs/AOT-and-Trim-Compatibility.md` — Complete guide covering NativeAOT, `PublishTrimmed`, single-file publishing, and how the source generator eliminates reflection
- `docs/Target-Framework-Compatibility.md` — Framework targeting guide describing what each target (`netstandard2.0` vs `net8.0`) provides

## [1.2.0] - 2026-02-19

### Added
Expand Down
4 changes: 3 additions & 1 deletion docs/Packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ This library is split into a few packages so you can reference only what you nee
The core state machine implementation.
Most consumers should reference this package otherwise what are you even doing here? 🤣

It includes a bundled source generator (`FunctionalStateMachine.Core.Generator`) that registers your trigger types at compile time. This enables unused-trigger analysis and makes the library fully compatible with NativeAOT and `PublishTrimmed` — no extra package reference needed.

## FunctionalStateMachine.CommandRunner

Optional command runner integration that dispatches commands through DI.
Expand All @@ -16,7 +18,7 @@ Use it when you want:
- Command handlers as DI-resolved classes.
- A built-in provider to run commands returned by the state machine.

Note: It includes a source generator so the disptacher does not use reflection.
Note: It includes a source generator so the dispatcher does not use reflection.

## FunctionalStateMachine.Diagrams

Expand Down