Skip to content

Commit 1746f17

Browse files
authored
Merge pull request #33 from leeoades/copilot/update-change-log-and-docs
Changelog v1.3.0 and docs update for AOT/trim compatibility release
2 parents cebe914 + bcd35d8 commit 1746f17

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
66

77
## [Unreleased]
88

9+
## [1.3.0] - 2026-02-23
10+
11+
### Added
12+
- **⚡ 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+`
13+
- **🔧 Source-generated trigger registry** — New `FunctionalStateMachine.Core.Generator` Roslyn source generator bundled automatically inside the `FunctionalStateMachine.Core` NuGet package
14+
- Detects all `StateMachine<…, TTrigger, …>.Create()` call sites at compile time and registers concrete trigger subtypes via a `[ModuleInitializer]`
15+
- Replaces the previous reflection-based trigger type discovery (`Assembly.GetTypes()`) with zero-reflection runtime code
16+
- Enables unused-trigger analysis on AOT and trimmed builds without any extra configuration
17+
- **📦 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
18+
- **🔁 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
19+
- **📚 New documentation pages**
20+
- `docs/AOT-and-Trim-Compatibility.md` — Complete guide covering NativeAOT, `PublishTrimmed`, single-file publishing, and how the source generator eliminates reflection
21+
- `docs/Target-Framework-Compatibility.md` — Framework targeting guide describing what each target (`netstandard2.0` vs `net8.0`) provides
22+
923
## [1.2.0] - 2026-02-19
1024

1125
### Added

docs/Packages.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ This library is split into a few packages so you can reference only what you nee
77
The core state machine implementation.
88
Most consumers should reference this package otherwise what are you even doing here? 🤣
99

10+
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.
11+
1012
## FunctionalStateMachine.CommandRunner
1113

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

19-
Note: It includes a source generator so the disptacher does not use reflection.
21+
Note: It includes a source generator so the dispatcher does not use reflection.
2022

2123
## FunctionalStateMachine.Diagrams
2224

0 commit comments

Comments
 (0)