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

merlin outline fails to find type information in *.mli files #1014

Closed
taquangtrung opened this issue Aug 21, 2019 · 0 comments
Closed

merlin outline fails to find type information in *.mli files #1014

taquangtrung opened this issue Aug 21, 2019 · 0 comments

Comments

@taquangtrung
Copy link
Contributor

taquangtrung commented Aug 21, 2019

Hi,

I encountered a problem when implementing the Emacs module merlin-imenu.el (#1013) that the command outline of merlin cannot get correct type information in*.mli modules.

For example, here is a code segment of module ~/.opam/4.08.1/lib/llvm/llvm.mli, line 1976:

(** [insertion_block b] returns the basic block that the builder [b] is
    positioned to insert into. Raises [Not_Found] if the instruction builder is
    uninitialized.
    See the method [llvm::LLVMBuilder::GetInsertBlock]. *)
val insertion_block : llbuilder -> llbasicblock

Here is the item related to the function insertion_block that merlin outline returns:

((assoc) (start (assoc) (line . 1980) (col . 0)) (end (assoc) (line . 1980) (col . 47)) (name . insertion_block) (kind . Value) (type . null) (children))

As can be seen above, the type information obtained for insertion_block is null.

Could you please check if this is a bug?

(Currenlty, I have to use the command type-enclosing to get the type information in *.mli modules, but it is very slow.)

@trefis trefis closed this as completed in 16b52b6 Sep 9, 2019
let-def added a commit to let-def/opam-repository that referenced this issue Nov 29, 2019
CHANGES:

Fri Nov 29 17:35:58 CET 2019

  + backend
    - support OCaml 4.09 (ocaml/merlin#1055)
    - fix parse errors in 4.08 (ocaml/merlin#1037)
    - update 4.08 support to OCaml 4.08.1 (ocaml/merlin#1053)
    - support `without_cmis`
    - separate reading from caching in file-cache, use caching in
      `Env.check_state_consistency` (ocaml/merlin#1044)
    - simplify compiler state management (ocaml/merlin#1056, ocaml/merlin#1059)
    - fix creation of initial environment, improve compatibility with
      upstream 4.08 (ocaml/merlin#1052)
  + frontend
    - code re-organization (ocaml/merlin#1042)
    - error command: select which kind of errors to show (ocaml/merlin#995)
    - print value types in outline (ocaml/merlin#1014)
    - fix process handling in windows (ocaml/merlin#1005)
  + editor modes
    - emacs
      + bugfixes in merlin-imenu, merlin-xref (ocaml/merlin#1000, ocaml/merlin#1021, ocaml/merlin#1001)
      + show types in merlin-imenu (ocaml/merlin#1013)
      + reset buffer local configurations when resetting server (ocaml/merlin#1004)
      + remove merlin-use-tuareg-imenu
      + fix stack overflow (ocaml/merlin#1024)
      + fix merlin-occurrence (ocaml/merlin#1043)
    - vim
      + display warn-error warnings as errors (ocaml/merlin#1009)
  + testsuite
    - cover file-cache and `check_state_consistency` (ocaml/merlin#1044)
    - check inconsistent assumptions, test server versus single modes (ocaml/merlin#1047)
let-def added a commit to let-def/opam-repository that referenced this issue Mar 2, 2020
CHANGES:

Fri Nov 29 17:35:58 CET 2019

  + backend
    - support OCaml 4.09 (ocaml/merlin#1055)
    - fix parse errors in 4.08 (ocaml/merlin#1037)
    - update 4.08 support to OCaml 4.08.1 (ocaml/merlin#1053)
    - support `without_cmis`
    - separate reading from caching in file-cache, use caching in
      `Env.check_state_consistency` (ocaml/merlin#1044)
    - simplify compiler state management (ocaml/merlin#1056, ocaml/merlin#1059)
    - fix creation of initial environment, improve compatibility with
      upstream 4.08 (ocaml/merlin#1052)
  + frontend
    - code re-organization (ocaml/merlin#1042)
    - error command: select which kind of errors to show (ocaml/merlin#995)
    - print value types in outline (ocaml/merlin#1014)
    - fix process handling in windows (ocaml/merlin#1005)
  + editor modes
    - emacs
      + bugfixes in merlin-imenu, merlin-xref (ocaml/merlin#1000, ocaml/merlin#1021, ocaml/merlin#1001)
      + show types in merlin-imenu (ocaml/merlin#1013)
      + reset buffer local configurations when resetting server (ocaml/merlin#1004)
      + remove merlin-use-tuareg-imenu
      + fix stack overflow (ocaml/merlin#1024)
      + fix merlin-occurrence (ocaml/merlin#1043)
    - vim
      + display warn-error warnings as errors (ocaml/merlin#1009)
  + testsuite
    - cover file-cache and `check_state_consistency` (ocaml/merlin#1044)
    - check inconsistent assumptions, test server versus single modes (ocaml/merlin#1047)
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

No branches or pull requests

1 participant