pub(crate) fn typecheck_diagnostics(
fs: &FileSystem,
error: &TypeCheckError,
candidates: &Candidates,
) -> BTreeMap<PathBuf, Vec<Diagnostic>>Expand description
Convert a TypeCheckError into LSP diagnostics grouped by file path.
Per-object errors (TypeCheckFailed, Multiple) are positioned by
inspecting the underlying error via locate_typecheck. The on-disk
source file is read once per file and cached. If the read fails, all
diagnostics for that file fall back to (0, 0).
Non-object variants (DatabaseSetupError, SortError,
TypesCacheWriteFailed) have no per-file context and return an empty map;
callers should log them to the client message stream instead.