ocaml-migrate-parsetree icon indicating copy to clipboard operation
ocaml-migrate-parsetree copied to clipboard

Build failure with OCaml 4.14.0

Open pterjan opened this issue 2 years ago • 2 comments

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 avatar May 19 '22 17:05 pterjan

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

pterjan avatar May 19 '22 19:05 pterjan

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.

pitag-ha avatar May 30 '22 18:05 pitag-ha