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

Fix rdebug recursion alt solution #1204

Closed
wants to merge 3 commits into from
Closed

Fix rdebug recursion alt solution #1204

wants to merge 3 commits into from

Conversation

native-api
Copy link

Description

An alternative solution to #1203

May break something due to submodules being loaded early.

Todos

List any remaining work that needs to be done, i.e:

  • Tests

When running with `ruby -rdebug` with a breakpoint set, `self.to_str` (which is not defined) is called repeatedly during module load, including the time after the `class << self` block is loaded but before further blocks that add more bits to `self` are.
As such, the dynamic method resolution machinery has to not break in this partially initialized state.
May break something due to submodules being loaded early
@iMacTia
Copy link
Member

iMacTia commented Nov 12, 2020

Thank you @native-api 🙏 (especially for being patient with me 😄!)
I think this is a great starting point, and that we're highlighting a few legacy issues Faraday have been dragging due to the fact it was written first more than 10 years ago!
I've given a quick refresh to the version and the methods constants definitions and pushed a new PR (#1205).

I was unable though to understand how to test that with ruby-debug, to be entirely honest I've not been using it before in favour of bye bug or pry instead (or Rubymine debugger).
Would you be able to give it a try (and share with me how you did it) and let me know if the original issue is now solved?

@iMacTia
Copy link
Member

iMacTia commented Nov 13, 2020

Fixed in #1205 🎉
Thanks again @native-api for all the research 🙏

@iMacTia iMacTia closed this Nov 13, 2020
@native-api native-api deleted the fix_rdebug_recursion_alt branch November 30, 2020 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants