You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While using [@@deriving show] on a not-so-small-ish AST (~ 100 type declarations with a large clump of 60 mutually recursive types), I see that switching from ppx_deriving 5.2.1 to 6.0.3 resulted in massive increase of the code size after preprocessing.
With a ppx_deriving 5.2.1, there's rougly a ×3 file size increase, but with 6.0.3 it's more like ×100 and then the OCaml compiler fails with a stack overflow. In the output I see that many pretty-printing functions are repeated multiple times.
It's unclear to me if I'm using the annotations incorrectly, or using the ppx incorrectly.
(I'll try to come up with a repro case.)
The text was updated successfully, but these errors were encountered:
Oh OK, I understand, that's because I have a deriving annotation on every typedef in a mutually recursive type definition:
typetutu =
| VARIANT1
| VARIANT2oftutu
[@@deriving show]
and toto =
{ fielda : bool;fieldb : tutu
}
[@@deriving show]
I wasn't aware the annotation was only needed on one of the typedefs.
Still, the redundant annotations were harmless in ppx_deriving 5.2.1. Is this intended ?
While using
[@@deriving show]
on a not-so-small-ish AST (~ 100 type declarations with a large clump of 60 mutually recursive types), I see that switching from ppx_deriving 5.2.1 to 6.0.3 resulted in massive increase of the code size after preprocessing.With a ppx_deriving 5.2.1, there's rougly a ×3 file size increase, but with 6.0.3 it's more like ×100 and then the OCaml compiler fails with a stack overflow. In the output I see that many pretty-printing functions are repeated multiple times.
It's unclear to me if I'm using the annotations incorrectly, or using the ppx incorrectly.
(I'll try to come up with a repro case.)
The text was updated successfully, but these errors were encountered: