Skip to content

[Bug potential] Wrap Marker/type names with(out) fully qualified path in class to prevent bugs #198

@Jolanrensen

Description

@Jolanrensen

Across the library, the names of types are usually stored as String. This can include things like:
MyMarker
com.something.MyMarker
but also
<TypeA, MyMarker> (typeArguments)
<T : TypeA, R : com.something.MyMarker> (typeParameters)
and all are simply stored as String.

This, however, can create unforeseen bugs, such as #170 where some nested interface that should be referred to as `My Type`.MyInterface is referred to as My Type.MyInterface, breaking code generation.
It's also not clear whether an argument called name stores a type with periods or not. Sometimes it's accompanied with shortName meaning name is fully qualified. Other times it's accompanied with fqName meaning name is a short name...

My suggestion is to either create a one-size-fits-all typing solution where ` quotes can be provided in any part of the type name, or use a library like KotlinPoet that can do it for us.

We already have a similar thing for ValidFieldName, but not for the types yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    researchThis requires a deeper dive to gather a better understanding

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions