better_effect
Contextual dependency injection, typed error propagation, and scoped resources for result_dart.
What this package is like to depend on
Last release 2 days ago
21 Aug 2026
Too new to tell
only 2 release windows
Nearly every release is documented
notes for 4 of 4 stable releases
Nothing withdrawn
no release was ever pulled
0 months old
4 releases · first in 2026
4 releases in the last 12 months
see the full history below
Release timeline
4 releases · Aug 2026 to Aug 2026Releases
latest 4-
0.4.021 Aug 2026Release notes
Open source →Published on pub.dev: https://pub.dev/packages/better_effect/versions/0.4.0
- Added the repository-level normative semantic contract and an independent
cross-package conformance suite mapping stable lifecycle/outcome rules to
executable rule IDs. - Semantic compatibility changes now require the matching conformance scenario,
affected package changelog entries, and a semantic migration ledger entry. - Added
Runtime.forkfor feature-length child environments with local-first
resolution and parent fallback. - Child Module resources survive multiple executions, close exactly once with
the child Runtime, and are coordinated before parent resources during parent
shutdown. - Runtime observer contexts now expose
runtimeId,parentRuntimeId, and
runtimeLabelso feature and execution boundaries can be correlated. - Nested execution overlays preserve the complete parent fallback chain.
- Added typed-failure
Effect.retrywithnone, fixed, linear, and
exponential policies, optional full jitter, maximum delays, and
explicit attempt-count semantics. - Each retry attempt owns a child Scope that closes before policy
evaluation or delay; cleanup defects retain Runtime precedence and
prevent a broken typed-failure attempt from retrying. - Added optional
EffectClockandEffectRandomcontracts with host,
seeded, and manual test implementations; no service is installed
implicitly. - Added observable
RetryEventdecisions, deterministic tests, package
and website guides, and a retry benchmark. - Added lazy
Effect.allandEffect.forEachcollection composition with
sequential-by-default and positive bounded concurrency. - Added explicit
Effect.allUnboundedandEffect.forEachUnboundedAPIs so
unbounded fan-out cannot happen through an omitted limit. - Collection results preserve input order and are returned as unmodifiable
Lists, while scheduling remains FIFO. - Typed failure selection is deterministic by lowest started input index; no new
work starts after failure or interruption, and already-started operations
remain physically owned until completion. - Collection defects stay defects, worker resources retain normal Scope cleanup
semantics, and sequential/bounded/unbounded benchmarks are included.
Release notes
Open source →Published on pub.dev: https://pub.dev/packages/better_effect_flutter/versions/0.4.0
-
Added the repository-level normative semantic contract and an independent
cross-package conformance suite for Command authority, one-shot delivery, and
Flutter Runtime ownership alongside the core lifecycle rules. -
Semantic compatibility changes now require the matching conformance scenario,
affected package changelog entries, and a semantic migration ledger entry. -
Added
BetterEffectFeatureScopefor feature-owned child Runtimes with
loading/error/retry startup, nested feature environments, and generation-safe
restart behavior. -
ViewModels and Commands inside a feature automatically bind to the child
environment, while feature disposal never closes the parent Runtime. -
Added
EffectCommandSelectorwith strongly typed state and snapshot selection. -
Added default
==and custom equality strategies for selected values. -
Added
EffectCommandBuilder.buildWhenand matching Consumer support. -
Added read-only
EffectCommandSnapshotupdates for pending, queued, and trigger-pending counts without artificial state revisions. -
Added immutable
CommandPolicy.drop,latest, andqueue
coordination without adding new Command classes. -
Added optional cooperative previous-execution interruption for
CommandPolicy.latest(cancelPrevious: true). -
Added typed-input debounce and throttle triggers driven by the
contextualEffectClockservice. -
Added bounded FIFO queues with explicit reject-newest,
drop-newest, and drop-oldest overflow decisions. -
Policy replacement and rejection use
ExitInterruptedinstead
of inventing domain failures or a new Exit variant. -
Added
EffectCommandPolicyEvent, shared/local policy observers,
EffectCommandPolicyProbe, and deterministic ManualEffectClock
regression coverage. -
Existing
EffectCommandConcurrencycall sites remain source
compatible and translate exactly to the corresponding policies.
Release notes
Open source →Published on pub.dev: https://pub.dev/packages/better_effect_analyzer/versions/0.4.0
- Child Runtime Modules discovered through
Runtime.forkand statically visible
BetterEffectFeatureScopeboundaries are modeled as scoped environments rather
than application roots. - Scoped feature Modules retain local duplicate, compatibility, cycle, and
resource-order validation while requirements supplied by a parent Runtime stay
external to the child graph. - Manual
Runtime.forkvalues now participate in the existing
runtime_started_without_closeownership diagnostic.
Release notes
Open source →- Added the repository-level normative semantic contract and an independent cross-package conformance suite mapping stable lifecycle/outcome rules to executable rule IDs.
- Semantic compatibility changes now require the matching conformance scenario, affected package changelog entries, and a semantic migration ledger entry.
- Added
Runtime.forkfor feature-length child environments with local-first resolution and parent fallback. - Child Module resources survive multiple executions, close exactly once with the child Runtime, and are coordinated before parent resources during parent shutdown.
- Runtime observer contexts now expose
runtimeId,parentRuntimeId, andruntimeLabelso feature and execution boundaries can be correlated. - Nested execution overlays preserve the complete parent fallback chain.
- Added typed-failure
Effect.retrywithnone, fixed, linear, and exponential policies, optional full jitter, maximum delays, and explicit attempt-count semantics. - Each retry attempt owns a child Scope that closes before policy evaluation or delay; cleanup defects retain Runtime precedence and prevent a broken typed-failure attempt from retrying.
- Added optional
EffectClockandEffectRandomcontracts with host, seeded, and manual test implementations; no service is installed implicitly. - Added observable
RetryEventdecisions, deterministic tests, package and website guides, and a retry benchmark. - Added lazy
Effect.allandEffect.forEachcollection composition with sequential-by-default and positive bounded concurrency. - Added explicit
Effect.allUnboundedandEffect.forEachUnboundedAPIs so unbounded fan-out cannot happen through an omitted limit. - Collection results preserve input order and are returned as unmodifiable Lists, while scheduling remains FIFO.
- Typed failure selection is deterministic by lowest started input index; no new work starts after failure or interruption, and already-started operations remain physically owned until completion.
- Collection defects stay defects, worker resources retain normal Scope cleanup semantics, and sequential/bounded/unbounded benchmarks are included.
- Added the repository-level normative semantic contract and an independent
-
0.3.020 Aug 2026Release notes
Open source →better_effect 0.3.0
- Added
Runtime.executeWith,runWith, andrunExitWithfor temporary
execution-scoped Modules. - Execution Modules resolve local providers first and fall back to the root
Runtime without mutating root registrations. - Local constructor injection can combine execution-local and root services,
including typedServiceKeyregistrations. - Execution Module resources share the managed execution Scope and remain owned
until physical completion after timeout or interruption. - Partial local startup failures release previously acquired resources before
publishing an execution defect. - Added the optional
ResolverBackendOverlayFactorycapability for custom
backends;AutoInjectorBackendsupports isolated overlays by default. - Added synchronous, SDK-neutral
RuntimeObservercallbacks for execution,
service resolution, resource acquisition/release, interruption, and cleanup
failures. - Runtime observer failures are isolated and can be reported through a
best-effortRuntimeObserverErrorHandlerwithout changing Effect outcomes. - Execution events now expose labels, physical duration, opaque Scope identity,
logical outcomes, and selected local metadata. - Added
EffectLocal.metadata, typedEffectLocal.bind, andEffect.withLocals
for heterogeneous batch context composition. - Added service resolution paths, execution-scoped Module event propagation,
Flutter Command label verification, observer-ordering tests, and a standalone
no-observer overhead benchmark. - Added
package:better_effect/testing.dartwithTestRuntime, typed Exit
matchers/extractors, deterministic gates and signals, ordered event recording,
Runtime event waits, and active-execution leak assertions. - Added a public
ResolverBackendcompatibility kit covering lifetimes, keys,
constructor resolution, missing/circular dependencies, duplicate and
post-commit registration, startup cleanup, close semantics, overlays, and
optional native disposal probes.
Full changelog: better_effect-v0.2.0...better_effect-v0.3.0
Release notes
Open source →better_effect_flutter 0.3.0
- Added
package:better_effect_flutter/testing.dart, re-exporting the core
testing toolkit with Flutter-specific Command and widget helpers. - Added
EffectCommandProbewaits and history assertions, typed sealed-state
extractors,EffectCommandListenerProbefor one-shot delivery, and
BetterEffectTestAppfor externally owned Runtime widget tests.
Full changelog: better_effect_flutter-v0.2.0...better_effect_flutter-v0.3.0
Release notes
Open source →better_effect_analyzer 0.3.0
- The graph checker now recognizes Modules passed directly to
Runtime.runWith,runExitWith, andexecuteWithas execution overlays. - Execution Modules may declare requirements supplied by the root Runtime while
retaining duplicate, compatibility, cycle, and local resource-order checks. - Added explicit
Module.completeroot discovery while retaining inferred roots
and CLI--moduleselection for existing projects. - Complete-root missing-service diagnostics now point to the composition root and
include the dependency path that reaches the missing service. - Added default lifecycle warnings for locally unowned Runtimes and discarded
EffectExecutionhandles. - Added opt-in lints for unowned Flutter Commands, local Runtime use after close,
and visible application roots not yet marked withModule.complete. - Added safe quick fixes for complete-root migration, observing or returning an
execution Exit, local Runtime try/finally ownership, and local Command
ownership. - The graph CLI now emits the same lifecycle codes and messages as the IDE plugin,
including standard local and file-level suppression support. - Added the immutable, versioned
BetterEffectGraphpublic model with stable
Module, provider, service, dependency, diagnostic, root, lifetime, key, and
source-location projections. - Added graph export in text, JSON, DOT, and Mermaid, plus SARIF diagnostics for
CI code-scanning integrations. - Added
--explain,--why,--unused,--schema-version, and file-output
support to the graph CLI while preserving existing diagnostic output shapes. - Added conservative complete-root reachability queries, deterministic renderers,
embedded Dart APIs, schema negotiation, documentation, and CLI/API tests.
Full changelog: better_effect_analyzer-v0.2.0...better_effect_analyzer-v0.3.0
Release notes
Open source →- Added
Runtime.executeWith,runWith, andrunExitWithfor temporary execution-scoped Modules. - Execution Modules resolve local providers first and fall back to the root Runtime without mutating root registrations.
- Local constructor injection can combine execution-local and root services,
including typed
ServiceKeyregistrations. - Execution Module resources share the managed execution Scope and remain owned until physical completion after timeout or interruption.
- Partial local startup failures release previously acquired resources before publishing an execution defect.
- Added the optional
ResolverBackendOverlayFactorycapability for custom backends;AutoInjectorBackendsupports isolated overlays by default. - Added synchronous, SDK-neutral
RuntimeObservercallbacks for execution, service resolution, resource acquisition/release, interruption, and cleanup failures. - Runtime observer failures are isolated and can be reported through a
best-effort
RuntimeObserverErrorHandlerwithout changing Effect outcomes. - Execution events now expose labels, physical duration, opaque Scope identity, logical outcomes, and selected local metadata.
- Added
EffectLocal.metadata, typedEffectLocal.bind, andEffect.withLocalsfor heterogeneous batch context composition. - Added service resolution paths, execution-scoped Module event propagation, Flutter Command label verification, observer-ordering tests, and a standalone no-observer overhead benchmark.
- Added
package:better_effect/testing.dartwithTestRuntime, typed Exit matchers/extractors, deterministic gates and signals, ordered event recording, Runtime event waits, and active-execution leak assertions. - Added a public
ResolverBackendcompatibility kit covering lifetimes, keys, constructor resolution, missing/circular dependencies, duplicate and post-commit registration, startup cleanup, close semantics, overlays, and optional native disposal probes.
- Added
-
0.1.113 Aug 2026Release notes
Open source →- Expanded the package documentation with complete installation, composition, runtime, resource, testing, and operational guidance.
-
0.1.013 Aug 2026Release notes
Open source →- Initial core implementation.
- Added lazy
Effect<A, E>values backed byresult_dart. - Added contextual service resolution with
use<T>(). - Added automatic typed failure propagation with
use.unwrap,use.result, anduse.fail. - Added
Module,Binding, and anauto_injectorbackend. - Added factory, eager singleton, lazy singleton, instance, keyed, and resource bindings.
- Added runtime and execution scopes with reverse-order asynchronous cleanup.
- Added Effect locals, local service overrides,
Exit, records-basedzip, and core Effect operators.