-
Notifications
You must be signed in to change notification settings - Fork 4
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 filename regex for pry 0.13.1 #7
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this also work on other versions? I see for example on Ruby 1.0.0 pre?
Thanks for putting in the PR.
0.13.1 is the latest released version of pry, so I assume it'll work on 3.0.0 as well. I downloaded a copy of 3.0.0 to check, but I couldn't manage to get it working properly without conflicting with my already-installed rubies. Based on poking through the pry repo, this change looks to have happened between versions 12 and 13, which was released in March. |
Thanks for the information. The question, and I don't know the answer, is whether it worth the effort to support both syntaxes. After all this is just a regular expression. |
I tried |
I think this can be more generalise, if the version changes, and the regex keep the same, it will go back the the old version regex. Maybe we can assume that the regex isn't going to change in the next 0.13.2? |
That's a good point. I don't think we need to parse, but probably setting the current regex as the default is better. |
Seems reasonable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand correctly either of the two suggestions is fine with me.
We could either change @ line
to (?: @line\\|:)
since here the regexp doesn't get too complicated, or set the regexp based on the tested pry version.
I leave it up to you all to decide which you want to do since, you all will be making the change and will have to live with the result and maintanance.
I'll also note that in some other parts of the realgud code, I had started adding a list of regexps for triggering on since it just got too difficult and ugly to try to capture everything in a single regexp. But here that doesn't seem to be the case in my opinion. But again, you all decide.
Yes change the regex seems most interesting, document the change it's also important. |
tested manually. |
Add a test to test/test-regexp-pry.el, would be nice too 👍 |
Added. The line at the top says "press c-x c-e on the next line to run the tests non-interactively" but when I tried that it complained it couldn't find |
I'm guessing that the first time you ran, GNU Emacs had not loaded Therefore a better comment line would look like:
and indeed you'll see this in other (newer) repos: https://github.com/realgud/realgud-lldb/blob/master/realgud-lldb.el#L36 |
@sdubinsky would you like write access to be able to commit to this project? If so let me know. |
Write access would be nice. I also want to add a -delayed variant to this and maybe the pdb debugger too. |
Invite sent. I don't know what:
means. Which github repositories are we talking about? |
This one, I see it's already in pdb. What I mean is something like in trepan2: https://github.com/realgud/realgud/blob/master/realgud/debugger/trepan2/trepan2.el#L79 |
Fix for issue #6.