Skip to content

Releases: uber-go/fx

v1.14.0

12 Aug 21:49
af8dcf3
Compare
Choose a tag to compare

Added

  • Introduce the new fx.WithLogger option. Provide a constructor for
    fxevent.Logger objects with it to customize how Fx logs events.
  • Add new fxevent package that exposes events from Fx in a structured way.
    Use this to write custom logger implementations for use with the
    fx.WithLogger option.
  • Expose and log additional information when lifecycle hooks time out.

Changed

  • Fx now emits structured JSON logs by default. These may be parsed and
    processed by log ingestion systems.
  • fxtest.Lifecycle now logs to the provided testing.TB instead of stderr.
  • fx.In and fx.Out are now type aliases instead of structs.

v1.13.1

19 Aug 23:07
59a1838
Compare
Choose a tag to compare

Fixed

  • Fix minimum version constraint for dig. fx.ValidateGraph requires at least
    dig 1.10.

v1.13.0

16 Jun 23:00
Compare
Choose a tag to compare

Added

  • Added fx.ValidateGraph which allows graph cycle validation and dependency correctness
    without running anything. This is useful if fx.Invoke has side effects, does I/O, etc.

v1.12.0

09 Apr 22:21
Compare
Choose a tag to compare

Added

  • Added fx.Supply to provide externally created values to Fx containers
    without building anonymous constructors.

Changed

  • Drop library dependency on development tools.

v1.11.0

01 Apr 20:11
bf89f9c
Compare
Choose a tag to compare

Added

  • Value groups can use the flatten option to indicate values in a slice should
    be provided individually rather than providing the slice itself. See package
    documentation for details.

v1.10.0

20 Nov 19:59
ad2e5fa
Compare
Choose a tag to compare

Added

  • All fx.Options now include readable string representations.
  • Report stack traces when fx.Provide and fx.Invoke calls fail. This
    should make these errors more debuggable.

Changed

  • Migrated to Go modules.

v1.9.0

22 Jan 18:50
3de044d
Compare
Choose a tag to compare

Added

  • Add the ability to shutdown Fx applications from inside the container. See
    the Shutdowner documentation for details.
  • Add fx.Annotated to allow users to provide named values without creating a
    new constructor.

v1.8.0

06 Nov 19:07
@zmt zmt
9c82e1d
Compare
Choose a tag to compare

Added

  • Provide DOT graph of dependencies in the container.

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.