-
Notifications
You must be signed in to change notification settings - Fork 430
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
Minimal changes to compile with OCaml 4.07 #2013
Conversation
We should probably update the ci to test 4.07 😄 |
Definitely! Is that something you'd like to have in this PR or a separate one? I'm not sure how to approach that since utop is not ready for 4.07 yet. |
And should we add 4.07.0+rc1 now or wait for the final 4.07.0 release? |
@@ -0,0 +1,3 @@ | |||
let warn_latin1 lexbuf = |
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.
They changed this again in 4.07?
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.
No change vs 4.06. This is just a copy of the 4.06 file as a quick hack to allow the build to complete with minimal changes. select.ml
should eventually be updated to handle this rather than duplicating this code for every new version of OCaml. I unfortunately haven't had time to make such an update.
Thank you. Would you mind adding the relevant CI to this PR? After it's merged, I can revert that portion of it, but then as soon as utop is fixed, I'll just unrevert it. |
@jordwalke Thanks for reviewing! I've added separate commits for CircleCI and Travis. These checks could remain and be updated when the final 4.07.0 release lands once they're working properly. Travis should have the utop pin removed once ocaml-community/utop#238 lands in a utop release. It should also be updated to the 4.07.0 switch once 4.07.0 is released. CircleCI would only need to have the utop pin removed. The ocaml/opam2 docker image used in that config should be automatically updated to the latest 4.07.x point release as they come out. |
Is the comment formatting test failure on Travis expected? I just pushed an update to pin to utop's I'm happy to squash these commits when the PR is ready if you'd prefer that. |
Hmm the comment failure is not expected. I can probably investigate, if you don't have the time, but it'll be next week. If you rebase on master you'll have to add a new file |
@IwanKaramazow If you have time to look at this I'd appreciate it. It'll be a little while before I can come back to work on this more. |
I'll see what I can do |
@IwanKaramazow Now that 4.07.0 is official - do you want to finish this up or should I? Aside from rebasing and adding the file you mentioned (#2013 (comment)) do you know if there there is anything else left to do? |
89d6eaa
to
d4a5b50
Compare
Rebased on There is a still a formatting test failure in
|
4.07 support has been merged into its master branch.
f4578da
to
5aa1534
Compare
I just rebased this on master and investigated the failure. Here's the difference ( $ echo '(** docstring *)' | refmt --parse ml -past
[]
$ echo '(** docstring *)' | ./_build/install/default/bin/refmt --parse ml -past
[
structure_item ([1,0+0]..[1,0+16])
Pstr_attribute "ocaml.text"
[
structure_item ([1,0+0]..[1,0+16])
Pstr_eval
expression ([1,0+0]..[1,0+16])
Pexp_constant PConst_string(" docstring ",None)
]
] |
So the issue here is in 4.07 OCaml parses |
Maybe related to ocaml/ocaml#1693 |
Yes, the parsing behaviour has changed on the ocaml side. A specific test with the behaviour for 4.07 makes sense here (I think) |
Thank you for picking this up @anmonteiro! |
3ac838f
to
0d9f27f
Compare
I think this is ready now. Can I get an approval? @IwanKaramazow @jordwalke @chenglou |
Thank you all very much for collaborating on this to get it ready! I look forward to using this. |
This is a bit of a hack and won't really scale across lots of OCaml versions. It builds with OCaml 4.07.0+rc1 though, so it at least unblocks other testing against the soon-to-be latest OCaml release.
If you want to build
rtop
you'll also need ocaml-community/utop#238 (or a better equivalent allowingutop
to build under 4.07).