Skip to content

Incorrect artifact copy for some std libraries cause Merlin to fail to locate definitions #1192

Open
@voodoos

Description

A few modules of the Stdlib are copied from the otherlibs folder. Here are, for example, the rules for Unix:

(files
(.unix.objs/native/unix.cmx as unix/unix.cmx)
(.unix.objs/native/unixLabels.cmx as unix/unixLabels.cmx)
(unix.cmxa as unix/unix.cmxa)
(unix.a as unix/unix.a)
(unix.cma as unix/unix.cma)
(.unix.objs/byte/unix.cmi as unix/unix.cmi)
(.unix.objs/byte/unix.cmti as unix/unix.cmti)
(.unix.objs/byte/unixLabels.cmi as unix/unixLabels.cmi)
(.unix.objs/byte/unixLabels.cmti as unix/unixLabels.cmti)
(unix.cmxs as unix/unix.cmxs)
(unix.mli as unix/unix.mli)
(unixLabels.mli as unix/unixLabel.mli)
(libunix_stubs.a as unix/libunix_stubs.a)
(libunix_stubs.a as libunix_stubs_native.a) ; for special_dune compat
(dllunix_stubs.so as stublibs/dllunix_stubs.so)
(socketaddr.h as caml/socketaddr.h)
(unixsupport.h as caml/unixsupport.h)
)

There are a few things that prevent Merlin to find the information it needs:

  • The cmt files are not copied, these are critical for Merlin functionality (jump-to-definition and document)
  • There is at least one typo in (unixLabels.mli as unix/unixLabel.mli): it should be plural everywhere

Similar changes should also be made to the other libraries that are copied to the stdlib folder.

cc @ddickstein

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions