Skip to content

uTop sometimes freezes after typing #require #490

Open
@edwintorok

Description

Appears to be a findlib bug, but triggered by Topfind.don't_load_deeply ["utop"]; (it doesn't reproduce without it).
ocaml/ocamlfind#82

Workaround is to disable package name auto-completion:

diff --git a/src/lib/uTop_complete.ml b/src/lib/uTop_complete.ml
index 7f480ddff0..0231082c44 100644
--- a/src/lib/uTop_complete.ml
+++ b/src/lib/uTop_complete.ml
@@ -819,7 +819,7 @@ let complete ~phrase_terminator ~input =
     (* Completion on #require. *)
     | [(Symbol "#", _); (Lident "require", _); (String (tlen, false), loc)] ->
         let pkg = String.sub input (loc.ofs1 + tlen) (String.length input - loc.ofs1 - tlen) in
-        let pkgs = lookup pkg (Fl_package_base.list_packages ()) in
+        let pkgs = lookup pkg []  (*(UTop.Private.with_findlib Fl_package_base.list_packages)*) in

I'm reporting this here just in case someone else runs into this, so they know which bug to track: ocaml/ocamlfind#82

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