Handle object expression inside a let in outline#1936
Conversation
xvw
left a comment
There was a problem hiding this comment.
For me, the fix is not ugly! Good job!
There was a problem hiding this comment.
Thanks a lot @Tim-ats-d !
I suspected that you could have a simpler implementation by relying more on the flat structure of the browse tree but I had to play with the code to find it, so i decided to directly push the change to your branch 🙈. Please have a look, it does remove quite a lot of the ad-hoc treatments:
Apart from that, could you make the changelog entry more complete ? There is a "major' change in behavior here since before that patch Merlin outline's did not account for locally defined value, unlike ocaml-lsp. It seems reasonable to have them, but this should be made clear to users.
0db503f to
9c2c72d
Compare
I have also edited the change entry. |
voodoos
left a comment
There was a problem hiding this comment.
Thanks Tim, I pushed a commit with slightly more code reuse, and there might be some more remaining :-)
But this is probably good to go like that.
CHANGES:
Mon Jun 23 10:10:42 CEST 2024
+ merlin library
- Expose utilities to manipulate typed-holes in `Merlin_analysis.Typed_hole`
(ocaml/merlin#1888)
- `inlay-hints` fix inlay hints on function parameters (ocaml/merlin#1923)
- Handle class type in outline (ocaml/merlin#1932)
- Handle locally defined value in outline (ocaml/merlin#1936)
+ vim plugin
- Added support for search-by-type (ocaml/merlin#1846)
This is exposed through the existing `:MerlinSearch` command, that
switches between search-by-type and polarity search depending on the
first character of the query.
CHANGES:
Tue Jun 24 16:10:42 CEST 2025
+ merlin library
- Expose utilities to manipulate typed-holes in `Merlin_analysis.Typed_hole`
(ocaml/merlin#1888)
- `locate` can now disambiguate between files with identical names and contents
(ocaml/merlin#1882)
- `occurrences` now reports stale files (ocaml/merlin#1885)
- `inlay-hints` fix inlay hints on function parameters (ocaml/merlin#1923)
- Fix issues with ident validation and Lid comparison for occurrences (ocaml/merlin#1924)
- Handle class type in outline (ocaml/merlin#1932)
- Handle locally defined value in outline (ocaml/merlin#1936)
- Fix a typer issue triggering assertions in the short-paths graph (ocaml/merlin#1935,
fixes ocaml/merlin#1913)
- Downstreamed a typer fix from 5.3.X that would trigger assertions linked
to scopes bit masks when backtracking the typer cache (ocaml/merlin#1935)
- Add a new selection field to outline results that contains the location of
the symbol itself. (ocaml/merlin#1942)
- Fix destruct hanging when printing patterns with (::). (ocaml/merlin#1944, fixes
ocaml/ocaml-lsp#1489)
- Reproduce and fix a handful of jump-to-definition (locate) issues (ocaml/merlin#1930,
fixes ocaml/merlin#1580 and ocaml/merlin#1588, workaround for ocaml/merlin#1934)
+ ocaml-index
- Improve the granularity of index reading by segmenting the marshalization
of the involved data-structures. (ocaml/merlin#1889)
+ test suite
- Add a test case illustrating wrong open order proposed in issue ocaml/merlin#1900. (ocaml/merlin#1901)
ocaml-lsp outline reports imbricated object inside let expression but merlin not. This fix aims to use merlin to generate outlines in ocaml-lsp without introduce regression in ocaml-lsp
The fix is ugly but I can refactor if needed.
cc @voodoos @xvw