fx v1.18.1 Release Notes
Release Date: 2022-08-08 // over 1 year ago-
๐ Fixed
- ๐ Fix a nil panic when
nil
is passed toOnStart
andOnStop
lifecycle methods.
- ๐ Fix a nil panic when
Previous changes from v1.18.0
-
โ Added
- Soft value groups that lets you specify value groups as best-effort dependencies.
fx.OnStart
andfx.OnStop
annotations which lets you annotate dependencies to provide OnStart and OnStop lifecycle hooks.- A new
fxevent.Replaced
event written tofxevent.Logger
following anfx.Replace
.
๐ Fixed
- โฌ๏ธ Upgrade Dig dependency to v1.14.1 to address a couple of issues with decorations. Refer to Dig v1.14.1 release notes for more details.
fx.WithLogger
no longer ignores decorations and replacements of types that it depends on.- Don't run lifecycle hooks if the context for them has already expired.
App.Start
andApp.Stop
no longer deadlock if the OnStart/OnStop hook exits the current goroutine.fxevent.ConsoleLogger
no longer emits an extraneous argument for the Supplied event.
๐ Deprecated
fx.Extract
in favor offx.Populate
.