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

Allow defs/refs for synthesized declarations? #111

Open
varungandhi-src opened this issue Sep 16, 2022 · 0 comments
Open

Allow defs/refs for synthesized declarations? #111

varungandhi-src opened this issue Sep 16, 2022 · 0 comments

Comments

@varungandhi-src
Copy link
Contributor

Right now, we skip synthesized methods with the reasoning that you can end up with a bunch of occurrences at the same location which aren't useful. However, I think I implemented that before occurrence uniquing (maybe? too lazy to check). With occurrence uniquing, the payload size won't increase much. However, skipping synthesized declarations is somewhat problematic.

Consider code using attr_accessor. This will expose a method to write to a field. However, if you do find refs on the field inside the class, because the synthesized my_field= method was skipped, you may not notice that there may be code outside the class which may be modifying that field.

With occurrence uniquing, one thing we could maybe allowlist (e.g. ones generated by certain known patterns) or denylist (e.g. static-init) certain classes of synthesized methods. Right now, I'm leaning towards denylist because there's probably fewer to address that way...

@varungandhi-src varungandhi-src added the enhancement New feature or request label Sep 16, 2022
@mmanela mmanela added the Migrated label May 6, 2024 — with Linear
@linear linear bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants