Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename Texp_hole and Tmod_hole #1888

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

liam923
Copy link
Contributor

@liam923 liam923 commented Jan 16, 2025

In ocaml-flambda, we've added a new constructor to Typedtree.expression_desc named Texp_hole: https://github.com/ocaml-flambda/flambda-backend/pull/3310/files#diff-ed47e32f450beb29b2f22ff8073a5592865c82845687a224124858a6b6060fc3R504. This unfortunately conflicts with the Texp_hole constructor that Merlin adds to the same type in order to represent typed holes. To solve this, we are renaming what was Merlin's Texp_hole to Texp_typed_hole. For consistency, we are also renaming Tmod_hole to Tmod_typed_hole, even though there is no Tmod_hole in the compiler. This PR includes the same renames in order to minimize the diff with merlin-jst.

@liam923
Copy link
Contributor Author

liam923 commented Jan 16, 2025

I see that the ocaml-lsp compatibility check is failing. Does that block merging this PR? If so, how would I atomically make this change to both repos?

@voodoos
Copy link
Collaborator

voodoos commented Jan 17, 2025

I see that the ocaml-lsp compatibility check is failing. Does that block merging this PR? If so, how would I atomically make this change to both repos?

What we usually do is open a PR on both side and update the CIs to match the other-side branche. Then we merge both when they are ready.

We try to progressively move all Typedtree usage to merlin-lib to prevent further these breakage which are the most common.

In that case, I think the best way forward would be to use that PR to move the Typed_holes compatibility module to merlin-lib, in the Typedtree_utils.

@liam923
Copy link
Contributor Author

liam923 commented Jan 17, 2025

In that case, I think the best way forward would be to use that PR to move the Typed_holes compatibility module to merlin-lib, in the Typedtree_utils.

See ocaml/ocaml-lsp#1451

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.

2 participants