redacted-compiler-plugin

A Kotlin compiler plugin that generates redacted toString() implementations.

APACHE-2.0 License

Stars
381

Bot releases are hidden (Show)

redacted-compiler-plugin - 1.10.0 Latest Release

Published by ZacSweers about 2 months ago

  • Update to Kotlin 2.0.20.
  • Build against Gradle 8.10.

What's Changed

Full Changelog: https://github.com/ZacSweers/redacted-compiler-plugin/compare/1.9.0...1.10.0

redacted-compiler-plugin - 1.9.0

Published by ZacSweers 5 months ago

  • Update to Kotlin 2.0.0 (aka K2). This plugin now assumes 2.0, but can be used with Kotlin 1.9.x as well.
  • Fully implement validation checks in FIR, allowing the plugin to report errors earlier and also (eventually) have errors appear automatically in the IDE.
    • The IR plugin no longer validates by default.
    • At the time of writing, I'm not able to get errors to appear in the IDE even if non-bundled plugins are force-enabled. Follow KTIJ-29248 for more info.
  • The enabled compiler option is no longer required and just defaults to true.
  • Omit the stdlib from transitive dependencies on the compiler plugin and Gradle plugin artifacts. Both kotlinc and Gradle impose their own versions on the classpath.

What's Changed

Full Changelog: https://github.com/ZacSweers/redacted-compiler-plugin/compare/1.8.1...1.9.0

redacted-compiler-plugin - 1.8.1

Published by ZacSweers 6 months ago

  • Allow @Unredacted to be applied to a class, only when a supertype is @Redacted
  • Allow @Redacted supertypes to be inherited by objects, only when the child does not implement a custom toString method
  • Fail compilation when @Unredacted and @Redacted are applied to the same class

Special thanks to @DrewCarlson for contributing to this release!

What's Changed

Full Changelog: https://github.com/ZacSweers/redacted-compiler-plugin/compare/1.8.0...1.8.1

redacted-compiler-plugin - 1.8.0

Published by ZacSweers 6 months ago

  • New: Support for annotating interfaces and non-final classes as @Redacted. In this event, all data/value subclasses will be treated as @Redacted.
  • New: Support for @Unredacted to explicitly opt out of redacting specific properties in otherwise-redacted classes.
    @Redacted
    data class User(
      @Unredacted val name: String,
      val phoneNumber: String
    )
    
    // This will redact `phoneNumber` but not `name`
    // User(name=Bob, phoneNumber=██)
    
  • Update Kotlin to 1.9.23.

Special thanks to @DrewCarlson for contributing to this release!

What's Changed

Full Changelog: https://github.com/ZacSweers/redacted-compiler-plugin/compare/1.7.1...1.8.0

redacted-compiler-plugin -

Published by ZacSweers 11 months ago

  • Update Kotlin to 1.9.21.
redacted-compiler-plugin - 1.7.0

Published by ZacSweers 12 months ago

  • Update to Kotlin 1.9.20. This plugin now requires 1.9.20.
  • Update wasm target to wasmJs.

What's Changed

Full Changelog: https://github.com/ZacSweers/redacted-compiler-plugin/compare/1.6.1...1.7.0

redacted-compiler-plugin - 1.6.1

Published by ZacSweers about 1 year ago

  • Enhancement: Simplify lookup of KotlinCompilation's implementation configuration name in the Gradle plugin when using the default annotation.
  • Update to Kotlin 1.9.0.
  • Build against Gradle 8.3.

What's Changed

Full Changelog: https://github.com/ZacSweers/redacted-compiler-plugin/compare/1.6.0...1.6.1

redacted-compiler-plugin - 1.6.0

Published by ZacSweers over 1 year ago

  • New: Support value class types. Note that only annotating the class is supported, as annotating the property would be redundant.

What's Changed

Full Changelog: https://github.com/ZacSweers/redacted-compiler-plugin/compare/1.5.0...1.6.0

redacted-compiler-plugin - 1.5.0

Published by ZacSweers over 1 year ago

  • Update to Kotlin 1.9.0. This plugin now requires 1.9.0.

What's Changed

Full Changelog: https://github.com/ZacSweers/redacted-compiler-plugin/compare/1.4.0...1.5.0

redacted-compiler-plugin - 1.4.0

Published by ZacSweers over 1 year ago

  • Update to Kotlin 1.8.20. This plugin now requires 1.8.20.
  • [annotations] Mark JS binaries as executable.
  • [annotations] Remove deprecated watchosX86().
  • [annotations] Add wasm target. Note this is experimental and not stable.
  • [annotations] Add androidNativeArm32, androidNativeArm64, androidNativeX86, androidNativeX64, and watchosDeviceArm64 targets.

What's Changed

Full Changelog: https://github.com/ZacSweers/redacted-compiler-plugin/compare/1.3.1...1.4.0

redacted-compiler-plugin -

Published by ZacSweers over 1 year ago

  • Fix: Missing jvmTarget in the annotations artifact. Target is now properly set to Java 11.
  • Update to Kotlin 1.8.10.
redacted-compiler-plugin - 1.3.0

Published by ZacSweers almost 2 years ago

  • Update to Kotlin 1.8.0. This release is only compatible with Kotlin 1.8 or later.
  • Update JVM target to 11.
  • Kotlin JS artifact now only supports IR.
  • Migrate the IR and FIR plugins to new CompilerPluginRegistrar entrypoint API.

What's Changed

Full Changelog: https://github.com/ZacSweers/redacted-compiler-plugin/compare/1.2.1...1.3.0

redacted-compiler-plugin - 1.2.1

Published by ZacSweers almost 2 years ago

This release is primarily under-the-hood changes + extra compile-time checks.

  • [IR] Fail compilation if both class and any number of properties are annotated with @Redacted.
  • [IR] Fail compilation if @Redacted is used in a non-class context.
    • Before it would only check if the class is non-data, but with Kotlin 1.8 introducing data object classes we need to also check that the target type is itself a class.
  • [IR] Fail compilation if a custom toString() function is implemented in a data class using @Redacted.
  • [IR] Harden toString() function declaration matching.
  • [FIR] Promote REDACTED_ON_CLASS_AND_PROPERTY_WARNING to error.
  • Update to Kotlin 1.7.22.

General repo infra

  • Run parameterized tests against both IR and FIR
  • Add more tests for failure cases

What's Changed

New Contributors

Full Changelog: https://github.com/ZacSweers/redacted-compiler-plugin/compare/1.2.0...1.2.1

redacted-compiler-plugin -

Published by ZacSweers about 2 years ago

Experimental support for the new K2 compiler + FIR plugin.

Note this comes with several caveats:

  • No IDE support yet
  • Errors and warnings can't have custom messages yet: KT-53510.
  • Multiple errors and warnings result in only a single error being emitted: KT-54287.
  • K2 compiler itself is extremely experimental.

In short, this is only really to unblock anyone doing their own testing of K2 and don't want this
plugin to disable it. If you see any issues, please file a bug here and disable K2 in your project
in the meantime.

Details on K2 and instructions for enabling it can be found here: https://kotlinlang.org/docs/whatsnew17.html#new-kotlin-k2-compiler-for-the-jvm-in-alpha

Also: update to Kotlin 1.7.20.

redacted-compiler-plugin -

Published by ZacSweers over 2 years ago

Update to Kotlin 1.7.0.

Note that Kotlin 1.7.0 is now the minimum for this version due to breaking API changes in Kotlin IR APIs.

redacted-compiler-plugin -

Published by ZacSweers almost 3 years ago

  • Use implementation instead of api when adding the redacted-compiler-plugin-annotations dependency. #76

Thanks to @gpeal for contributing to this release!

redacted-compiler-plugin -

Published by ZacSweers almost 3 years ago

Stable release!

While Kotlin IR is not a stable API, the public API of redacted-compiler-plugin is. This project will use semver only
for its own API but intermediate versions may only work with specific versions of Kotlin (documented in the changelog).

Changes since 0.10.0

  • Remove remaining obsolete descriptor API usages.
  • Update to Kotlin 1.6.10.
redacted-compiler-plugin - 0.10.0

Published by ZacSweers almost 3 years ago

This release introduces formal support for Kotlin multiplatform!

There are two parts to this:

  • The compiler plugin itself supports all compilation types, not just JVM and Android.
  • The first-party annotations artifact is now multiplatform.

The legacy backend support is now removed, IR is required going forward.

redacted-compiler-plugin -

Published by ZacSweers almost 3 years ago

This is a release candidate with support for Kotlin multiplatform. Please test this out and report any issues.

There are two parts to this:

  • The compiler plugin itself supports all compilation types, not just JVM and Android.
  • The first-party annotations artifact is now multiplatform.

The legacy backend support is now removed, IR is required going forward.

redacted-compiler-plugin -

Published by ZacSweers almost 3 years ago

  • Formal support for Kotlin 1.6. This plugin requires Kotlin 1.6 now.
Package Rankings
Top 22.09% on Repo1.maven.org