-
Notifications
You must be signed in to change notification settings - Fork 54
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
Generate .merlin files with eliom-distillery #532
Comments
Does this mean that indeed merlin should work for eliom projects with this setup? |
Not exactly. Merlin does not understand the client/server structure of Eliom programs. I guess that a |
What does it mean in practical terms? That it "randomly" will not work for parts of the code? |
This is still not fixed? How can I use merlin with eliom projects? Not being able to quickly |
It is not possible to have Merlin understand the structure of an eliom file made of both client and server parts. Nevertheless, it is still possible to have Merlin only consider the server parts of your files. Here is an example of configuration that is more or less satisfying:
Note again that this configuration will entirely skip the client part of your eliom files. Moreover, it is not possible to switch to the client version of this configuration. Once the server parts have been compiled, eliomc hands over to js_of_eliom the type annotations of variables defined on the server side and used on the client side. Currently, Merlin cannot be made aware of the existence of those type annotations |
My main issue is that even though I can get type definition when I hover some code, I can't go to the definition of library functions This is easy to fix. Just bundle the .mli and .cmt in the installed package. I've created a separate issue for that but nobody answered ... Honestly this project looks a bit dead. See #649 |
I've been creating a series of small test projects as a way of working out my understanding of different concepts. Each time, I end up creating the same
.merlin
file:(I've worked out this combination mostly by trial and error, so it's possible there are some redundancies...).
It strikes me that the generation of this kind of boilerplate is what templates and project initialization are built for, so it should/could arguably be included in the basic template, or in an alternate basic template.
I thought this was worth an issue, so I could feel-out whether a contribution along these lines would be welcome, or if it perhaps comes in conflict with some development principles (maybe it would be better for me to just make my own template?). Additionally, if there are short-term plans to switch eliom projects over to jbuilder, this kind of trivial feature would be obviated.
If, on the other hand, any maintainer thinks this would be a welcome contribution, I'd be pleased to make a PR for it.
The text was updated successfully, but these errors were encountered: