rd-gen: get rid of runtime dependency on the Kotlin compiler #575
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
.ktor.ktsfiles by providing the compilation classpath and source paths for them (basically all the options you normally pass tokotlinc). 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:
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.