Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Language server hangs due to duplicate --connect flags #10813

Closed
tobil4sk opened this issue Oct 3, 2022 · 5 comments
Closed

Language server hangs due to duplicate --connect flags #10813

tobil4sk opened this issue Oct 3, 2022 · 5 comments
Assignees

Comments

@tobil4sk
Copy link
Member

tobil4sk commented Oct 3, 2022

To reproduce:

haxe -v --wait 6000 
haxe --connect 6000 --connect 6000

The second --connect arg is passed onto the server, causing it to hang. This is the output before it becomes unresponsive:

Client connected
Reading 49 bytes

Processing Arguments [--cwd,/path/to/project/,--connect,6000]

This is a common situation, as --connect 6000 might be found in an hxml file, as is common for lime projects. As a result, everything breaks: openfl/lime-vscode-extension#93

This is only an issue on nightly, not on 4.2.5 (or any commit before #10629). There the server doesn't hang, and it simply outputs:

Client connected
Reading 49 bytes

Processing Arguments [--cwd,/path/to/project,--connect,6000]
 0,  x: Cached 0 modules
Stats = 0 files, 0 classes, 0 methods, 0 macros
Time spent : 0.000s

@Simn this seems to have broken after your rework of how args are handled between the frontend and the server: #10629

@Simn
Copy link
Member

Simn commented Oct 3, 2022

Interesting! I didn't account for duplicate --connect. It's a bit of a special case because it's supposed to send all subsequent arguments elsewhere.

@Simn
Copy link
Member

Simn commented Nov 1, 2022

I have fixed this, but I don't know how to add a test for this right now because we usually abstracts away all the --connect business.

@tobil4sk
Copy link
Member Author

tobil4sk commented Nov 2, 2022

My issue has been solved now, thanks!

@Simn
Copy link
Member

Simn commented Nov 7, 2022

Oh well, in this case we can live without a test, I'm sure someone will quickly notice if we ever break this again for some reason.

@Simn Simn closed this as completed Nov 7, 2022
@tobil4sk
Copy link
Member Author

tobil4sk commented Nov 7, 2022

Well, it was quite hard to figure out this was the root cause of my issue, but yes hopefully now that the path of issues has been laid out from the vscode lime extension repository it should be fairly easy for someone to figure out. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants