HaxeFoundation / HaxeFoundation/haxe

Completion completely broken with --next in hxml

Open
#11,067 6 comments 0 reactions 0 assignees View on GitHub
test-needed
Dominant language
Haxe
Stars
6.9k
Forks
715
Avg merge
2d 2h
Merged PRs (30d)
11

Description

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:

```hxml
-main Main
--interp
--next
-main Main
--interp
```

This is the error that shows up in the vshaxe output:

```
[Error - 16:14:47] Request textDocument/hover failed.
Message: {"jsonrpc":"2.0","id":8,"result":{"result":{"documentation":null,"range":{"start":{"line":53,"character":31},"end":{"line":53,"character":38}},"item":{"kind":"Literal","args":{"name":"\"db.db\""},"type":{"kind":"TInst","args":{"path":{"pack":[],"moduleName":"String","typeName":"String","importStatus":0},"params":[]}}},"expected":{"type":{"kind":"TInst","args":{"path":{"typeName":"String","moduleName":"String","pack":[]},"params":[]}}}},"timestamp":1680275687.207117}}Error: Display file does not exist
Code: -32603
```

Verbose output:
```
Processing Arguments [--cwd,/path/to/project,-D,display-details,--no-output,interp.hxml,--display,{"jsonrpc":"2.0","id":29,"method":"display/hover","params":{"file":"/path/to/project/Test.hx","contents":"function main() {\n\ttrace(\"hello world\");\n}","offset":29}}]
Defines dce=std,display=1,display_details=1,display_stdin=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/Test.hx: 29-29
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, 1 classes, 1 methods, 0 macros
Time spent : 0.002s
[Error - 16:23:58] Request textDocument/hover failed.
Message: {"jsonrpc":"2.0","id":29,"result":{"result":{"documentation":null,"range":{"start":{"line":1,"character":7},"end":{"line":1,"character":20}},"item":{"kind":"Literal","args":{"name":"\"hello world\""},"type":{"kind":"TInst","args":{"path":{"pack":[],"moduleName":"String","typeName":"String","importStatus":0},"params":[]}}},"expected":{"type":{"kind":"TDynamic","args":null},"name":{"name":"v","kind":0,"doc":null}}},"timestamp":1680276238.053253}}Error: Display file does not exist
Code: -32603
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.