By mistake, working on Composables with similar na...
# compose
p
By mistake, working on Composables with similar names I didn't notice a recursive call. The App crashed and the only thing in the logs was AndroidRuntimeException and the composable class name printed thousands times. I could detected after some time and also noticed that AS puts a little recursive icon in the line but too subtle in my opinion. Is there a way to detect recursive calls in Composables or having an exception message that indicates it.
l
It would be possible to detect this at runtime by creating an exception object, and getting the stacktrace, but creating an exception object takes non-negligible time. You can also have the same function name with different params in java, but I don't think Stack traces distinguish this.
p
I see, I would be fine with intelliJ/AS having a more dramatic icon, at least for compose. That will be easier for the eyes to pick up. It happened passing down the same ViewModel from parent to children Composables that consume same VM. Is in a playground app that I used to test compose stuff but could happen as well when children composable input parameter match the same type of the parent input