Are you saying you use package-less imports to work around the lack of type resolution to know definitively from which package a type exists?
e
evanchooly
08/23/2021, 3:13 PM
no, i'm parsing sources with properties of type
Double
so that's all the parser has to work with. same with, say,
MutableList
. Trying to correctly map those packageless types to the correct autoimported types is ... not 100%
evanchooly
08/23/2021, 3:14 PM
i have a good enough solution in place where I can 'backfill' those packages and emit the correct imports but it would be nicer to not import at all and let kotlinc autoresolve those types.
evanchooly
08/23/2021, 3:14 PM
but that would break the ksp use case in that issue.
evanchooly
08/23/2021, 3:15 PM
i think having an explicit
addImport
for those ksp types would be less ambiguous but, again, changing now would break things.
evanchooly
08/23/2021, 3:16 PM
so i've gone with the whitelist route where I can map packageless types to known autoimported types with a mechanism to add to that list for types i haven't explicitly mapped. it's not perfect but probably good enough and doesn't require any changes outside of kibble.
evanchooly
08/23/2021, 3:17 PM
i'm ok with that, i think. at least for now until i see corner cases i've missed. 😄