ocaml / merlin

Context sensitive completion for OCaml in Vim and Emacs
https://ocaml.github.io/merlin/
MIT License
1.59k stars 232 forks source link

Reset the uid counter when restoring the typer's state #1779

Closed voodoos closed 5 months ago

voodoos commented 5 months ago

This ensures uids are stable between edits. This is important for features such as project-wide occurrences that first identify definitions' uids before looking them up in an external table. We need these uids to coincide with the ones of emitted by the compiler.

Since some tables use uids as keys, we have to clean them properly. This is done using the Stamped_hashtable datastructure introduced in 147f0c3.