Description
I am unsure if this is caused by TS eagerly loading all syntax trees or by the tsserver eagerly loading all symbols (which btw seems crazy to me) but I think the tsserver should check how large a project is (or how much memory is already used) and fail gracefully.
I have a JavaScript project with little code but a lots of dependencies like node_modules
and bower_components
as well as files that get generated into a temp
folder (on server start). I am aware of the exclude-property and the default excludes, but the challenge is to provide guidance to the user to use them. I have no chance to ask tsserver how many files are included by a project because it crashes already with the first open-file
request.
A diagnostics message ala too many files (foo/jsconfig.json, files: [...]),
would be much appreciated because otherwise we are going to duplicate a lot of logic on our (VS Code) end for such checks (and the server will still crashes).