It seems that currently [@@deriving ..] annotations are not being removed after the preprocessing.
This behavior causes issues for staged preprocessing since ppx_deriving will generate an error (instead of a warning) for unsupported derivation type.
I'm hitting this problem in a project that firstly preprocess the source code with ppx_deriving.std in the first stage, then preprocess with melange.ppx in the second stage. Since melange.ppx uses ppx_deriving internally, the second stage gives the following error:
Error: Ppxlib.Deriving: 'show' is not a supported type deriving generator