Skip to content

Allow defs/refs for synthesized declarations? #111

Open
@varungandhi-src

Description

@varungandhi-src

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...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions