Conversation
…in Elementary models.
…ExecutionHandler. Refactor: simplify error handling by removing unnecessary async.
There was a problem hiding this comment.
Pull request overview
Adds async execution helpers to elementary_helper to simplify running operations with centralized error handling, lifecycle-aware disposal behavior, and optional sequential queueing.
Changes:
- Introduces
ExecutionHandler/SequentialExecutionHandlerplusExecutor/SequentialExecutormixins. - Adds unit tests covering success, error forwarding, concurrency vs sequential ordering, and disposal behavior.
- Updates package docs and adds a dependency on
elementary.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| packages/elementary_helper/lib/src/execution/execution_handler.dart | New execution helpers (concurrent + sequential) and ElementaryModel mixins. |
| packages/elementary_helper/test/execution/execution_handler_test.dart | Test coverage for handler behavior (errors, ordering, disposal). |
| packages/elementary_helper/README.md | Documentation for the new APIs and guidance on disposal behavior. |
| packages/elementary_helper/pubspec.yaml | Adds elementary dependency needed by the new mixins. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/elementary_helper/lib/src/execution/execution_handler.dart
Outdated
Show resolved
Hide resolved
packages/elementary_helper/lib/src/execution/execution_handler.dart
Outdated
Show resolved
Hide resolved
packages/elementary_helper/lib/src/execution/execution_handler.dart
Outdated
Show resolved
Hide resolved
… and update dependencies.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #144 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 14 11 -3
Lines 429 322 -107
==========================================
- Hits 429 322 -107
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This pr introduces a bunch of helpers that are supposed to support resolving multiple execution intentions more easily, bringing lifecycle management and queueing, and avoiding race conditions.