ZacSweers / redacted-compiler-plugin

A Kotlin compiler plugin that generates redacted toString() implementations.
Apache License 2.0
391 stars 26 forks source link

Support Unredacted properties and supertype based redaction #210

Closed DrewCarlson closed 6 months ago

DrewCarlson commented 6 months ago

Our team at Block has a use-case in which we'd like to have opt-out behavior for certain classes and a way to enforce that APIs are only provided redacted classes.

I remember similar situations where you've mentioned preferring the limited scope for the library and that maintaining a fork is best, the team wanted to suggest the changes anyway and they may be useful for others to find.

DrewCarlson commented 6 months ago

The K2 compiler fails when @Redacted is applied to an interface. It doesn't provide a useful message and it's not obvious to me what the issue is. We're satisfied with the current state for now, but if you do end up wanting to merge this I can investigate.

DrewCarlson commented 6 months ago

All green now, the K2 branch also passes when rebasing on these changes. Let me know if there is anything missing, I can take care of it tomorrow.