-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression test for incorrect behavior when deriving on mutually recursive types #273
Regression test for incorrect behavior when deriving on mutually recursive types #273
Conversation
Co-authored-by: panglesd <peada@free.fr>
Co-authored-by: panglesd <peada@free.fr>
This reverts commit 4c9178c.
Tests behavior when deriving on mutually recursive types ocaml-ppx#272
Just to clarify what the bug is and what is the expected fix. What happens here is that it tries to derive make for all types which it can't. What you would like instead is that it would only derive make for the type declarations in the recursive type decl that have the [@@deriving make] right? |
It would be good to have expect tests there instead, that way we could have merged this PR with a green CI and update the test along with the bug fix. I'll look into merging #263 once the 5.02 compat in ppxlib is dealt with and will come back to this afterward! Sorry for the delay! |
That's right. It's deriving for declarations which are not annotated, which then breaks when these are underivable. Instead, it should only derive for declarations that are annotated. |
No worries! I am not blocked by this. |
We finally merged #263 so I'll be able to look into this properly. Thanks for your patience @shonfeder ! |
I'm closing this as I added your test as part of #281 ! Thanks reporting and reproducing this bug! |
Adds a regression test for #272
Note that is this on top of #263 and only 7dbaf97 is relevant currently.
During the ppxlib dev meeting, @pitag-ha and @NathanReb asked me to see if #263 would fix the problem here. The failing test here unfortunately demonstrates that it does not fix the problem as is:
See https://ocaml.ci.dev/github/ocaml-ppx/ppx_deriving/commit/7dbaf97f797d127cd6d23aa11863e480febac289/variant/alpine-3.19-4.14_opam-2.1#L238-241