Kotlin 2.2.0 seems to break NavArgs that use TypeAlias
using latest library version (2.2.0)
Having NavArgs:
typealias ProjectLayerId = String?
data class CreateMarkerNavArgs(
val projectId: String,
val preselectedLayerId: ProjectLayerId,
)
since i upgraded to kotlin 2.2.0 and ksp to 2.2.0-2.0.2
it breaks the build bc. generated destination does not pick up the nullability from the typealias
public operator fun invoke(
projectId: String,
preselectedLayerId: String, <-- should be nullable
): Direction {
it works fine when using kotlin 2.1.20 and corresponding ksp (2.1.20-1.0.31)
probably a bug/change in KSP?
ofc the nullability inside the typealias maybe not ideal and should probably be a nullable value class instead - still wanted to report that.
I have the same issue and applying kotlin 2.1.20 and corresponding ksp (2.1.20-1.0.31) doesn't help
Maybe my issue is a bit different:
using latest library version (2.2.0)
Nullable fields in NavAgs that have 'null' value returns a value in the next format string [fieldName] instead of null
I'll raise a separate ticket
any chance we can resolve that problem? still happening for me with 2.3.0 and kotlin 2.2.21
actually, i decided to remove the nullable annotation inside the typealias and make it explicit on call-site - seems anyways the better convention - so not an issue for me anymore