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

Does not compile with multicore-ocaml #89

Open
anmolsahoo25 opened this issue Jan 10, 2020 · 7 comments
Open

Does not compile with multicore-ocaml #89

anmolsahoo25 opened this issue Jan 10, 2020 · 7 comments

Comments

@anmolsahoo25
Copy link

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!

@anmolsahoo25
Copy link
Author

anmolsahoo25 commented Jan 10, 2020

Got it. The compiler is trying to build the ast_406.ml, but multicore has changed the parsetree. Will try to fix it.

@ghost
Copy link

ghost commented Jan 13, 2020

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.

@shakthimaan
Copy link

@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!

@ghost
Copy link

ghost commented Jun 22, 2020

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.

@avsm
Copy link

avsm commented Jun 22, 2020

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.

@ghost
Copy link

ghost commented Jun 22, 2020

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.

@Termina1
Copy link

Termina1 commented Jul 20, 2021

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?

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

4 participants