I'm trying to use some ppx extensions, and I just found out that OCaml emits no warning for unused/invalid attributes. E.g., if I write something like:
let[@blaa] () = ()
Even with -w +A
, OCaml will not say anything about the fact that @blaa
is never used, and possibly mistyped.
This is especially frustrating when trying to use a ppx rewriter and mistyping a given attribute (e.g. @blaa
instead of @bla
), and having no way to find out about it. Or when a given ppx rewriter has never been enabled at all, and all attributes are just being silently ignored.
Is there a way to enable warnings for such situations?
Note: I tried it with both 4.03.0 and 4.04.0, and in both cases didn't get any warnings.