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

ppx_metaquot cannot generate expressions with 4.08.0 #77

Open
mrmr1993 opened this issue Jul 22, 2019 · 5 comments
Open

ppx_metaquot cannot generate expressions with 4.08.0 #77

mrmr1993 opened this issue Jul 22, 2019 · 5 comments

Comments

@mrmr1993
Copy link

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:

let x = [%expr "test"]

fails at compile-time with the error Some record fields are undefined: pexp_loc_stack.

@kit-ty-kate
Copy link
Collaborator

cc @hhugo

@kit-ty-kate
Copy link
Collaborator

Which version of ppx_tools are you using?

@mrmr1993
Copy link
Author

Which version of ppx_tools are you using?

5.3+4.08.0

@hhugo
Copy link
Contributor

hhugo commented Jul 24, 2019

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 = []
  }

@tizoc
Copy link

tizoc commented Dec 9, 2019

To add to this, I was experiencing the same problem as noted in tizoc/ppx_pgsql#8

Changing the versioned Ast from Ast_406 to Ast_408 fixed the 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