merlin
merlin copied to clipboard
Using both `-principal` and `-short-paths` causes a loop on 4.13
Given this type definition in a file name main.ml:
type module_declaration_lazy = int
and module_data =
{ mda_declaration : module_declaration_lazy;}
Running:
ocamlmerlin single type-enclosing -position 1:34 -principal -short-paths -filename main.ml < main.ml
Will cause an infinitive loop when using Merlin's 4.13 preview (#1381).
Are necessary to the reproduction:
- Having both flags
- Having the record (a variant is ok)
- Having the recursive type
@ulugbekna @rgrinberg as soon as this is solved we will be able to re-enable the flag in ocaml-lsp
FTR: I reproduced this on Merlin 3.0 and OCaml 4.04. It's still a bug, but shouldn't be considered a blocker for 4.13's release.