-
Notifications
You must be signed in to change notification settings - Fork 238
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
look for .merlin in _build #712
Conversation
Thanks. I am not opposed to the idea, bug different approaches have been suggested, especially for interop with jbuilder. |
jbuilder 😄 See jbuilder/#207. |
@let-def just curious, what other approaches are you referring to? |
@rdavison I was thinking of supporting jbuild directly or provide an interface for plugging external build system plugins support. The current way Merlin gets build information is too limited for practical uses nowadays and .merlin are an artifact of the past (... they were good enough when they were introduced, but the ecosystem started moving forward). Supporting jbuild is good for jbuilder but there are other systems out there. I am thinking of a more general "log file" listing all compiler invocations in which Merlin pick the corresponding ocaml(c/opt) line but this is not the end of the story either (build systems tend to copy files, so the compiler view alone is too limited for Merlin). |
How about using something similar to the clang compilation database. This works for pretty well for C/C++ tooling with clang. |
how about an |
that is, rather than special-casing the resolution algorithm for each build system, continue to rely on the existing resolution algorithm. once it finds a .merlin file, that file can include the generated one from wherever it wants. |
It sounds like over-engineered intermediate solutions are a bad idea? The proposed change in the OP is a great hold-over, while something like clang's database can be hashed out with the build-tool people as the plan moving forward? (I'm a newcomer to OCaml and have no idea what I'm talking about, so feel free to ignore me if there's a good reason for it — just been burned by too many hold-off measures with too many caveats in the past! 🤣) |
#737 has been opened to discuss a potential support of json compilation database (as has also been suggested on this PR by bschommer). As for this PR:
Given that, I will close this PR, but feel free to reopen (a more complete) one in a few weeks if the situation hasn't changed at all. Thanks! |
Closes issue #686
After looking for
dir/.merlin
this also triesdir/_build/.merlin
before going up the path.