About that Android Studio Narwhal to Otter upgrade...
I guess this will teach me not to upgrade software at night before a weekend.
An upgrade to Android Studio Otter popped up in the notifications yesterday. It actually has a feature I wanted, support for Backup & Sync of IDE settings, so I clicked on the update. Android Studio downloaded it and restarted.
Then I saw that lots of Jetpack Compose state variables were flagged in the IDE with the “Assigned value is never read” warning. On the surface, these variables do look like they are assigned but never again used within the block. However, they are actually delegates and we are using the side effect of assigning to these variables. In Jetpack Compose, a typical effect is to recompose part of the UI when a state variable changes.
These spurious warnings seem to be related to this reported issue. We'll have to wait for the release of Kotlin 2.3. The fix (not producing that warning when the assignment occurs in a non-inline lambda) is already available in the 2.3 beta but the Kotlin team won't be backporting it to Kotlin 2.2.
In the meantime, I'll just turn off that particular warning in Android Studio settings.