Skip to content

Releases: theplant/inject

v1.2.3

Choose a tag to compare

@dorothyyzh dorothyyzh released this 08 Jul 06:40
1080aa5

What's Changed

  • upgrade go version by @dorothyyzh in #15
  • [Aikido] AI Fix for actions/checkout may expose GITHUB_TOKEN via git config by @aikido-autofix[bot] in #16
  • fix(lifecycle): treat cancellation during actor startup as graceful shutdown by @dorothyyzh in #17

New Contributors

  • @aikido-autofix[bot] made their first contribution in #16

Full Changelog: v1.2.2...v1.2.3

v1.2.2

Choose a tag to compare

@molon molon released this 03 Jan 00:49
b3b3929

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

Choose a tag to compare

@molon molon released this 02 Jan 19:09
b3f77d0

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

Choose a tag to compare

@molon molon released this 01 Jan 17:54
baef9a6

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

Choose a tag to compare

@molon molon released this 01 Jan 10:46
3a10bfd

What's Changed

New Contributors

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

v1.1.1

Choose a tag to compare

@molon molon released this 15 Nov 09:01
fa3f394

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

Choose a tag to compare

@molon molon released this 30 Sep 20:00
074eb05

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

Choose a tag to compare

@molon molon released this 01 Sep 02:47
1ed2299

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

Choose a tag to compare

@molon molon released this 31 Aug 18:02
ebbf9e2

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

Choose a tag to compare

@molon molon released this 22 Aug 20:21

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