-
Notifications
You must be signed in to change notification settings - Fork 412
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
[ocaml] Fix compilation with 4.09.0 #2342
Conversation
This seems fairly strange, it seems 4.09.0 has somehow modified its `let` generalization rules?
@@ -28,7 +28,6 @@ let make_watermark_map ~name ~version ~commit = | |||
match Opam_file.get_field opam_file name with | |||
| None -> Error (sprintf "variable %S not found in opam file" name) | |||
| Some value -> | |||
let err = Error (sprintf "invalid value for variable %S in opam file" name) in |
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.
What about let err () = ...
? That would avoid the duplication
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 can do that, but likely we should drop this PR and see if this is fixed upstream.
PR for trunk testing coming soon.
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.
Yep, waiting a little bit to see how it plays out upstream seems good
octachron said this is a bug with OCaml: ocaml/ocaml#8779 |
To be clear, it's not really a bug it's a change in unspecified behaviour. Hiding a cmi file is only partially supported and that is what is causing the problem here. |
To sum up a discussion we had yesterday with @aalekseyev, @lpw25 and @trefis: Dune is currently providing an Such a change would make this feature more robust, with the disadvantage that we would loose the speedup provided by the current implementation of |
Let's merge this now. We can always revert it if the compiler patch is merged and included in 4.09. @ejgallego could you sign your commit? |
I applied Jeremie's fix instead. |
Sounds good, thanks folks! |
1 similar comment
Sounds good, thanks folks! |
I'm much afraid that the build is still broken in 4.09, this time in |
Another instance of what is detailed in ocaml#2342 ; until ocaml#2298 is fixed I guess we'll have to live with commits like this.
Another instance of what is detailed in ocaml#2342 ; until ocaml#2298 is fixed I guess we'll have to live with commits like this. Signed-off-by: Emilio Jesus Gallego Arias <e@x80.org>
Another instance of what is detailed in ocaml#2342 ; until ocaml#2298 is fixed I guess we'll have to live with commits like this. Signed-off-by: Emilio Jesus Gallego Arias <e+git@x80.org>
This seems fairly strange, it seems 4.09.0 has somehow modified its
let
generalization rules?I will follow up with a PR for adding 4.09 support to the CI [while we discuss this one]