Skip to content
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

IRB crash #104

Closed
vladimirtemnikov opened this issue Nov 21, 2022 · 12 comments · Fixed by #105
Closed

IRB crash #104

vladimirtemnikov opened this issue Nov 21, 2022 · 12 comments · Fixed by #105
Labels

Comments

@vladimirtemnikov
Copy link

Describe the bug

Hello.
Using dry-logic 1.4.0, irb 1.5.0.

As I mentioned in ruby/irb#455, a session crashes if irb's autocomplete feature is enabled.

To Reproduce

Type AnyClass.new. in console.
Other details in irb issue link.

Expected behavior

No session crash.

@solnic
Copy link
Member

solnic commented Nov 21, 2022

This is because of #73 that will be addressed in dry-logic 2.0

@solnic
Copy link
Member

solnic commented Nov 21, 2022

Also see #99 - if there's anything we can do to workaround this for the time being, I'm more than happy to do it

@vladimirtemnikov
Copy link
Author

@solnic Thank you for response!
I'm not sure, as I see current implementation does not allow to get rid of respond_to?, so may be this could be fixed on irb side, or just wait for dry-logic 2.0 🤔

@solnic
Copy link
Member

solnic commented Nov 21, 2022

@vladimirtemnikov yeah this is unfortunate. In other places people worked around it by just checking arity of the respond_to? 😓 I'll be working on dry-logic/schema/validation 2.0.0 shortly after we are done with the release of Hanami 2.0 (which will happen tomorrow).

@vladimirtemnikov
Copy link
Author

@solnic sounds great, I guess this conflict could wait a bit then.
Thanks for you work! 🚀

@solnic
Copy link
Member

solnic commented Nov 21, 2022

@vladimirtemnikov I just realized we can simply do this #105

@vladimirtemnikov
Copy link
Author

vladimirtemnikov commented Nov 21, 2022

@solnic elegant solution! ❤️ Didn't even think about this.

@kris
Copy link

kris commented Nov 22, 2022

@solnic did you have a target release date for 2.0?

@solnic
Copy link
Member

solnic commented Nov 22, 2022

@kris 2023 Q1

solnic added a commit that referenced this issue Nov 23, 2022
@solnic solnic closed this as completed in 947d02a Nov 23, 2022
@solnic
Copy link
Member

solnic commented Nov 24, 2022

This should work with dry-logic 1.5.0 now 🙂

@vladimirtemnikov
Copy link
Author

@solnic Awesome!
Thank you so much again ❤️

maxjacobson added a commit to maxjacobson/seasoning that referenced this issue Jan 7, 2023
I'm hitting this issue dry-rb/dry-logic#104
maxjacobson added a commit to maxjacobson/seasoning that referenced this issue Jan 7, 2023
mattgibson pushed a commit to mindfulchefuk/dry-logic that referenced this issue May 11, 2023
@benjaminoakes
Copy link

Can this be backported to any older versions of dry-logic? It would be helpful to have this fix on dry-logic 1.3.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants