this code in printDiagnostics seems wrong:
let fileText = await util.getFileContents(pathAbsolute);
- It does not take into account the files current contents, if they are manipulated in some way
- it does not load the contents from a file resolver
- in the case of a generated file, it causes a crash as the source is not found, despite the file's contents, lines and ast all being valid..
I workaround this for now with a try catch; but I suspect the fix will be in getFileContents to get the current contents of the file, or fallback to disk, as a last resort.
My fix:
