ocaml-migrate-parsetree
ocaml-migrate-parsetree copied to clipboard
Does not compile with multicore-ocaml
Currently investigating why it does not build with multicore-ocaml trunk.
This is the error message
File "src/ast_406.ml", line 237, characters 2-1773:
Error: This variant or record definition does not match that of type
Parsetree.pattern_desc
Fields number 17 have different names, Ppat_effect and Ppat_extension.
Any help would be appreciated. Thanks!
Got it. The compiler is trying to build the ast_406.ml, but multicore has changed the parsetree. Will try to fix it.
If you change the AST in the compiler, you will also need a separate branch of ocaml-migrate-parsetree with the modified AST. You might need that as well for other projects such as ppxlib and maybe individual ppx rewriters as well.
@anmolsahoo25 I am hitting this error with Multicore OCaml 4.10.0 when building with dune-2.5.1:
# File "src/ast_410.ml", lines 248-303, characters 2-44:
# Error: This variant or record definition does not match that of type
# Parsetree.pattern_desc
# Constructors number 17 have different names, Ppat_effect and Ppat_extension.
Any suggestions for a fix? This package is a pre-requisite to build js_of_ocaml-compiler.3.6.0. Thanks!
The only possible explanation I can think of is that the Multicore branch modified the parsetree. If that's the case, then there is nothing omp can do.
We only add a single effect
keyword into the language. Would it be practical to write a transformer that would convert from the multicore AST in to the conventional one? No ppxes actually use or generate the effect keyword, so we'd just want to 'downgrade' to the conventional OCaml AST so that existing ppxes work.
That seems complicated with the current OMP. Perhaps it will be easier once we have OMP2. But really, once we have Astlib that should become quite easy.
Hi, tried to migrate to multicore ocaml and got the message
# Error: This variant or record definition does not match that of type
# Parsetree.pattern_desc
# Constructors number 17 have different names, Ppat_effect and Ppat_extension.
I guess this is the same issue?