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

add --wait stdio #5188

Merged
merged 2 commits into from
May 1, 2016
Merged

add --wait stdio #5188

merged 2 commits into from
May 1, 2016

Conversation

nadako
Copy link
Member

@nadako nadako commented May 1, 2016

This PR adds support for --wait stdio argument which makes haxe completion server use stdin and stderr instead of sockets for communication.

This solves a number of annoying problems for IDE, for example:

  • multiple instances of an IDE don't need to somehow determine a free port to use for a new haxe server
  • we don't need to care about other programs already listening to the port we'd like to use for haxe
  • when starting haxe server as a subprocess, we don't need to wait/retry connecting to the server and can invoke queries right away without any race conditions (e.g. https://github.com/nadako/haxe-languageserver/issues/7)

The protocol is the following:

  • everything is binary
  • ide sends queries to stdin, haxe replies to stderr
  • ide and haxe exchange messages consiting of two parts: data length (4 byte little-endian int) and data
  • data is the same as with socket - newline separated hxml argumens and optional stdin display file content, (separated by \x01).

@nadako nadako added enhancement feature-ide IDE / Editor support labels May 1, 2016
@nadako
Copy link
Member Author

nadako commented May 1, 2016

Should work with this branch of the language server: https://github.com/nadako/haxe-languageserver/tree/wait_stdio

@nadako
Copy link
Member Author

nadako commented May 1, 2016

On a related note, I wonder if we should run our display tests in all possible flavors (simple cmdline, socket server, stdio server).

@Simn Simn merged commit bc61e42 into HaxeFoundation:development May 1, 2016
@nadako nadako deleted the wait_stdio branch May 1, 2016 19:53
@SlavaRa
Copy link
Member

SlavaRa commented Oct 26, 2017

@nadako Maybe you'll update the help in the compiler?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement feature-ide IDE / Editor support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants