-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support keyword arguments for functions. #8
base: main
Are you sure you want to change the base?
Conversation
I presume it’s something that was refactored out of dry-core?
Now that keyword arguments are no longer implicitly translated into hashes, we need to explicitly handle them as a separate argument type. This commit may not cover all cases (either from a code or spec perspective), but hopefully it’s at least a useful start.
This means the kwargs are always present in the AST, thus updating all the expected responses.
I’m presuming this was committed accidentally 😅
… and now that I removed the I might set this aside for now, rather than muddling my way through the failing tests. Hopefully what's here is useful, but for now I think I'm going to change my functions to avoid keyword arguments. |
Thanks. It's best to hold off with this. I think it would be good to revisit the implementation of this gem in general, given how many things changed in Ruby since transproc was born (which is now dry-transformer). |
got exactly the same problem when moving a running project from 2.7.x to 3.1. My solution was vastly simple (naive). i.e adding a
worked for a simple But then discovered this more extensive and nicer version. Is there is plans to revisit this and perhaps drop support for pre 2.7 on a recent version ? This gem is nice and perhaps need a bit of love ;-) |
Ah, I'm having the same issue using |
Another Ruby 3 related patch: now that keyword arguments are no longer implicitly translated into hashes, we need to explicitly handle them as a separate argument type.
And I must be clear: I don't have a deep understanding of this gem, so I feel like the specs and code are quite possibly incomplete. Hopefully they're at least useful as a starting point. 😅