Skip to content

Interaction with other ppx rewriters in 1.3.1 #164

@emillon

Description

@emillon

Hello,

I hit a regression with bisect_ppx. 1.2.0 works, but when using 1.3.1 we now have a build error.

I reduced the following test case:

# _tags
true: package(ppx_deriving.std)
true: package(ppx_bin_prot)
true: package(bisect_ppx)
(* test.ml *)
module type EQ = sig
  type t [@@deriving eq]
end
(* test.mli *)
module type EQ = sig
  type t [@@deriving eq]
end

(build with ocamlbuild -clean && ocamlbuild -use-ocamlfind test.byte)

Using bisect_ppx.1.3.0, ppx_deriving.4.2.1 and ppx_bin_prot.v0.9.0, this fails with the following error:

File "_none_", line 1:
Error: eval expected
Command exited with code 2.

Some remarks:

  • removing the package(bisect_ppx) line fixes it
  • removing the package(ppx_bin_prot) changes the error to Unrecognized [@@deriving] annotation syntax (note that this module does not use it it)
  • removing the interface file fixes it
  • this works with 1.2.0 and not with 1.3.1. I bisected it down to 8fe184c.

It seems that it's a new bug in the exclusion mechanism, maybe triggered by strange locations emitted by these ppx rewriters.

Let me know if I can be of further help.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions