Skip to content

Conversation

@ForNeVeR
Copy link
Collaborator

@ForNeVeR ForNeVeR commented Jan 3, 2026

Rd no longer depends on the Kotlin compiler, since (per #507) this causes problems we don't think are worth solving.

Previously, it was possible to ask rd-gen itself to compile user's .kt or .kts files by providing the compilation classpath and source paths for them (basically all the options you normally pass to kotlinc). So, rd-gen would compile the user's model classes, and then execute them in-place to generate code.

This was instrumental in ye olde times, when we were using rd-gen as part of .NET build.

Not anymore.

This ability was officially deprecated in 2025.3 (it started generating warnings during build), and we are free to remove it in 2026.1.

No internal models (I know of) use this anymore.

How you are supposed to use rd-gen now:

  1. Compile the models using external means (Gradle, JPS, whatever you prefer).
  2. Pass the compiled models' classpath to rd-gen.
  3. rd-gen will invoke them correctly, according to all the other settings.

This approach is documented and widely used in our examples.

So, this removes the following settings:

  • -s, --source
  • -h, --hash-folder (since it was only used for compilation hashing; moreover, it was slow, so we disabled it for internal builds long ago)
  • --compiled
  • --compiler-classpath
  • -f, --force (since it was only used to force re-compilation)

Closes #507 as planned for 2026.1.

@ForNeVeR ForNeVeR requested a review from Iliya-usov January 3, 2026 18:26
@ForNeVeR ForNeVeR marked this pull request as ready for review January 3, 2026 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Get rid of kotlin-compiler-embeddable in rd-gen

3 participants