Open tobil4sk opened 1 year ago
Oh no...
I'm seeing an error on readClassPaths
already:
Processing Arguments [--cwd,c:/Users/simn/Desktop/Newfolder,-D,display-details,--no-output,--times,-D,macro-times,build.hxml,--display,{"jsonrpc":"2.0","id":2,"method":"server/readClassPaths"}]
Defines dce=std,display_details=1,eval=1,haxe=4.3.0-rc.1,haxe3=1,haxe4=1,haxe_ver=4.300,interp=1,macro_times=1,source_header=Generated by Haxe 4.3.0-rc.1+da375d759,sys=1,target.name=eval,target.sys=1,target.threaded=1,target.unicode=1,true=1
Using signature 52ee16b3475adf9153eb4803835ac0a3
Display position: ?: -1--1
1,evl: changed directories: []
1,evl: Cached 0 modules
Defines dce=std,eval=1,haxe=4.3.0-rc.1,haxe3=1,haxe4=1,haxe_ver=4.300,interp=1,source_header=Generated by Haxe 4.3.0-rc.1+da375d759,sys=1,target.name=eval,target.sys=1,target.threaded=1,target.unicode=1,true=1
Using signature 52ee16b3475adf9153eb4803835ac0a3
Display position: ?: -1--1
1,evl: Cached 57 modules
Stats = 0 files, 0 classes, 0 methods, 0 macros
Time spent : 0.006s
Failed - Exception while handling Haxe completion response: Unexpected token in JSON at position 734
Hm, wasn't happening for me before but now I made a fresh empty project, and it is:
Haxe language server started
Haxe Path: haxe
Using --server-connect
Haxe connected!
Processing Arguments [--display,{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"supportsResolve":true,"exclude":["zpp_nape"],"maxCompletionItems":1000}}]
0, x: Cached 0 modules
Completion Response =
{"jsonrpc":"2.0","id":0,"result":{"result":{"methods":["display/definition","server/contexts","server/moduleCreated","server/invalidate","server/module","server/files","initialize","display/completion","typer/compiledTypes","display/references","server/modules","server/memory/context","display/completionItem/resolve","display/typeDefinition","server/memory","display/implementation","display/hover","display/package","display/signatureHelp","server/type","server/typeContexts","server/memory/module","server/readClassPaths","server/configure"],"haxeVersion":{"major":4,"minor":3,"patch":0,"pre":"rc.1","build":null},"protocolVersion":{"major":0,"minor":5,"patch":0}},"timestamp":1680278875.676538}}
Stats = 0 files, 0 classes, 0 methods, 0 macros
Time spent : 0.000s
Processing Arguments [--display,{"jsonrpc":"2.0","id":1,"method":"server/configure","params":{"noModuleChecks":true,"print":{"completion":false,"reusing":false},"legacyCompletion":false}}]
0, x: Cached 0 modules
Stats = 0 files, 0 classes, 0 methods, 0 macros
Time spent : 0.000s
Processing Arguments [--no-output,--each,--no-output,build.hxml]
Defines dce=std,eval=1,haxe=4.3.0-rc.1,haxe3=1,haxe4=1,haxe_ver=4.300,interp=1,source_header=Generated by Haxe 4.3.0-rc.1,sys=1,target.name=eval,target.sys=1,target.threaded=1,target.unicode=1,true=1
Using signature db64600cc6f8212c6f9dfe154d2e49e4
Display position: ?: -1--1
Listening on port 6004
1,evl: Cached 71 modules
Defines dce=std,eval=1,haxe=4.3.0-rc.1,haxe3=1,haxe4=1,haxe_ver=4.300,interp=1,source_header=Generated by Haxe 4.3.0-rc.1,sys=1,target.name=eval,target.sys=1,target.threaded=1,target.unicode=1,true=1
Using signature db64600cc6f8212c6f9dfe154d2e49e4
Display position: ?: -1--1
1,evl: Cached 57 modules
1,evl: found 39 directories
Stats = 111 files, 110 classes, 589 methods, 0 macros
Time spent : 0.114s
Processing Arguments [--cwd,/path/to/project,-D,display-details,--no-output,build.hxml,--display,/path/to/project/Main.hx@0@diagnostics]
Defines dce=std,display_details=1,eval=1,haxe=4.3.0-rc.1,haxe3=1,haxe4=1,haxe_ver=4.300,interp=1,source_header=Generated by Haxe 4.3.0-rc.1,sys=1,target.name=eval,target.sys=1,target.threaded=1,target.unicode=1,true=1
Using signature db64600cc6f8212c6f9dfe154d2e49e4
Display position: /path/to/project/Main.hx: 0-0
1,evl: changed directories: []
1,evl: Cached 57 modules
Defines dce=std,eval=1,haxe=4.3.0-rc.1,haxe3=1,haxe4=1,haxe_ver=4.300,interp=1,source_header=Generated by Haxe 4.3.0-rc.1,sys=1,target.name=eval,target.sys=1,target.threaded=1,target.unicode=1,true=1
Using signature db64600cc6f8212c6f9dfe154d2e49e4
Display position: ?: -1--1
1,evl: Cached 57 modules
Stats = 0 files, 0 classes, 0 methods, 0 macros
Time spent : 0.003s
Error parsing diagnostics response: Unexpected token in JSON at position 2
Processing Arguments [--cwd,/path/to/project,-D,display-details,--no-output,build.hxml,--display,{"jsonrpc":"2.0","id":2,"method":"server/readClassPaths"}]
Defines dce=std,display_details=1,eval=1,haxe=4.3.0-rc.1,haxe3=1,haxe4=1,haxe_ver=4.300,interp=1,source_header=Generated by Haxe 4.3.0-rc.1,sys=1,target.name=eval,target.sys=1,target.threaded=1,target.unicode=1,true=1
Using signature db64600cc6f8212c6f9dfe154d2e49e4
Display position: ?: -1--1
1,evl: changed directories: []
1,evl: Cached 0 modules
Defines dce=std,eval=1,haxe=4.3.0-rc.1,haxe3=1,haxe4=1,haxe_ver=4.300,interp=1,source_header=Generated by Haxe 4.3.0-rc.1,sys=1,target.name=eval,target.sys=1,target.threaded=1,target.unicode=1,true=1
Using signature db64600cc6f8212c6f9dfe154d2e49e4
Display position: ?: -1--1
1,evl: Cached 57 modules
Stats = 0 files, 0 classes, 0 methods, 0 macros
Time spent : 0.002s
Failed - Exception while handling Haxe completion response: Unexpected token in JSON at position 88
Called from <unknown>.accessSync (node:fs line 250 column 3)
Called from e.accessSync (node:electron/js2c/asar_bundle line 5 column 8277)
Called from <unknown>.exists (/home/HOME/.vscode/extensions/nadako.vshaxe-2.27.0/server/bin/server.js line 1 column 588203)
Called from <unknown>.start (/home/HOME/.vscode/extensions/nadako.vshaxe-2.27.0/server/bin/server.js line 1 column 452216)
Called from <unknown>.restartServer (/home/HOME/.vscode/extensions/nadako.vshaxe-2.27.0/server/bin/server.js line 1 column 282269)
Called from /home/HOME/.vscode/extensions/nadako.vshaxe-2.27.0/server/bin/server.js line 1 column 275532
Called from <unknown>.onDidChangeConfiguration (/home/HOME/.vscode/extensions/nadako.vshaxe-2.27.0/server/bin/server.js line 1 column 267358)
Called from <unknown>.handleNotification (/home/HOME/.vscode/extensions/nadako.vshaxe-2.27.0/server/bin/server.js line 1 column 518353)
Called from <unknown>.handleMessage (/home/HOME/.vscode/extensions/nadako.vshaxe-2.27.0/server/bin/server.js line 1 column 516988)
Called from <unknown>.onData (/home/HOME/.vscode/extensions/nadako.vshaxe-2.27.0/server/bin/server.js line 1 column 520368)
Processing Arguments [--cwd,/path/to/project,-D,display-details,--no-output,build.hxml,--display,{"jsonrpc":"2.0","id":3,"method":"display/package","params":{"file":"/path/to/project/Main.hx"}}]
Defines dce=std,display=1,display_details=1,eval=1,haxe=4.3.0-rc.1,haxe3=1,haxe4=1,haxe_ver=4.300,interp=1,source_header=Generated by Haxe 4.3.0-rc.1,sys=1,target.name=eval,target.sys=1,target.threaded=1,target.unicode=1,true=1
Using signature db64600cc6f8212c6f9dfe154d2e49e4
Display position: /path/to/project/Main.hx: -1--1
Defines dce=std,eval=1,haxe=4.3.0-rc.1,haxe3=1,haxe4=1,haxe_ver=4.300,interp=1,source_header=Generated by Haxe 4.3.0-rc.1,sys=1,target.name=eval,target.sys=1,target.threaded=1,target.unicode=1,true=1
Using signature db64600cc6f8212c6f9dfe154d2e49e4
Display position: ?: -1--1
> Error: Display file does not exist
Stats = 0 files, 0 classes, 0 methods, 0 macros
Time spent : 0.000s
Processing Arguments [--cwd,/path/to/project,-D,display-details,--no-output,build.hxml,--display,/path/to/project/Main.hx@0@diagnostics]
Defines dce=std,display_details=1,eval=1,haxe=4.3.0-rc.1,haxe3=1,haxe4=1,haxe_ver=4.300,interp=1,source_header=Generated by Haxe 4.3.0-rc.1,sys=1,target.name=eval,target.sys=1,target.threaded=1,target.unicode=1,true=1
Using signature db64600cc6f8212c6f9dfe154d2e49e4
Display position: /path/to/project/Main.hx: 0-0
1,evl: changed directories: []
1,evl: Cached 57 modules
Defines dce=std,eval=1,haxe=4.3.0-rc.1,haxe3=1,haxe4=1,haxe_ver=4.300,interp=1,source_header=Generated by Haxe 4.3.0-rc.1,sys=1,target.name=eval,target.sys=1,target.threaded=1,target.unicode=1,true=1
Using signature db64600cc6f8212c6f9dfe154d2e49e4
Display position: ?: -1--1
1,evl: Cached 57 modules
Stats = 0 files, 0 classes, 0 methods, 0 macros
Time spent : 0.003s
Error parsing diagnostics response: Unexpected token in JSON at position 2
It only happens if you trace("Hello World")
because then the output gets messed up... x)
The other problem is probably related to --cwd
in some way.
I made it stop after the first compilation if there's a --display
. That's not very elegant, but if this is what used to happen anyway then it should be fine.
if this is what used to happen anyway then it should be fine.
Well, this is what it looked like at least, because when hovering over define flags they would always have values from the initial build before the --next
. Also, only --cmd
s from the first batch used to run, although now it seems like all --cmd
flags might be ignored during display runs.
But thanks! Completion is working again now. Not sure how I didn't come across this issue earlier...
In Haxe 4.2.5, if the hxml contained
--next
, completion worked normally and it just used the first build found in the hxml.However, with 4.3.0 development builds since 7ebd72bbe61648193d436106f70ae1a298f82b3c, completion/hovering completely fails as soon as there is a --next flag in the hxml that is followed by anything. Here is a sample hxml:
This is the error that shows up in the vshaxe output:
Verbose output: