Releases: theplant/inject
v1.2.2
v1.2.1
v1.2.0
v1.1.2
What's Changed
- resolve security issues by @dorothyyzh in #8
- Add Readiness and Slice support by @molon in #9
New Contributors
- @dorothyyzh made their first contribution in #8
Full Changelog: v1.1.1...v1.1.2
v1.1.1
v1.1.0
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
v1.0.1
v1.0.0
v0.0.2
Full Changelog: v0.0.1...v0.0.2