Closed shonfeder closed 7 months ago
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!
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?
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.
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!
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 7dbaf97f797d127cd6d23aa11863e480febac289 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