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

uTop sometimes freezes after typing #require #490

Open
edwintorok opened this issue Sep 30, 2024 · 0 comments
Open

uTop sometimes freezes after typing #require #490

edwintorok opened this issue Sep 30, 2024 · 0 comments

Comments

@edwintorok
Copy link

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

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