ocaml
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Clear diagnostics when parsing succeeds

authored by

Kento Okura and committed by
Jon Sterling
3d6ed1c7 b04bab4c

+3 -11
+3 -1
lib/compiler/Driver.ml
··· 48 48 List.iter 49 49 (fun (code : Tree.code) -> 50 50 let@ uri = Option.iter @~ Tree.(identity_to_uri code.identity) in 51 - forest.={uri} <- Parsed code 51 + forest.={uri} <- Parsed code; 52 + forest.?{uri} <- [] 52 53 ) 53 54 succeeded; 54 55 if (List.length errors = 0) then ··· 154 155 match Parse.parse_document ~host doc with 155 156 | Ok code -> 156 157 forest.={uri} <- Parsed code; 158 + forest.?{uri} <- []; 157 159 Imports.fixup code forest; 158 160 Expand uri, forest 159 161 | Error diagnostic ->
-10
lib/language_server/Diagnostics.ml
··· 25 25 Publish.publish lsp_uri [] 26 26 | diagnostics -> 27 27 Eio.traceln "publishing %i diagnostics to %s" (List.length diagnostics) (Lsp.Uri.to_path lsp_uri); 28 - List.iter 29 - (fun d -> 30 - Eio.traceln 31 - "%s" 32 - ( 33 - Asai.Diagnostic.(d.explanation.value) 34 - |> Asai.Diagnostic.string_of_text 35 - ) 36 - ) 37 - diagnostics; 38 28 Publish.publish lsp_uri diagnostics