merlin
merlin copied to clipboard
Locate doc improvements
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.
The PR mixes bug fixes and refactoring, it is probably best to review commit by commit.