Skip to content

Releases: uber-go/fx

v1.7.1

26 Sep 17:54
6244a3e
Compare
Choose a tag to compare

Fixed

  • Make fxtest.New ensure that the app was created successfully. Previously,
    it would return the app (similar to fx.New, which expects the user to verify
    the error).
  • Update dig container to defer acyclic validation until after Invoke. Application
    startup time should improve proportional to the size of the dependency graph.
  • Fix a goroutine leak in fxtest.Lifecycle.

v1.7.0

17 Aug 01:21
Compare
Choose a tag to compare

Added

  • Add fx.ErrorHook option to allow users to provide ErrorHandlers on invoke
    failures.
  • VisualizeError returns the visualization wrapped in the error if available.

v1.6.0

12 Jun 20:12
Compare
Choose a tag to compare

Added

  • Add fx.Error option to short-circuit application startup.

v1.5.0

14 Apr 17:43
Compare
Choose a tag to compare

Added

  • Add fx.StartTimeout and fx.StopTimeout to make configuring application
    start and stop timeouts easier.
  • Export the default start and stop timeout as fx.DefaultTimeout.

Fixed

  • Make fxtest respect the application's start and stop timeouts.

v1.4.0

08 Dec 03:39
Compare
Choose a tag to compare

Add fx.Populate to populate variables with values from the dependency injection container without requiring intermediate structs.

v1.3.0

28 Nov 22:50
Compare
Choose a tag to compare
  • Improve readability of hook logging in addition to provide and invoke.
  • Fix bug which caused the OnStop for a lifecycle hook to be called even if it
    failed to start.

v1.2.0

06 Sep 17:38
Compare
Choose a tag to compare

Add fx.NopLogger which disables lifecycle output.

v1.1.0

22 Aug 22:07
Compare
Choose a tag to compare

Improve readability of start up logging.

v1.0.0

31 Jul 19:01
Compare
Choose a tag to compare

First stable release: no breaking changes will be made in the 1.x series.

  • [Breaking] Rename fx.Inject to fx.Extract.
  • [Breaking] Rename fxtest.Must* to fxtest.Require*.
  • [Breaking] Remove fx.Timeout and fx.DefaultTimeout.
  • fx.Extract now supports fx.In tags on target structs.

v1.0.0-rc2

21 Jul 18:42
Compare
Choose a tag to compare
v1.0.0-rc2 Pre-release
Pre-release
  • [Breaking] Lifecycle hooks now take a context.
  • Add fx.In and fx.Out which exposes optional and named types.
    Modules should embed these types instead of relying on dig.In and dig.Out.
  • Add an Err method to retrieve the underlying errors during the dependency
    graph construction. The same error is also returned from Start.
  • Graph resolution now happens as part of fx.New, rather than at the beginning
    of app.Start. This allows inspection of the graph errors through app.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's testing.TB and
    provides some lifecycle helpers.