Skip to content

Releases: uber-go/dig

v1.14.0

28 Feb 20:12
879a6f8
Compare
Choose a tag to compare

Added

  • Introduce dig.Scope which creates a scoped dependency injection
    container to scope dependencies.
  • Introduce Scope.Decorate and Container.Decorate which allows a
    decorator to modify a dependency already provided in the dependency graph.
  • Add FillDecorateInfo Option and DecorateInfo struct which exposes
    information on what Dig was able to understand from the decorator provided
    with Scope.Decorate or Container.Decorate.

Changed

  • The error message that appears when a cycle is detected in the dependency graph
    has been changed slightly.

Fixed

  • A stack overflow bug that happens when cycles are introduced via self-pointing
    dependencies with DeferAcyclicVerification.

v1.13.0

21 Sep 22:47
a3603d5
Compare
Choose a tag to compare

Added

  • Introduce As option which supports providing a type as interface(s)
    it implements to the container.
  • Add LocationForPC option which overrides the function inspection
    for a program counter address to a provided function info.

v1.12.0

04 Aug 23:58
54d6461
Compare
Choose a tag to compare

Added

  • Support for ProvideInfo and FillProvideInfo that allow the caller of
    Provide to get info about what dig understood from the constructor.

v1.11.0

09 Jun 21:08
7673eb2
Compare
Choose a tag to compare

Added

  • Support unexported fields on dig.In structs with the
    ignore-unexported:"true struct tag.

v1.10.0

16 Jun 22:49
627535a
Compare
Choose a tag to compare

Added

  • Introduce DryRun Option which, when set to true, disables invocation
    of functions supplied to Provide and Invoke. This option will be
    used to build no-op containers, for example for fx.ValidateApp method.

v1.9.0

06 Apr 21:42
781ef04
Compare
Choose a tag to compare

Added

  • GraphViz visualization of the graph now includes names of packages next to
    constructors.
  • Added a flatten modifier to group tags for slices to allow providing
    individual elements instead of the slice for a group value. See package
    doucmentation for more information.

Changed

  • Drop library dependency on golang.org/x/lint.
  • Support printing multi-line error messages with %+v.

v1.8.0

14 Nov 21:59
be30405
Compare
Choose a tag to compare

Changed

  • Migrated to Go modules.

v1.7.0

04 Jan 17:50
Compare
Choose a tag to compare

Added

  • Added Group option for Provide to add value groups to the container without
    rewriting constructors. See package doucmentation for more information.

v1.6.0

06 Nov 19:13
12c8ada
Compare
Choose a tag to compare

Changed

  • When an error graph is visualized, the graph is pruned so that the graph only
    contains failure nodes.
  • Container visualization is now oriented from right to left.

v1.5.1

01 Nov 20:08
bc5e6a1
Compare
Choose a tag to compare

Fixed

  • Fixed a test that was causing Dig to be unusable with Go Modules.