v1.0.0-rc2
Pre-release
Pre-release
HelloGrayson
released this
21 Jul 18:42
·
434 commits
to master
since this release
- [Breaking] Lifecycle hooks now take a context.
- Add
fx.In
andfx.Out
which exposes optional and named types.
Modules should embed these types instead of relying ondig.In
anddig.Out
. - Add an
Err
method to retrieve the underlying errors during the dependency
graph construction. The same error is also returned fromStart
. - Graph resolution now happens as part of
fx.New
, rather than at the beginning
ofapp.Start
. This allows inspection of the graph errors throughapp.Err()
before the decision to start the app. - Add a
Logger
option, which allows users to send Fx's logs to different
sink. - Add
fxtest.App
, which redirects log output to the user'stesting.TB
and
provides some lifecycle helpers.