$ show JavierSegoviaCordoba/kopy
Kopy is a Kotlin compiler plugin that generates an ergonomic DSL for immutable updates on data classes. It adds `copy`, `set`, `update`, and `updateEach` functions to data classes annotated with `@Kopy`, enabling deep nested property changes without manual `copy` chains. The plugin uses `kotlin.concurrent.atomics.AtomicReference` for thread-safe snapshots and integrates as a Gradle plugin. The codebase is a multi-module Gradle project with a compiler plugin module (`kopy-compiler`), a Gradle plugin module (`kopy-gradle-plugin`), a runtime annotations module (`kopy-runtime`), and a configuration enums module (`kopy-args`). It includes extensive test data for FIR and IR transformations, covering diagnostics, box tests, visibility, inheritance, serialization, and edge cases. The project is actively maintained, with a well-structured architecture and high test coverage.
The LLM identified 2 files worth highlighting for reuse:
Generates JUnit test classes from FIR/IR test data files. This pattern is reusable for any Kotlin compiler plugin that needs to verify generated code against expected output. It reads `.kt`, `.fir.txt`, and `.ir.txt` files and creates parameterized tests, reducing boilerplate and ensuring consistency.
Provides `MeasureStorage` and `measureExecution` utilities for timing compiler plugin phases. This can be extracted as a general-purpose performance measurement helper for any Kotlin compiler plugin, outputting results to report files. Demonstrates non-obvious skill in instrumenting compiler internals.