ocaml-ppx/ppx_import

Does it work with Ocaml5?

Closed this issue · 2 comments

Hey,
I can't get ppx_import to work. If I try in utop:

──────────┬─────────────────────────────────────────────────────────────┬───────────
          │ Welcome to utop version 2.11.0 (using OCaml version 5.0.0)! │
          └─────────────────────────────────────────────────────────────┘

Type #utop_help for help about using utop.

─( 18:15:10 )─< command 0 >──────────────────────────────────────────{ counter: 0 }─
utop # #require "ppx_import";;
─( 18:15:10 )─< command 1 >──────────────────────────────────────────{ counter: 0 }─
utop # type%import pos = Lexing.position;;
Error: Uninterpreted extension 'import'.
─( 18:15:11 )─< command 2 >──────────────────────────────────────────{ counter: 0 }─
utop #

And if I try this in a binary:

type%import position = Lexing.position [@@deriving show]

I get:

File "bin/main.ml", line 6, characters 5-11:
6 | type%import position = Lexing.position [@@deriving show]
         ^^^^^^
Error: optcomp: invalid directive syntax, expected single expression.
keigoi commented

@KnorrFG: possibly related: #89 ?

I completely forgot this issue. The problem was a conflict with some other PPX from jane street that had a dependency that used the same name (judging from my error, I assume optcomp). Without that jane street ppx everything worked fine. Sorry for not reporting that. In the end, I decided that jane street PPX was more important.