Ignore extensions inside attributes for the unused extension check #616
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.