google / google/ksp

Issues while migrating a project from Kapt to ksp when using Generics `Entity` for Room DB

Open
#2,700 2 comments 0 reactions 0 assignees View on GitHub
P4
Dominant language
Kotlin
Stars
3.5k
Forks
415
Avg merge
1d 2h
Merged PRs (30d)
53

Description

Hi there,

I am facing an issue when migrating a `kapt` Room DB project to `ksp`.

Project uses Generics for `Entity`. Compilation fails as KSP does not recognize generic type correctly.

Here is the [link](https://github.com/dennymat/roomproject) to sample github project.

Branches:

`main` : This uses KAPT processor. No issues compiling

`dennym/migrate-to-ksp`: This attempts a migration to KSP processor. Compilation fails for using generic types. This can be seen in the compiled DAO impl file.

Library versions:

```
kotlin = "2.2.21"
ksp = "2.2.21-2.0.4"
coreKtx = "1.17.0"
room = "2.8.3"
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.