-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
[Feature] add nodes corresponding to imports #111
Comments
It makes sense, but I'm not sure it would give better results overall. In particular, we would loose
the perfectly located changes of types/targets.
Maybe we can implement this as an option?
|
This feature is particularly needed in coming/repairability-mode project. |
Hi @khaes-kth
Do you mean that there are repair tools from the Repairability mode that classify that commit as a patch synthesized by them? if it's the case, we would need to refine the existing repair tools, because that is a transformation that repair tools do not carry out. |
Yes. For example, the mentioned commit is considered to be an instance of Elixir:update_typre_ref. |
Do you have a case that the current implementation is not able to detect? |
I think if an import command is included in the original (old) version, the imported class can be counted as an accessible repair ingredient in some cases (Can't they?). For example, suppose that in this commit in the new version (I hope my description is understandable!) |
Proposition of feature (easy to implement).
As we don't have nodes for
imports
we can have an option to create them.I imagine that It's quite easy to do it: navigate all the TypeReference and create for each of them a new node of type import and as value the Qualified of each TypeReference. (All these new node will we wild of a new Node called
imports
).The goal of this feature is to remove the Qualified name from the nodes corresponding to TypeReference and replace it by the SimpleName.
Thus, combining the mentioned changes we will able to correctly detect renames of packages (changes in imports) and (most importantly) avoiding Updates of TypeReference nodes which are children of, for instance, Variables.
WDYT? It makes sense to implement all the mentioned changes?
The text was updated successfully, but these errors were encountered: