Comments (6)
Hi!
I looked into this case and it seems that it's because exifr overrides Class#instance_methods to include additional entries in the return of instance_methods but didn't include that in instance_method.
That sounds like a bug: it violates the contract of those methods, seems like. Have you tried reporting it?
My proposed solution to this is to rescue NameError for the candidates mod.instance_method(sym).
I'm not sure it's the right approach: if the methods we call are allowed to do whatever (and essentially, they do), then rescuing NameError may not be enough as well. instance_method
may raise a different error, or instance_methods
may start raising errors or return unexpected values.
Maybe that calls for a circumvention of said override, like we do for a few methods already: 9a33e54
But I still have a question about why EXIFR::JPEG is scanned when scanning candidates for an instance of a totally unrelated class.
Because Robe performs almost no type inference, and when it does not know the type, it scans all classes and modules. It's explained in README.md
.
from robe.
Hi Dmitry, thanks for the prompt reply! I agree that this is a bug in that gem. I'll report it to them.
I'm not sure if my approach is the right one. But I think that rope shouldn't be broken when scanning a gem with bug. Using begin ... rescue ... end
is one way to protect rope from being affected. There might be better ways to do it of course. I'm not familiar enough with robe's code. Do you have better ways to make it more robust?
from robe.
I'll report it to them.
Let me know how it goes.
There might be better ways to do it of course. I'm not familiar enough with robe's code.
Have you looked at the linked commit?
from robe.
I have same issue on EXIFR::JPEG
from robe.
Ok, let's try the workaround.
from robe.
Now works well, thanks!!!
from robe.
Related Issues (20)
- Robe not working on Ruby 2.7.1 HOT 3
- robe make emacs freeze on 27 on large projects HOT 16
- Non-string path in LOAD_PATH HOT 3
- Emacs freezes when robe is called while byebug is active on console HOT 3
- How to disable robe? HOT 2
- Get search failed message when run robe-jump. HOT 19
- `Can't find the location` when try to search a class defined on current project. (but can in irb) HOT 6
- `find-tag-marker-ring` breaks `robe-jump` on Emacs 28. HOT 2
- Environment variables HOT 1
- Can't jump to the nested module's class in `enh-ruby-mode`, but ruby-mode works HOT 29
- robe-jump returns error file doesnt exists - but it exists HOT 11
- [Help Request] Not robe issue, just need some professional help on crystal-mode. HOT 10
- CPU spikes during rails process buffer completion HOT 7
- Allow for configurable specificity of `robe-jump` entries HOT 9
- Should be possible to change Robe errors buffer from inf-ruby buffer to another buffer HOT 2
- `robe-completing-read` for `Module: ` is excessively interrupting HOT 20
- `*robe-doc*`: optionally show the method source directly HOT 3
- Consider RBS (when available) for local type inference
- robe hangs Emacs HOT 16
- `robe-start` hangs HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from robe.