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

Avoid explicit versions in migrate_parsetree_x_y_migrate.ml #88

Closed xclerc closed 4 years ago

xclerc commented 4 years ago

The current sources of the following files use explicit versions numbers for e.g. constructors in conversion functions:

This pull request replaces references to Ast_4?? with references to From/To (which are defined at the top of the files).

This is sounds useless, but makes the aforementioned files consistent with the previous ones, which in turn simplies reviews.

hhugo commented 4 years ago

You could also try to patch https://github.com/ocaml-ppx/ocaml-migrate-parsetree/blob/master/tools/gencopy.ml. It is the tool responsible for generating theses files.

ghost commented 4 years ago

That's a nice change. Agreed with @hhugo that the tool should be patched as well, so that we use the new convention moving forward.