-
Notifications
You must be signed in to change notification settings - Fork 31
feat: support kotlin redacted plugin #1594
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR integrates the Kotlin Redacted Plugin into Elide, adding support for redacting sensitive data in Kotlin classes through annotations. The implementation adds new annotations (elide.annotations.Secret and elide.annotations.Cleartext) and enables automatic redaction of fields marked with these annotations in toString() output.
- Adds redaction feature configuration to Kotlin build settings with default enabled state
- Integrates Redacted plugin into the embedded Kotlin compiler with built-in support
- Creates new annotations for marking secret and cleartext fields in data classes
Reviewed Changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/tooling/src/main/pkl/Kotlin.pkl | Adds redaction configuration option to Kotlin feature settings |
| packages/tooling/src/main/kotlin/elide/tooling/project/manifest/ElidePackageManifest.kt | Adds redaction field to KotlinFeatureOptions data class |
| packages/tooling/src/main/kotlin/elide/tooling/jvm/JvmLibraries.kt | Adds Elide module coordinates and redacted plugin version constants |
| packages/graalvm-kt/src/main/kotlin/elide/runtime/gvm/kotlin/KotlinCompilerConfig.kt | Implements redacted plugin configuration for embedded Kotlin compiler |
| packages/builder/src/main/kotlin/elide/tooling/kotlin/KotlinCompiler.kt | Registers redacted plugin components in Kotlin compiler services |
| packages/builder/src/main/kotlin/elide/tooling/jvm/JvmBuildConfigurator.kt | Adds Elide core modules to classpath and enables serialization by default |
| packages/base/src/commonMain/kotlin/elide/annotations/Secret.kt | Defines Secret annotation for marking sensitive data |
| packages/base/src/commonMain/kotlin/elide/annotations/Cleartext.kt | Defines Cleartext annotation for overriding redaction |
| packages/cli/src/projects/ktjvm/src/main/kotlin/sample/main.kt | Sample code demonstrating redaction functionality |
| packages/cli/src/projects/ktjvm/src/test/kotlin/sample/testGreeting.kt | Tests for redaction and serialization features |
Comments suppressed due to low confidence (1)
packages/tooling/src/main/kotlin/elide/tooling/jvm/JvmLibraries.kt:57
- The constant name
ELIDE_COREmaps todev.elide:elide-base-jvmwhileELIDE_BASEmaps todev.elide:elide-core-jvm. This naming is inconsistent and confusing - the constant names should match their actual Maven coordinates.
public const val ELIDE_CORE: String = "dev.elide:elide-base-jvm"
packages/builder/src/main/kotlin/elide/tooling/jvm/JvmBuildConfigurator.kt
Show resolved
Hide resolved
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1594 +/- ##
=======================================
Coverage ? 39.73%
=======================================
Files ? 780
Lines ? 37118
Branches ? 5244
=======================================
Hits ? 14748
Misses ? 20602
Partials ? 1768
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Summary
Adds annotations (
elide.annotations.Secretandelide.annotations.Cleartext) and integrates them with the Kotlin Redacted Plugin by @ZacSweers; ships Elide's annotations as built-ins, and activates both Redacted and Kotlin Serialization as default built-in plugins.corebasetestkotlin { redaction = true/false }toelide.pklktjvmprojectktjvmprojectUsage
Given:
elide build && elide runproduces: