Note:
codegen-java does the same for stateless classes, but it also makes them non-instantiable.
codegen-kotlin generates stateless regular classes far less often than codegen-java.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/apple/pkl/pull/714
**Author:** [@odenix](https://github.com/odenix)
**Created:** 10/20/2024
**Status:** ✅ Merged
**Merged:** 10/24/2024
**Merged by:** [@bioball](https://github.com/bioball)
**Base:** `main` ← **Head:** `codegen-abstract`
---
### 📝 Commits (3)
- [`498a21a`](https://github.com/apple/pkl/commit/498a21aab20eea12321642be4ac66b70257011e9) codegen-kotlin: Don't generate equals/hashCode/toString/copy/:Serializable for abstract classes
- [`0f85eb1`](https://github.com/apple/pkl/commit/0f85eb1ac8aa6288ef369cccb31c2977f570b774) Polish KotlinCodeGeneratorTest
- [`a7936f5`](https://github.com/apple/pkl/commit/a7936f5b640ae475486cd03dadbe14e646dc3112) Overhaul KotlinCodeGeneratorTest
### 📊 Changes
**2 files changed** (+858 additions, -776 deletions)
<details>
<summary>View changed files</summary>
📝 `pkl-codegen-kotlin/src/main/kotlin/org/pkl/codegen/kotlin/KotlinCodeGenerator.kt` (+8 -7)
📝 `pkl-codegen-kotlin/src/test/kotlin/org/pkl/codegen/kotlin/KotlinCodeGeneratorTest.kt` (+850 -769)
</details>
### 📄 Description
Motivation:
Don't generate code that isn't useful.
Changes:
- Don't generate equals/hashCode/toString/copy methods for abstract classes.
- Don't make abstract classes serializable.
Result:
- Less code is generated.
- Fixes #713.
Note:
codegen-java does the same for stateless classes, but it also makes them non-instantiable.
codegen-kotlin generates stateless regular classes far less often than codegen-java.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/apple/pkl/pull/714
Author: @odenix
Created: 10/20/2024
Status: ✅ Merged
Merged: 10/24/2024
Merged by: @bioball
Base:
main← Head:codegen-abstract📝 Commits (3)
498a21acodegen-kotlin: Don't generate equals/hashCode/toString/copy/:Serializable for abstract classes0f85eb1Polish KotlinCodeGeneratorTesta7936f5Overhaul KotlinCodeGeneratorTest📊 Changes
2 files changed (+858 additions, -776 deletions)
View changed files
📝
pkl-codegen-kotlin/src/main/kotlin/org/pkl/codegen/kotlin/KotlinCodeGenerator.kt(+8 -7)📝
pkl-codegen-kotlin/src/test/kotlin/org/pkl/codegen/kotlin/KotlinCodeGeneratorTest.kt(+850 -769)📄 Description
Motivation:
Don't generate code that isn't useful.
Changes:
Result:
Note:
codegen-java does the same for stateless classes, but it also makes them non-instantiable.
codegen-kotlin generates stateless regular classes far less often than codegen-java.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.