Open mrmr1993 opened 5 years ago
cc @hhugo
Which version of ppx_tools
are you using?
Which version of
ppx_tools
are you using?
5.3+4.08.0
I cannot reproduce this issue
$ echo 'let x = [%expr "test"]' > a.ml
$ ocamlc -c -ppx ~/opam/4.08.0/lib/ppx_tools/ppx_metaquot a.ml -I +compiler-libs -dsource
let x =
{
Parsetree.pexp_desc =
(Parsetree.Pexp_constant (Parsetree.Pconst_string ("test", None)));
Parsetree.pexp_loc = (Stdlib.(!) Ast_helper.default_loc);
Parsetree.pexp_loc_stack = [];
Parsetree.pexp_attributes = []
}
To add to this, I was experiencing the same problem as noted in https://github.com/tizoc/ppx_pgsql/issues/8
Changing the versioned Ast from Ast_406
to Ast_408
fixed the issue.
This is the dual issue of #75:
pexp_loc_stack
,ptyp_loc_stack
,ppat_loc_stack
need to be present code generated by the ppx, but aren't. For example:fails at compile-time with the error
Some record fields are undefined: pexp_loc_stack
.