Ignore extensions inside attributes for the unused extension check
This means ppxlib doesn't emit a warning for code like `[@attr [%ext]]`.
Previously, it would warn that `[%ext]` wasn't translated, however this
is essentially always not the desired behaviour; the ppx that interprets
the attribute will be called before the one that interprets the
extension (assuming context free ppxes) so the attribute handling will
have to handle the extension itself. If the attribute substitues the
extension into generated code the warning will still trigger if that
substituted extension point isn't expanded.
I'm slightly nervous this will cause weird errors if you put extensions
inside the payload of builtin attributes, however I don't think there
are any that can have an extension in their payload so it's probably fine.
Signed-off-by: Jack Rickard <jrickard@janestreet.com>
37c0ed
-
Dec 10 12:20 +00:00