Skip to content

Releases: uber-go/fx

v1.7.1

Choose a tag to compare

@akshayjshah akshayjshah released this 26 Sep 17:54
6244a3e

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

Choose a tag to compare

@amckinney amckinney released this 17 Aug 01:21

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

Choose a tag to compare

@amckinney amckinney released this 12 Jun 20:12

Added

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

v1.5.0

Choose a tag to compare

@abhinav abhinav released this 14 Apr 17:43

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

Choose a tag to compare

@akshayjshah akshayjshah released this 08 Dec 03:39

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

v1.3.0

Choose a tag to compare

@abhinav abhinav released this 28 Nov 22:50
  • 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

Choose a tag to compare

@HelloGrayson HelloGrayson released this 06 Sep 17:38

Add fx.NopLogger which disables lifecycle output.

v1.1.0

Choose a tag to compare

@glibsm glibsm released this 22 Aug 22:07

Improve readability of start up logging.

v1.0.0

Choose a tag to compare

@HelloGrayson HelloGrayson released this 31 Jul 19:01

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

v1.0.0-rc2 Pre-release
Pre-release

Choose a tag to compare

@HelloGrayson HelloGrayson released this 21 Jul 18:42
  • [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.