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

Build failure with OCaml 4.14.0 #121

Open pterjan opened 2 years ago

pterjan commented 2 years ago

Trying to build 2.3.0 I get this error:

$ dune build -j16
File "tools/gencopy.ml", line 147, characters 60-74:
147 |         List.map2 (fun s t -> (t.id, evar s.txt)) params_in td.type_params
                                                                  ^^^^^^^^^^^^^^
Error: This expression has type type_expr list
       but an expression was expected of type transient_expr list
       Type type_expr is not compatible with type transient_expr 
pterjan commented 2 years ago

I have no idea why but building with --release works, so I'll do that

pitag-ha commented 2 years ago

Thanks for reporting! It seems like in 4.14 the compiler Types.type_expr was made abstract. We'll need to adapt ocaml-migrate-parsetree to that next time we generate a new ast module. As you've already found out that shouldn't be a problem for using ocaml-migrate-parsetree though:

I have no idea why but building with --release works, so I'll do that

Yes, that works: gencopy is only used as an internal tool by us, so with --release, dune doesn't build it.