-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[OTP 26] Unexpected conversion when transferring data over stdout #7132
Comments
I got curious about this so I dug a bit in the code to figure out why this is happening. Before 26, the tldr. With the 26 shell there is no way to send raw bytes to stdout. Maybe it would be a good idea to change |
@rickard-green @frazze-jobb Is this something you plan to address before the official OTP 26 release? |
As a context - this is right now breaking eqWAlizer, so we'd like to understand if we need to find some workarounds to support OTP 26 |
This does not seem to be simple, I will not be able to address this before the OTP 26 release. |
This is unfortunate, as various tools may break because of this. As Michał suggestd, the EqWAlizer type checker (used to type check OTP itself, as far as I know) will not work under OTP 26 without modifications. The same may be true for other tools communicating via In my opinion this should at least be marked as a potential incompatibility at: https://www.erlang.org/docs/24/general_info/upcoming_incompatibilities.html#otp-26 |
@robertoaloi @michalmuskala #7211 will most likely be merged into master prior to the release of OTP 26 |
It looks like the same problem is affecting reading from raw stdin. ElixirLS is not able to correctly read LSP and DAP protocol messages on OTP26-rc.3. I haven't tested master with #7211 yet but reading the code I assume that only stdout case was fixed |
Under OTP 26-RC3, an unexpected conversion (latin1 to unicode?) seems to be happening behind the scenes when transferring data via stdout. I put together a minimal reproducible example showing the issue:
https://github.com/robertoaloi/otp-26-stdout/
The repo is made of two tiny escripts: a client and a server. Upon request, the server sends EETF encoded data to the client via stdout. This works under OTP 25, but the data seems corrupted on OTP 26-RC3.
Please refer to the README for how to run the sample code, but essentially this is what happens:
OTP 25:
OTP 26:
Things I tried (which didn't help):
io:setopts
configuration{minor_version, 1}
andterm_to_binary/2
(due to the UTF8 encoding of atoms by default in OTP 26)What could explain the inconsistency?
The text was updated successfully, but these errors were encountered: