dig v1.14.1 Release Notes

Release Date: 2022-03-22 // about 2 years ago
  • ๐Ÿ›  Fixed

    • ๐Ÿ›  Fix an issue where a dependency for a decoration supplied by another decorator in the same scope is ignored.
    • ๐Ÿ›  Fix a panic when submitting a single value as a value group in Scope.Decorate.
    • Upon a provide error, make the error message contain the function named specified by LocationForPC Option.

Previous changes from v1.14.0

  • โž• 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.