Hi! I just added `androidx.compose.runtime` (with ...
# compose
d
Hi! I just added
androidx.compose.runtime
(with NO other changes to the code base and NO extra added dependencies) to my app and enabled the compose compiler and suddenly pressing the back button from one fragment doesn't allow the fragment it's going back to to load properly... is this a known bug?
­čĄö 1
g
Are you working on Android 13? (looks like predictive back gesture related)
d
The device I'm using is api level 28 --- but the compileSdk is 33
And nope, I don't seem to have that enabled
@Ian Lake Sorry to bother you, but any idea what this can be? It's a real big blocker for our current migration to compose which is already well under way.
i
File an issue against Compose with a minimal sample project that reproduces your issue if you think the Compose Runtime is doing something weird
d
I don't think I'm the first one to use the nav component with compose dependencies... I'm just wondering if this is some configuration issue. What does the compose runtime/compiler change that might be messing up the backstack?
i
Absolutely nothing, hence why a minimal sample project would be helpful
d
I guess there's no easy workarounds in the meanwhile then... I currently have a deadline, and this is really getting things stuck. I wouldn't mind opening an issue after having finished the work I have before the deadline.
Or maybe a way I could pinpoint the problem to get to some workaround. Like I said, setting setPopUpTo in NavOptions when calling navigate() works... (I'm using safeArgs kotlin --- maybe it's getting messed up there?), but then I'd need to manage the backstack myself, I guess.
i
I think without seeing your code in a project, I don't think anyone can figure out what workarounds might work to a problem only you are experiencing.
I'd look at the dependencies report and see if including the Compose Runtime is upgrading one of your other dependencies (fragments, etc) and try that upgrade independently first
d
Ok, that's an idea, thanks!
It seems to have been because of kotlinx.synthetics... once I migrated to ViewBinding, it started working....!
It seems like the compose compiler gets confused about synthetics.... this should REALLY be pointed out in the migration to compose docs, I wasted about three days on this issue... @Ian Lake