Repository navigation
Conversation
Signed-off-by: Ulysse Gérard <[email protected]>
Signed-off-by: Ulysse Gérard <[email protected]>
Signed-off-by: Ulysse Gérard <[email protected]>
|
Do we already play with symlink in this part of the code? Would it be simpler to just put the cmt[i] directly there? Oh no 💭 is it because we don't choose where the compiler put the files? |
Yes, cmi files were already symlinked before when using private modules.
I am not sure but it looks like the compiler doesn't allow to specify different paths for different artefacts so that might be the case. |
| Command.Args.S | ||
| [ iflags libs Byte | ||
| ; Hidden_deps (Lib_file_deps.deps libs ~groups:[ Cmi ]) | ||
| ; Hidden_deps (Lib_file_deps.deps libs ~groups:[ Cmi; Cmt; Cmti ]) |
There was a problem hiding this comment.
This seems wrong to me. if something depends on x, it does not mean we need to build x's cmt's and cmti's. Why are we adding the dependency here?
There was a problem hiding this comment.
I see, the Cmts are built as soon as a compilation context has the bin_annot field set to true which appear to be the case for every CC used in Dune except for Menhir and when building ppx_driver.
So the cmts are already always built by Dune isn't it ? However I should add a check that the current CC has the bin_annot field set to true.
There was a problem hiding this comment.
Yes, cmt's are essentially always built by dune.
However I should add a check that the current CC has the bin_annot field set to true.
I'm not sure why you need this check. Sometimes the cmt's are explicitly turned off for some internally generated modules. That's about the only time when bin_annot is set to false.
|
@voodoos can we revive this PR? Also, what about an alternative fix for this issue: making the |
If I understand way the current behaviour it would defeat the purpose of the |
|
The purpose of the public_cmi is to hide it from the user. There's no goal of hiding anything from merlin. |
|
Replaced by #6405 |
…odules (#15977) Expose dependency object directories to Merlin as annotation-only CMT paths. CMT paths have no bearing on auto-completion, but will still allow locate to work. Fixes #4892. Follows #15972. This is an alternative to these: - #4905 - #6405 --------- Signed-off-by: Antonio Nuno Monteiro <[email protected]>
Fixes #4892
When private modules are used Dune hides corresponding
cmfiles from Merlin by not adding thebytesfolder to the build path. Exposed modulescmfiles are placed in a specialpublic_cmidirectory which is added to Merlin's build path.However this directory was missing
cmt[i]files causing Merlin's locate command to fail.This PR enable the symlinking of
cmt[i]s files into thepublic_cmidirectory along with thecmifiles.