-
Notifications
You must be signed in to change notification settings - Fork 233
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
Refactor Type_enclosing
and make use of Context
information
#1108
Conversation
Actually, can we split this PR in two? Thanks! |
401f6ce
to
8cf429f
Compare
532c606
to
eeb87c2
Compare
Status of this PRIt is still partial, and when context information is not satisfying it fallback to the old behaviour: try to type in the various namespaces until success. Tests need to be more exhaustive but I believe it should give identical or better results than master. For example it does fix #1104 The weird transition from 405 to 406As we discussed with @trefis and @let-def, something happened between these two versions. Todo
|
64da4fd
to
766423a
Compare
What changed since last comment:
|
dfc590f
to
1305f48
Compare
@trefis do you think this is ready for merging ? It opens the door to more work, but this can be the subject of other PR's:
These are not regressions but already present issues. |
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.
One last request before this can be merged: there seems to be a lot of whitespace changes in areas of the code / comments that you otherwise do not touch.
Could these be reverted?
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.
Will merge once CI comes back green.
CHANGES: Tue Jun 9 15:13:42 CET 2020 + ocaml support - alerts are no-more ignored and are reported as warnings (ocaml/merlin#1138) + merlin binary - fix completion of names containing `-` (ocaml/merlin#1142) - fix several type-enclosing bugs by performing context-analysis (ocaml/merlin#1108) - lsp: add deprecation flag to outline items (ocaml/merlin#1087) - lsp: add go-to typedef (`Locate_type`) (ocaml/merlin#1067)
This PR:
Context
fromanalysis/locate.ml
Type_enclosing
logic fromquery_commands.ml
Context
provide richer infosType_enclosing
This fixes the bug highlighted in #1104
Should also fix #864