-
Notifications
You must be signed in to change notification settings - Fork 234
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
Locate doc improvements #1562
base: main
Are you sure you want to change the base?
Locate doc improvements #1562
Conversation
The PR mixes bug fixes and refactoring, it is probably best to review commit by commit. |
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.
The 1st commit seems weird to me.
I wouldn't expect env_of_only_summary
to fail (could there be a version mismatch between merlin and ocaml… that is somehow not caught when checking magic numbers?).
But if it does, I don't think silently ignoring the error and falling back to a degraded behavior is the right way to go about it.
I'd rather give a proper error the user (potentially while still trying to produce a "best effort" answer at the same time).
The next two commits LGTM. (The changelog will have to wait until the dust settles on this PR).
This fixes #1561.
Before iterating on a cmt's Typedtree we tried to rebuild the environment from the summary.
In the case of Melange this fails with the error:
Cannot find module Bs_stdlib_mini
In am not sure of the source of that error (maybe a missing installation artifact ?).
Ignoring it still enable Merlin to find the doc in the typedtree in the present case and if not the code would fallback to the old method of getting the comments (by using the comments list in the cmt).
I took this opportunity to start doing some refactoring in the last commit.