-
Notifications
You must be signed in to change notification settings - Fork 177
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
string/bytes (apparent?) inconsistency in Lwt_unix.io_vector and Lwt_unix.recv_msg #594
Comments
Agreed. If we break this, we might want to go all the way and switch to the new I/O vectors. Haven't looked into the detailed implications of that, though. lwt/src/unix/lwt_unix.cppo.mli Lines 377 to 422 in de3257e
|
I searched opam and GitHub, and found the following repos using
Of these, only obus and xcp-idl are in opam. @avsm, @hannesm, @let-def, @Freyr666, @pmetzger, (and @mseri) what do you think about Lwt breaking lwt/src/unix/lwt_unix.cppo.mli Lines 921 to 925 in 4e592eb
they take the newer lwt/src/unix/lwt_unix.cppo.mli Lines 321 to 325 in 4e592eb
which is used by We could create |
fine with me, haven't worked on ike for quite some time (and will adapt once i find time to work on it again).. |
@aantron Regarding |
@aantron fine with me too. |
The exposure in xapi-project to this function is minimal. I would support changing the API and to fix the clients. (ping @edwintorok) |
I'd be happy to update the xapi related repos to the new API, thanks for the heads up.
…On 6 August 2019 12:45:20 BST, Christian Lindig ***@***.***> wrote:
The exposure in xapi-project to this function is minimal. I would
support changing the API and to fix the clients. (ping @edwintorok)
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#594 (comment)
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
|
I assume you're asking me about obus because it's in ocaml-community. I've not hacked on it before but it seems doable. @Freyr666 might have an opinion on that. |
Thanks, all! I'll ping here again when there is some action that can be taken on this issue, with information. It will be after the 4.3.0 release (which you can ignore), and again after 5.0.0, so you don't have to track Lwt closely on your end :) |
4.3.0 has just been released, preparing for making this breaking change in Lwt 5.0.0 in November 2019 (in three months). If you'd like a soft upgrade path, you can replace calls to lwt/src/unix/lwt_unix.cppo.mli Lines 930 to 933 in 705a206
now by calls to lwt/src/unix/lwt_unix.cppo.mli Lines 1505 to 1507 in 705a206
...and likewise for If you do so, add the constraint This is completely optional, and part of the reason for having the soft upgrade path is to be able to put a deprecation message, to notify users we may not be aware of. In any case, when Lwt 5.0.0 is released, we will put the proper constraints on packages already in opam, so you don't have to worry about that. I'll ping this issue again when 5.0.0 is out, and close it. |
The attached commit switched the functions in |
Lwtr_unix.io_vector
carriesstring
s, that since ocaml 4.06.0, default to immutable structures. Howeverrecv_msg
will record the responses into those strings, treating them effectively asbytes
.I just had a brief look at the code, without entering into any details, but shouldn't we avoid considering strings as mutable buffers? It seems to me that this compiles fine only because at the c interface level
bytes
andstring
are interchangeable. I think it would be worth to break the compatibility and make theseio_vector
s use abytes
buffer instead of astring
buffer.The text was updated successfully, but these errors were encountered: