Closed alo-zi closed 3 years ago
Please provide a self-contained reproduction. From your code, it's not clear where the issue is. Likely, it's not a problem with dry-auto_inject given it's tested and being used with ruby 3.0.
Specifically, this code doesn't use dry-auto_inject:
def get_data
list_result.new(status_message: '', data: [], meta: {})
end
list_result
is set by dry_auto_inject in the constructor but by the time get_data
it's already finished. ListResult
itself doesn't use DI.
@flash-gordon got it, It's confirmed not DI issue, I will try to figure out about it. Thanks for your response. 🥂
Describe the bug
I have been using
dry-container
&dry-auto_inject
since use ruby 2.3, everything works well until ruby 2.7, when I try upgrade to ruby 3.0 I'm getting anArgumentError
missing keywords.To Reproduce
Ruby <= 2.7 & Rails <= 6.1.x ✅ Ruby 3.0.1 & Rails 6.1.x ❌
try to Register
Try inject to the service
Expected behavior
Manual call without DI
My environment