-
Notifications
You must be signed in to change notification settings - Fork 176
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 support for OCaml 4.12 #804
Conversation
Thanks a lot for the patch. I'm not sure about adding |
@raphael-proust That has been the way to test on OCaml pre-releases historically. See, for example, https://github.com/ocsigen/lwt/blob/81fa268b93e334498301b6b12074e0b626f61f45/.travis.yml. There's no issue with that being in |
That makes sense. Travis is failing because |
This is a known issue with current trunk. Here are the relevant fix in ocaml-ci-scripts (ocaml/ocaml-ci-scripts@3368e6a) and in ocaml itself (ocaml/ocaml#9798) |
CI will continue to fail until There is no rush for now, I'm keeping this branch in opam-alpha-repository for testing purpose anyway for those who want to test packages depending on lwt quickly. I'll remove 8fddc16 when all the required dependencies will be available to trigger the CI and at that point it might be ready to merge. I'll make it a draft in the meantime. |
@kit-ty-kate One more option is to use Lines 26 to 33 in 81fa268
|
what I was wondering, why does Lwt_unix copy the definition of these sum types from Unix? Can't it simply do a type alias instead (and this way not care about changes in future OCaml versions)? |
I think the original intent might have that it let's people use the constructors directly after doing a We could change it but that's a breaking change. |
@raphael-proust I see what you mean, sorry for the noise. Please go ahead with this very fine PR. |
ocaml-ci is now testing 4.12 too. Feel free to add https://github.com/apps/ocaml-ci if you want to test with that (make sure to select only the |
ocaml-ci added to lwt |
4.12 fails with
|
All green |
Not blocking this PR, but |
This function is exported and most importantly: deprecated. I don't think it's worth changing the interface of a deprecated function. I'm guessing it will be removed in a future major release anyway. |
Bah thanks, I was merging |
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.
I'm ready to merge this after addressing CI nits.
- <<: *opam | ||
os: linux | ||
env: COMPILER=4.09.0 DOCS=yes | ||
env: COMPILER=4.09.1 DOCS=yes |
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.
Can you tweak the rows in allow_failures
, so that it recognizes the 4.09 row again? We should also add 4.10 and 4.12 to allow_failures
. Travis is set up to require on Linux the least and greatest OCaml release that we test (4.02.3 and 4.11.1, respectively, in this PR), and the rest are in allow_failures
so that we can get build feedback faster if Travis has a build backlog.
.travis.yml
Outdated
@@ -165,15 +165,21 @@ scripts: | |||
|
|||
matrix: | |||
include: | |||
- <<: *opam | |||
os: linux | |||
env: COMPILER=4.12.0+trunk REPOSITORIES=--repo=default,beta=git://github.com/ocaml/ocaml-beta-repository.git |
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.
I suggest using the 4.12 alpha release at this point.
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.
I would argue against. In my experience running +trunk
is more stable than running any ~alpha
/~beta
. The changes are slow and rather incremental. If something is done in the 4.12
branch and break something here then it should be reported / fixed. But again, in my experience, once branched out, the alpha/beta branches are quite stable and contain bug fixes that are not in the ~alpha
/~beta
releases.
If that can help you I could add it to the allow_failures
list though.
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.
I agree with your argument, thanks. I think it does belong in allow_failures
for how the Lwt CI is set up.
…eleased dune 2.8.0)
All three CIs are now green. |
… check to use OCaml 4.11
Thanks! |
ocaml/ocaml#9869 added
Unix.SO_REUSEPORT
and made Lwt not compile with OCaml 4.12. This PR fixes the issue.