Skip to content

Releases: uber-go/fx

v1.21.1

24 Apr 15:40
0db209f
Compare
Choose a tag to compare

Changed

  • Register Fx provides (e.g. fx.Lifecycle, fx.Shutdowner, fx.DotGraph) before
    user provides, to increase likelihood of successful custom logger creation.

v1.21.0

13 Mar 15:19
7940a27
Compare
Choose a tag to compare

Added

  • fxtest: Add WithTestLogger option that uses a testing.TB as the
    Fx event logger.
  • An fxevent logger that can log events using a slog logger has been added.

Changed

  • Upgrade Dig dependency to v1.17.1

Thanks to @robbert229 for their contribution to the release.

v1.20.1

17 Oct 23:18
9636854
Compare
Choose a tag to compare

Added

  • Provided, Decorated, Supplied, and Replaced events now include a trace
    of module locations through which the option was given to the App.
  • wasi support.

v1.20.0

12 Jun 17:34
1320bc6
Compare
Choose a tag to compare

Added

  • A new event fxevent.Run is now emitted when Fx runs a constructor, decorator,
    or supply/replace stub.

Changed

  • fx.Populate now works with fx.Annotate.
  • Upgrade Dig dependency to v1.17.0.

v1.19.3

08 May 17:37
2fec0b8
Compare
Choose a tag to compare

Changed

  • Fixed several typos in docs.
  • WASM build support.
  • Annotating In and Out structs with From/As annotations generated invalid results.
    The annotation check now blocks this.
  • Shutdown: Support calling from Invoke.

Deprecated

  • Deprecate ShutdownTimeout option.

Fixed

  • Respect Shutdowner ExitCode from calling Run.

v1.19.2

21 Feb 17:41
Compare
Choose a tag to compare

Changed

  • Upgrade Dig dependency to v1.16.1.

v1.19.1

11 Jan 18:43
d9d9838
Compare
Choose a tag to compare

Changed

  • Calling fx.Stop() after the App has already stopped no longer errors out.

Fixed

  • Addressed a regression in 1.19.0 release which caused apps to ignore OS signals
    after running for startTimeout duration.

v1.19.0

04 Jan 19:01
887c07c
Compare
Choose a tag to compare

Added

  • fx.RecoverFromPanics Option which allows Fx to recover from user-provided constructors
    and invoked functions.
  • fx.Private that allows the constructor to limit the scope of its outputs to the wrapping
    fx.Module.
  • ExitCode ShutdownOption which allows setting custom exit code at the end of app
    lifecycle.
  • Wait which returns a channel that can be used for waiting on application shutdown.
  • fxevent/ZapLogger now exposes UseLogLevel and UseErrorLevel methods to set
    the level of the Zap logs produced by it.
  • Add lifecycle hook-convertible methods: StartHook, StopHook, StartStopHook
    that can be used with more function signatures.

Changed

  • fx.WithLogger can now be passed at fx.Module level, setting custom logger at
    Module scope instead of the whole App.

Fixed

  • fx.OnStart and fx.OnStop Annotations now work with annotated types that was
    provided by the annotated constructor.
  • fxevent/ZapLogger: Errors from fx.Supply are now logged at Error level, not
    Info.
  • A race condition in lifecycle Start/Stop methods.
  • Typos in docs.

v1.18.2

28 Sep 19:21
2f5adb6
Compare
Choose a tag to compare

Added

  • Clarify ordering of Invokes in Modules.

Fixed

  • Fix Decorate not being applied to transitive dependencies at root App level.

v1.18.1

08 Aug 18:27
b220b95
Compare
Choose a tag to compare

Fixed

  • Fix a nil panic when nil is passed to OnStart and OnStop lifecycle methods.