ocaml-ppx / ppx_tools

Tools for authors of ppx rewriters
MIT License
134 stars 39 forks source link

OCaml 4.11 support #82

Closed kit-ty-kate closed 4 years ago

kit-ty-kate commented 4 years ago

Port work from @rwmjones. See https://github.com/ocaml-ppx/ppx_tools/issues/81

Here two points I'm not so sure about:

kit-ty-kate commented 4 years ago

By ~weird error message~fails to parse several things, I meant mainly:

File "dumpast.ml", line 35, characters 12-33:
35 |     inherit [_] Ast_lifter.lifter as super
                 ^^^^^^^^^^^^^^^^^^^^^
Error: Unbound class Ast_lifter.lifter

It seems that somewhere it tries to parse [_] Ast_lifter.lifter, and only Longident.parse is able to parse this successfully.

rwmjones commented 4 years ago

I'm afraid I don't know the answer to any of these questions either :-(

Octachron commented 4 years ago

I will have a look, but the argument of inherit is a class expression, trying to parse it as a Longident is bound to fail.

Octachron commented 4 years ago

The source of the error is in fact the cons functions in ast_convenience that are using the internal name "::" for the constructor (::).

gasche commented 4 years ago

Who has commit rights here and can decide to merge this PR or a similar PR? I don't, and I don't actually know who does. (cc @Drup who I believe did merge a PR a while back.)

kit-ty-kate commented 4 years ago

I have, I'll make a release soon. I just wanted to deal with packages that depend on ppx_tools first

kit-ty-kate commented 4 years ago

All good now. Sorry for the delay