@@ -83,7 +83,7 @@ class Context {
8383 haxeDisplayProtocol = new Protocol (@:nullSafety (Off ) writeMessage );
8484 haxeServer = @:nullSafety (Off ) new HaxeServer (this );
8585 documents = new TextDocuments ();
86- config = new Configuration (languageServerProtocol , kind -> restartServer (' $kind configuration was changed' ));
86+ config = new Configuration (languageServerProtocol , kind -> @ :nullSafety ( Off ) restartServer (' $kind configuration was changed' ));
8787
8888 languageServerProtocol .onRequest (InitializeRequest .type , onInitialize );
8989 languageServerProtocol .onRequest (ShutdownRequest .type , onShutdown );
@@ -105,7 +105,7 @@ class Context {
105105 return ; // don't send cancel notifications, not supported by Haxe
106106 }
107107 final includeDisplayArguments = method .startsWith (" display/" ) || method == ServerMethods . ReadClassPaths ;
108- callDisplay (method , [Json .stringify (message )], token , function (result : DisplayResult ) {
108+ callDisplay (method , [Json .stringify (message )], null , token , function (result : DisplayResult ) {
109109 switch result {
110110 case DResult (" " ) if (method == DisplayMethods . Diagnostics ):
111111 haxeDisplayProtocol .handleMessage (({
@@ -122,15 +122,14 @@ class Context {
122122 Json .parse (error );
123123 } catch (_ : Any ) {
124124 // pretend we got a proper JSON (HaxeFoundation/haxe#7955)
125+ final errData : HaxeResponseErrorData = {
126+ severity : Error ,
127+ message : error
128+ }
125129 final message : ResponseMessage = {
126130 jsonrpc : Protocol .PROTOCOL_VERSION ,
127131 id : @:privateAccess haxeDisplayProtocol .nextRequestId - 1 , // ew..
128- error : new ResponseError (ResponseError . InternalError , " Compiler error" , ([
129- {
130- severity : Error ,
131- message : error
132- }
133- ] : HaxeResponseErrorData ))
132+ error : new ResponseError (ResponseError . InternalError , " Compiler error" , [errData ])
134133 }
135134 message ;
136135 });
0 commit comments