xoangon
10/20/2023, 3:15 PMAbstractComposeView
in a lot of places, thus having more than one call to setContent
.
The thing is, if we forget to set the `CompositionLocal`s in any of those, we end up with a crash at runtime with a stack trace that's way far from explicit (full stack trace in this Google Issue Tracker report)
I'd like to hook into any call to setContent
and provide a meaningful error if those implicit dependencies are not provided. Is there a way to do this?
If that's not feasible, I may consider some type of lintStylianos Gakis
10/20/2023, 3:53 PMinternal val Foo = staticCompositionLocalOf<Foo> {
error("Foo not provided")
}
Would that be sufficient for you here?xoangon
10/20/2023, 4:37 PMStylianos Gakis
10/20/2023, 4:41 PMxoangon
10/20/2023, 4:55 PMStylianos Gakis
10/20/2023, 5:01 PMxoangon
10/20/2023, 5:02 PMmyanmarking
10/21/2023, 8:57 PM