Skip to content

Releases: theplant/inject

v1.2.2

03 Jan 00:49
b3b3929

Choose a tag to compare

What's Changed

  • Add actor stage support and sorting to lifecycle by @molon in #14

Full Changelog: v1.2.1...v1.2.2

v1.2.1

02 Jan 19:09
b3f77d0

Choose a tag to compare

What's Changed

  • lifecycle: Add Done() check to prevent Start() hanging on Serve failures by @molon in #12

Full Changelog: v1.2.0...v1.2.1

v1.2.0

01 Jan 17:54
baef9a6

Choose a tag to compare

What's Changed

  • Add support for void constructors with Void type by @molon in #11

Full Changelog: v1.1.2...v1.2.0

v1.1.2

01 Jan 10:46
3a10bfd

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.1.1...v1.1.2

v1.1.1

15 Nov 09:01
fa3f394

Choose a tag to compare

What's Changed

  • fix: avoid duplicate types in dependency path across parent injectors by @molon in #7

Full Changelog: v1.1.0...v1.1.1

v1.1.0

30 Sep 20:00
074eb05

Choose a tag to compare

What's Changed

Introduces improvements to dependency resolution error reporting in the inject package and refactors lifecycle management code. The most significant change is the addition of detailed dependency path tracking, which makes debugging missing dependencies much easier. It also removes the WithSkipErrTypeNotProvided context flag and its associated tests, simplifying the handling of optional dependencies. In the lifecycle package, common logic for collecting services is extracted, and error handling is made more consistent.

Dependency injection improvements:

Added tracking of the full dependency path during resolution, so errors for missing types now include the entire chain of dependencies, making it easier to diagnose where resolution failed (inject.go, inject_test.go). [1] [2] [3] [4]
Removed the WithSkipErrTypeNotProvided context flag and all related logic and tests, simplifying the code and making optional dependencies rely solely on the optional inject tag (inject.go, inject_test.go). [1] [2] [3] [4] [5]
Lifecycle management refactoring:

Extracted a collectServices helper to reduce code duplication when gathering services from actors and to ensure consistent error handling when no services are present (lifecycle/lifecycle.go). [1] [2]
Improved error wrapping and logging in lifecycle startup and serving, and changed logging fields for better clarity (lifecycle/lifecycle.go). [1] [2]
Test code updates:

Updated lifecycle tests to use the new actor addition pattern after removing the Add and LazyAdd helpers (lifecycle/lifecycle_test.go). [1] [2]

Full Changelog: v1.0.2...v1.1.0

v1.0.2

01 Sep 02:47
1ed2299

Choose a tag to compare

What's Changed

  • Add RequiresStop interface and improve actor cleanup by @molon in #5

Full Changelog: v1.0.1...v1.0.2

v1.0.1

31 Aug 18:02
ebbf9e2

Choose a tag to compare

What's Changed

  • Sort providers by registration sequence in BuildContext by @molon in #4

Full Changelog: v1.0.0...v1.0.1

v1.0.0

22 Aug 20:21

Choose a tag to compare

What's Changed

  • lifecycle support by @molon in #1
  • Embed FuncService for Lifecycle by @molon in #2
  • refactor: use context.Context instead of inject.Context && refactor lifecycle timeouts and error handling by @molon in #3

Full Changelog: v0.0.2...v1.0.0

v0.0.2

08 Jan 12:11

Choose a tag to compare

Full Changelog: v0.0.1...v0.0.2