Skip to content
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

Support for OCaml 4.06 #8

Open
cyrus- opened this issue Oct 4, 2018 · 7 comments
Open

Support for OCaml 4.06 #8

cyrus- opened this issue Oct 4, 2018 · 7 comments

Comments

@cyrus-
Copy link
Owner

cyrus- commented Oct 4, 2018

That's the most recent release of the compiler. How hard would this be? Can we use the OCaml preprocessor to simultaneously support different versions of Typedtree in the same repository? Might depend on #7.

@charlesetc
Copy link
Collaborator

Reason just started supporting OCaml 4.07 so it should be somewhat easy to move... actually supporting both 4.07 and 4.08 is harder. I don't think it depends on #7 necessarily but they probably have similar solutions... choosing to compile different code in a PPX depending on the ocaml version?

@cyrus-
Copy link
Owner Author

cyrus- commented Oct 5, 2018

Does Typedtree change a lot between 4.06 -> 4.07 -> 4.08?

If so, a simple solution would be to use cppo in places where we need the code to be different. You can do stuff like this:

#if OCAML_VERSION >= (4, 0, 6)
(* All is well. *)
#else
  #error "This version of OCaml is not supported."
#endif

@charlesetc
Copy link
Collaborator

Yeah I think I'd rather use ppx_optcomp so we don't have to introduce tooling to work with another kind of preprocessor. I'm not sure what the actual changes are, but apparently making something like ocaml-migrate-parsetree for typed trees is much harder as they tend to change much more between versions.

@cyrus-
Copy link
Owner Author

cyrus- commented Oct 6, 2018

Ah yeah that looks better, we should use that.

@charlesetc charlesetc changed the title Support for OCaml 4.07.1 Support for OCaml 4.06 Nov 3, 2018
@charlesetc
Copy link
Collaborator

We support 4.07 now! But to get 4.06 working we'll likely need to use ppx_optcomp.

@YonaHope
Copy link

Newbie here, working with reasonreact...
Is keeping in line with the latest OCaml compiler for bucklescript of any concern?
They seem to be going for 4.06.x, which should be coming up soon.

@charlesetc
Copy link
Collaborator

Hey! Sorry it's taken a while to respond. Commit cacd325 is still on 4.06 so you could try checking that out when Bucklescript is ready. It's a little hard to change master to support both 4.06 and 4.08. If there ends up being a lot of interest in using Relit with Bucklescript specifically I'd be happy moving it to 4.06 for a while.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants