Skip to content

Commit

Permalink
Improve error message for dependency loading
Browse files Browse the repository at this point in the history
Currently LSP display just generic `[E] Failed to load deps` which does not give a clue
about what happens. Pass underlying error information, so user can at least guess what's going on
  • Loading branch information
kant2002 committed Apr 3, 2022
1 parent 46cbaf0 commit 89f7858
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/fstar/FStar.Interactive.PushHelper.fst
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,8 @@ let ld_deps st =
| Inr st -> Inr st
| Inl st -> Inl (st, deps)
with
| _ -> U.print_error "[E] Failed to load deps"; Inr st
| Err (e, msg, ctx) -> U.print1_error "[E] Failed to load deps. %s" msg; Inr st
| exn -> U.print1_error "[E] Failed to load deps. Message: %s" (message_of_exn exn); Inr st

let add_module_completions this_fname deps table =
let capitalize str = if str = "" then str
Expand Down
10 changes: 8 additions & 2 deletions src/ocaml-output/FStar_Interactive_PushHelper.ml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 89f7858

Please sign in to comment.