Will we get some automatic migrations from K1 to K...
# k2-adopters
e
Will we get some automatic migrations from K1 to K2? Or it is not feasible
j
What do you mean?
e
Like improved type inference (one of examples https://victorbrandalise.com/using-kotlin-2-0-for-android-development/)
👍 1
k
The article looks dubious. None of the mentioned changes are 2.0 specific. Context receivers were introduced as experimental a while ago. The type inference example works in 1.9 and kotlinx.coroutines is a library that has its own release schedule.
e
I'm not expert about type inference difference between 2.0 and 1.9. The original question was - if all these inferences known and writable in some migration rules that our IDE can run.
k
There aren't that many type inference differences between K1 and K2. But generally, anything that's redundant (redundant type argument, redundant cast after smart cast) will be marked by the IDE with an inspection. You will need to use K2 Mode. This will however mark all the stuff, not just stuff that's new with K2. So if your code base was free of inspection warnings before the switch, you can just run "Analyze code" and will see everything that's become obsolete.
e
Clear, and not my project case - we have way many warnings
k
The good thing is that you don't need to do any of this. It shouldn't make a difference to the compilation result.
e
True, just any time I modify/open such file I will get IDE suggestions to improve that usually distracts me
Also I keep "cleanup" check box on commit and it will make the noise changes in this case (probably)
t
You can run cleanup on whole project as part of migration on K2 😉
c
> Also I keep "cleanup" check box on commit and it will make the noise changes in this case (probably) Then you don't need to do anything. When you are in K2 mode, and you commit, IntelliJ will remove everything that was necessary beforehand but that K2 is now able to infer itself.
1