ocaml-ppx / ppxlib

Base library and tools for ppx rewriters
MIT License
246 stars 98 forks source link

Make -unused-code-warning tests actual tests #492

Closed NathanReb closed 4 months ago

NathanReb commented 4 months ago

In their previous form they were not executed as part of the default build or as part of the runtest alias.

They relied on a deriving_inline workflow which wasn't great for tests and it lacked a bit of context on what was being tested so I converted them to cram tests. It's a bit harder to read the generated code than it was but the whole setup is not spread across 3 different directories anymore and the tests are now documented.

NathanReb commented 4 months ago

I'm not sure what the two_do_warn deriver was there for, maybe to test how the driver behaved with a set of alternating derivers, some where warning must be silenced and some where it must not.

CC @ceastlund maybe you know a bit more about this.