ocaml-ppx / ocaml-migrate-parsetree

DEPRECATED. See https://ocaml.org/changelog/2023-10-23-omp-deprecation. Convert OCaml parsetrees between different major versions
Other
87 stars 43 forks source link

ocaml-migrate-parsetree 2.0.0 #101

Open ghost opened 4 years ago

ghost commented 4 years ago

This is a meta issue to track the progress towards ocaml-migrate-parsetree 2.0.0, a new major release that simplify ocaml-migrate-parsetree to its core functionality: the parsetree type definitions + the migration functions.

Todo:

Et7f3 commented 4 years ago

release ocaml-migrate-parsetree 2.0.0 is done.

is their some guide how to update omp < 2 to 2.0.0 for instance Migrate_parsetree.Ast_408 can be used instead of removed Migrate_parsetree.Ast.OCaml_408. I see that outcometree is not versionned anymore (grep -ri outcometree . nor find . -iname "outcometree*" showed me the presence of this module). Outcometree is not in ppxlib neither. I have read https://discuss.ocaml.org/t/ocaml-migrate-parsetree-2-0-0/5991 and haven't see any mention of this. This is the blocker to update reason

pitag-ha commented 2 years ago

@Et7f3 , I've just come across this comment. How has that developed in the end? Has it been possible to port reason?

anmonteiro commented 2 years ago

@pitag-ha we haven't ported reason to ppxlib, instead for 4.13 we ended up maintaining that snapshot for a vendored version of OMP1.

Last time I looked at porting Reason to ppxlib there was heavy usage of the Outcometree and Ast_mapper modules which are not versioned by ppxlib.

pitag-ha commented 2 years ago

Ok, I see. Thanks for answering! One possibility to use ppxlib might be to use one of the Ast_traverse classes which let you traverse the AST similarly to how OMP1 does but in a versioned way; and for interacting with modules that aren't versioned like Outcometree, you could use To_ocaml to convert your AST types to the compiler version types, use Outcometree on there and convert back. Have you tried that already?