Yet another "Unbound module Stdlib" issue (VSCode-specific on Mac)

There are several questions about the “Unbound module Stdlib” error out there on the web, but none of them really correspond to my own particular case, so I’m asking this as a brand new question.

I’m using dune 3.7.0 with utop 2.11.0 on top of Ocaml 4.14.0 and opam 2.1.3, on my Mac. They all work fine, the only problem is with my VSCode 1.81.1.

What happens is this : the “Problems” sub-window in the VSCode window starts by bevahing normally, displaying only the errors in my code, as it should. But after a while, that subwindow starts displaying an “Unbound module Stdlib” error, which I can only get rid of by restarting VSCode :

unbound_stdlib

Any ideas on how to fix this better than just tiresome restarting every time the problem appears ?

Never seen stuff like this.

Are you sure that restarting language server from C-p menu is not enough?

What is the C-p menu please ? In which part of the VS window would that be ?

1 Like

Thanks for the suggestion, I’ll try it next time the problem reappears.
But I’d still prefer a full solution that simply makes the problem go away forever

There is a chance that everything works OK for your project’s files.
But things are getting mad when you go to definition to the stdlib’s implementation which is not in the directory of your project. Anyway, this screen is not enough to fully understand what is going on.

1 Like

I completely agree. Thing is, I don’t notice immediately when this strange “Unbound module Stdlib” pops up, so it’s harder to guess what triggered it

@jonathandoyle, It may be great if some your issues will be officially discussed somewhere, for example at Configuring Your Editor · OCaml Tutorials