-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Put Unix.SO_REUSEPORT at the end of data variant #10073
Conversation
Another option, of course, would be to increase the sophistication of the error message even further (so spot that one set of constructors is a subset of the other) |
The error message could be amended, but the two messages seems quite comparable to me. Moreover, fixing the error highlighted in the first message will yield the second error message. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change looks reasonable (and, in particular, correct) to me, and I think that adding new fields at the end is indeed a good practice.
@Octachron - the present message is of course technically correct, but it doesn't lead towards the likely correct remedy (it's reminding me of this joke!). |
The current error message does lead towards the correct remedy even if the user follow it blindly? It is the number of steps required that is suboptimal. And I expect most people to simply resynchronize the re-exported definition rather than trying to fix this error by hand. |
I am happy with the change. Should we have it in 4.12? (I think yes.) |
This needs to be 4.12 or not at all - I think it would be bad to have 4.12 with |
Even though this is breaking change with previous alphas I'm all for this PR. That I can remember, only |
@kit-ty-kate we can release a bugfixed batteries version if needed. No problem. |
Ported to |
Put Unix.SO_REUSEPORT at the end of data variant (cherry picked from commit 6bad570)
Fix OCaml 4.12 support (port breaking change ocaml/ocaml#10073)
In #9869 (comment) I noted that the new
SO_REUSEPORT
should ideally have gone at the end of the variant for vague C compatibility reasons.However, there's another possibly stronger reason and, given that we're still at alpha, I propose we do actually change it. Here's an error message from Lwt, prior to ocsigen/lwt#804 being merged:
which looks much more serious and less obvious than, with this PR:
(cc @kit-ty-kate)