这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@liam923
Copy link
Contributor

@liam923 liam923 commented Jan 8, 2025

When Merlin finds project-wide occurrences, it loads lists of occurrences from index files. Those index files contain metadata about the state of the ml/mli files when the index was generated. This is used as a heuristic to determine if occurrences might be stale (ie, that occurrence was either moved or removed since the index file was generated).

This PR does two things:

  1. Fix a bug with Merlin's detection of stale occurrences. Currently, depending on the layout of a repository, Merlin may not line up file paths correctly.
  2. Currently, Merlin discards any occurrences it thinks might be stale. This PR changes this so that the stale occurrences are reported, but flagged as being stale.

The net effect for an end user should be nothing - the stale occurrences should still be reported by their editor. But this enables future LSP/editor work.

@liam923 liam923 requested a review from goldfirere January 8, 2025 16:17
@goldfirere
Copy link
Contributor

As discussed in person, @liam923 will explore the possibility of getting a review from Ulysse, who is more expert in this code. If there is somehow trouble, please call me back into service here.

@goldfirere goldfirere removed their request for review January 9, 2025 18:32
@liam923
Copy link
Contributor Author

liam923 commented Jan 10, 2025

I've opened a PR upstream: ocaml/merlin#1885

@liam923
Copy link
Contributor Author

liam923 commented Feb 28, 2025

The upstream PR has now been reviewed and merged. All that's left to do now is verify that this is a correct backport of that PR. @goldfirere

@liam923 liam923 force-pushed the improve-stale-occurrences branch from afcb166 to 7072ee8 Compare April 23, 2025 13:13
@liam923 liam923 requested a review from goldfirere June 10, 2025 01:45
@liam923 liam923 merged commit 0dd8a11 into main Jun 27, 2025
2 checks passed
@liam923 liam923 deleted the improve-stale-occurrences branch June 27, 2025 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants