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

Not_found during polarity search and missing documentation #1113

Closed
arvidj opened this issue Mar 9, 2020 · 0 comments · Fixed by ocaml/opam-repository#26965
Closed

Not_found during polarity search and missing documentation #1113

arvidj opened this issue Mar 9, 2020 · 0 comments · Fixed by ocaml/opam-repository#26965
Assignees
Labels

Comments

@arvidj
Copy link

arvidj commented Mar 9, 2020

I'm a OCaml beginner. I'm used to tools like Hoogle or Yahoo. I'm looking for a function of some type t. I'm hoping merlin can help me. I'm using Emacs. I try the command merlin-search. It is undocumented. I try any string, the response is:

Not_found
Raised at file \"src/ocaml/typing/407/ident.ml\", line 171, characters 6-21
Called from file \"src/ocaml/typing/407/env.ml\", line 281, characters 25-57
Re-raised at file \"src/ocaml/typing/407/env.ml\", line 301, characters 12-21
Called from file \"src/ocaml/typing/407/env.ml\" (inlined), line 1261, characters 2-57
Called from file \"src/ocaml/typing/407/env.ml\", line 1319, characters 26-56
Called from file \"src/analysis/polarity_search.ml\", line 83, characters 29-52
Called from file \"src/utils/std.ml\", line 109, characters 12-15
Called from file \"src/analysis/polarity_search.ml\", line 86, characters 17-62
Called from file \"src/frontend/query_commands.ml\", line 417, characters 6-125
Called from file \"src/frontend/ocamlmerlin/new/new_commands.ml\", line 64, characters 15-53
Called from file \"src/utils/std.ml\", line 679, characters 8-12
Re-raised at file \"src/utils/std.ml\", line 681, characters 30-39
Called from file \"src/ocaml/utils/misc.ml\", line 62, characters 8-15
Re-raised at file \"src/ocaml/utils/misc.ml\", line 79, characters 10-24
Called from file \"src/utils/local_store.ml\", line 42, characters 8-12
Re-raised at file \"src/utils/local_store.ml\", line 52, characters 4-15
Called from file \"src/kernel/mocaml.ml\", line 18, characters 8-38
Re-raised at file \"src/kernel/mocaml.ml\", line 20, characters 42-53
Called from file \"src/frontend/ocamlmerlin/new/new_merlin.ml\", line 100, characters 14-110

Okay. I'm trying to figure what merlin-search is should do. I see that it does something called "polarity search". I find the documenation :

### `search-by-polarity -position <position> -query <string>`

    -position <position>  Position to complete
         -query <string>  Query of the form TODO

search-by-polarity -position pos -query ident
        TODO

I'm none the wiser.

My Merlin version 3.3.3 :

ocamlmerlin -version
The Merlin toolkit version 73e9771b, for Ocaml 4.07.1

Suggestions:

  • fix the bug above
  • document search-by-polarity in the command-line client
  • document merlin-search in emacs
  • give usage examples somewhere explaining clearly what this command searches
xvw added a commit to xvw/merlin that referenced this issue Oct 24, 2024
xvw added a commit to xvw/merlin that referenced this issue Oct 24, 2024
@xvw xvw mentioned this issue Oct 24, 2024
voodoos added a commit to voodoos/merlin that referenced this issue Nov 26, 2024
voodoos added a commit to voodoos/opam-repository that referenced this issue Nov 26, 2024
CHANGES:

Tue Nov 26 17:30:42 CET 2024

  + merlin binary
    - Respect the `EXCLUDE_QUERY_DIR` configuration directive when looking for cmt
      files (ocaml/merlin#1854)
    - Fix occurrences bug in which relative paths in index files are resolved against the
      PWD rather than the SOURCE_ROOT (ocaml/merlin#1855)
    - Fix exception in polarity search (ocaml/merlin#1858 fixes ocaml/merlin#1113)
    - Fix jump to `fun` targets not working (ocaml/merlin#1863, fixes ocaml/merlin#1862)
    - Fix type-enclosing results instability. This reverts some overly
      aggressive deduplication that should be done on the client side. (ocaml/merlin#1864)
    - Fix occurrences not working when the definition comes from a hidden source
      file (ocaml/merlin#1865)
voodoos added a commit to voodoos/opam-repository that referenced this issue Nov 26, 2024
CHANGES:

Tue Nov 26 17:30:42 CET 2024

  + merlin binary
    - Respect the `EXCLUDE_QUERY_DIR` configuration directive when looking for
      cmt files (ocaml/merlin#1854)
    - Fix exception in polarity search (ocaml/merlin#1858 fixes ocaml/merlin#1113)
    - Fix type-enclosing results instability. This reverts some overly
      aggressive deduplication that should be done on the client side. (ocaml/merlin#1864)
voodoos added a commit to voodoos/opam-repository that referenced this issue Nov 26, 2024
CHANGES:

Tue Nov 26 17:30:42 CET 2024

  + merlin binary
    - Respect the `EXCLUDE_QUERY_DIR` configuration directive when looking for cmt
      files (ocaml/merlin#1854)
    - Fix occurrences bug in which relative paths in index files are resolved against the
      PWD rather than the SOURCE_ROOT (ocaml/merlin#1855)
    - Fix exception in polarity search (ocaml/merlin#1858 fixes ocaml/merlin#1113)
    - Fix jump to `fun` targets not working (ocaml/merlin#1863, fixes ocaml/merlin#1862)
    - Fix type-enclosing results instability. This reverts some overly
      aggressive deduplication that should be done on the client side. (ocaml/merlin#1864)
    - Fix occurrences not working when the definition comes from a hidden source
      file (ocaml/merlin#1865)
voodoos added a commit to voodoos/opam-repository that referenced this issue Nov 26, 2024
CHANGES:

Tue Nov 26 17:30:42 CET 2024

  + merlin binary
    - Respect the `EXCLUDE_QUERY_DIR` configuration directive when looking for
      cmt files (ocaml/merlin#1854)
    - Fix exception in polarity search (ocaml/merlin#1858 fixes ocaml/merlin#1113)
    - Fix type-enclosing results instability. This reverts some overly
      aggressive deduplication that should be done on the client side. (ocaml/merlin#1864)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants