-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
feat: upgrade core to OCaml 5.2 #1074
Conversation
0a62c17
to
6e160dd
Compare
5b78c15
to
9a172fd
Compare
bbd9fc4
to
c01ef45
Compare
67b27b4
to
dc690bb
Compare
(modules_without_implementation annot)))) | ||
(modules_without_implementation | ||
annot | ||
(:include ../gen/optional_5_2_modules.txt))))) |
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.
this is the reason why we have to bump the dune lang version to 3.13
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.
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 mostly have questions 🙃
@@ -26,6 +26,7 @@ jobs: | |||
# - windows-latest # for some reason windows build is not picking dune 3.5 | |||
ocaml-compiler: | |||
- ocaml-base-compiler.5.1.1 | |||
# - 'ocaml-base-compiler.5.2.0~alpha1' |
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.
Will this be uncommented before 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.
No. The compiler libs submodule is on 5.1 according to the proposal I shared: have melange remain on 5.1 but ready to integrate the 5.2 submodule once OCamlformat and odoc have compatible releases.
@@ -10,6 +10,7 @@ | |||
(* *) | |||
(***********************************************************************) | |||
|
|||
open Melange_compiler_libs |
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.
Why was this needed?
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.
otherwise it doesn't know about coming from Melange_compiler_libs.Unit_info
.
(Unit_info.make ~check_modname:false ~source_file:fname outputprefix | ||
|> Unit_info.cmi) | ||
#else | ||
modulename | ||
(Artifact_extension.append_extension outputprefix Cmi) |
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.
Why can't Artifact_extension
be used in 5.2?
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 signature of the upstream functions changed to take a new Unit_info type
@@ -1903,7 +1903,7 @@ class ['loc] mapper = | |||
updated to override those individually. *) | |||
method function_expression_or_method loc (stmt : ('loc, 'loc) Ast.Function.t) = | |||
this#function_ loc stmt | |||
[@@alert deprecated "Use either function_expression or class_method"] | |||
(* [@@alert deprecated "Use either function_expression or class_method"] *) |
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.
Why?
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.
5.2 errors on these misplaced attributes ocaml/ocaml#12451
Ocaml_common.Location.input_lexbuf := Some lexbuf; | ||
Location.input_lexbuf := Some 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.
I saw these used in Ast_io
too, is this something new that 5.2 requires? And does it affect somehow the older versions?
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.
This is related to ocaml/ocaml#12991
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.
basically if we don't do this, errors won't include source code quotations.
fixes #1071