Skip to content

Commit 6b3d83a

Browse files
committed
Merge branch 'release/v3.2.0' into main
2 parents 45e83c9 + 153baa6 commit 6b3d83a

32 files changed

Lines changed: 1082 additions & 10 deletions

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,4 +115,7 @@ lib/generated_plugin_registrant.dart
115115
# End of https://www.toptal.com/developers/gitignore/api/dart,flutter,visualstudiocode
116116

117117
**/.idea/
118-
**/*.iml
118+
**/*.iml
119+
120+
# Any log file
121+
**/*.log

custom_lint.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
custom_lint:
2+
rules:
3+
- continuum_missing_apply_handlers

packages/continuum/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [3.2.0] - 2026-01-14
9+
10+
### Added
11+
12+
- Added a custom lint rule that reports when a non-abstract `@Aggregate()` class mixes in the generated `_$<Aggregate>EventHandlers` but does not implement all required `apply<Event>(...)` methods.
13+
- Added a Quick Fix action to implement missing `apply<Event>(...)` handler stubs.
14+
- Added a runnable example package under `example/` showing the lint in action.
15+
816
## [3.1.1] - 2026-01-13
917

1018
### Fixed

packages/continuum/README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,51 @@ targets:
364364
enabled: true
365365
```
366366
367+
## Custom Lints (Recommended)
368+
369+
Continuum can optionally surface common mistakes *immediately in the editor* using a custom lint plugin.
370+
371+
### Why use it?
372+
373+
Some Continuum patterns rely on generated mixins (for example `_$UserEventHandlers`). If a concrete `@Aggregate()` class forgets to implement one of the required `apply<Event>(...)` handlers, Dart can sometimes delay the failure until runtime (or until the class is instantiated, depending on how the type is used).
374+
375+
The `continuum_lints` package detects this situation early and reports it as a diagnostic while you type.
376+
377+
### Setup
378+
379+
Add these dev dependencies:
380+
381+
```yaml
382+
dev_dependencies:
383+
custom_lint: ^0.8.1
384+
continuum_lints: ^3.1.1
385+
```
386+
387+
Enable the analyzer plugin in your `analysis_options.yaml`:
388+
389+
```yaml
390+
analyzer:
391+
plugins:
392+
- custom_lint
393+
```
394+
395+
Optionally, configure which rules are enabled (recommended to keep things explicit):
396+
397+
```yaml
398+
custom_lint:
399+
enable_all_lint_rules: false
400+
rules:
401+
- continuum_missing_apply_handlers
402+
```
403+
404+
### CI usage
405+
406+
`dart analyze` does not run custom lints. In CI, run:
407+
408+
```bash
409+
dart run custom_lint
410+
```
411+
367412
## Working with Persistence
368413

369414
### Event Stores

packages/continuum/analysis_options.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ linter:
5757

5858
# Analyzer settings.
5959
analyzer:
60+
plugins:
61+
- custom_lint
62+
6063
# Exclude certain files or directories from analysis.
6164
exclude:
6265
- "**/*.g.dart"

packages/continuum/pubspec.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: continuum
22
description: An event sourcing library for Dart with code generation support.
3-
version: 3.1.1
3+
version: 3.2.0
44
repository: https://github.com/zooper/continuum
55
homepage: https://zooper.dev
66

@@ -16,6 +16,7 @@ dependencies:
1616

1717
dev_dependencies:
1818
build_runner: ^2.4.0
19+
custom_lint: ^0.8.1
1920
lints: ^6.0.0
2021
mockito: ^5.4.0
2122
test: ^1.25.6

packages/continuum_generator/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [3.2.0] - 2026-01-14
9+
10+
### Added
11+
12+
- Added a custom lint rule that reports when a non-abstract `@Aggregate()` class mixes in the generated `_$<Aggregate>EventHandlers` but does not implement all required `apply<Event>(...)` methods.
13+
- Added a Quick Fix action to implement missing `apply<Event>(...)` handler stubs.
14+
- Added a runnable example package under `example/` showing the lint in action.
15+
816
## [3.1.1] - 2026-01-13
917

1018
### Fixed

packages/continuum_generator/analysis_options.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ linter:
5858

5959
# Analyzer settings.
6060
analyzer:
61+
plugins:
62+
- custom_lint
63+
6164
# Exclude certain files or directories from analysis.
6265
exclude:
6366
- "**/*.g.dart"

packages/continuum_generator/pubspec.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: continuum_generator
22
description: Code generator for the continuum event sourcing library.
3-
version: 3.1.1
3+
version: 3.2.0
44
repository: https://github.com/zooper/continuum
55
homepage: https://zooper.dev
66

@@ -12,13 +12,14 @@ resolution: workspace
1212
dependencies:
1313
analyzer: ^8.0.0
1414
build: ^4.0.0
15-
continuum: ^3.0.1
15+
continuum: ^3.2.0
1616
source_gen: ^4.0.0
1717
glob: ^2.1.3
1818

1919
dev_dependencies:
2020
build_runner: ^2.4.0
2121
build_test: ^3.5.4
22+
custom_lint: ^0.8.1
2223
lints: ^6.0.0
2324
source_gen_test: ^1.0.0
2425
test: ^1.25.6
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
### Added
11+
12+
- Added a custom lint rule that reports when a non-abstract `@Aggregate()` class mixes in the generated `_$<Aggregate>EventHandlers` but does not implement all required `apply<Event>(...)` methods.
13+
- Added a Quick Fix action to implement missing `apply<Event>(...)` handler stubs.
14+
- Added a runnable example package under `example/` showing the lint in action.

0 commit comments

Comments
 (0)