Feedback for strong skipping: I can't annotate a `...
# compose
y
Feedback for strong skipping: I can't annotate a
@Composable
lambda parameter with
@NonSkippableComposable
, which is causing a lambda that I know shouldn't be skipped to be skipped. The alternative seems to be `inline`ing.
b
We actually had that ability originally but removed it. Why do you think the lambda is being skipping incorrectly though?
y
I'm purposefully using
currentRecomposeScope
to invalidate some places. I'm running a custom composition to produce values out of, so I expect to be able to invalidate it when I want, but if the values being produced are
Unit
, it doesn't get invalidated in the right places. Now thinking about it, I really shouldn't have the expectation that every composable I want to run will actually run. Not sure if you can answer this, but would using
ControlledComposition
be the right approach here? I can't find any good docs about it, but I want something like
invalidateAll
because my Composables have intentional side-effects. This is a very niche use case, I know, but is there a supported way? If you're curious, I'm using Compose to create delimited continuations, and it works pretty well, except when it doesn't lol!
Okay, here's my final question to simplify all this: is there a way to opt-out a class from strong-skipping? I want the class to always be considered unstable, and thus to never, ever, be compared even by reference. One way of doing this now is marking as
Stable
and overriding
equals
to always return false, but that feels hacky. Maybe an explicit
@Unstable
annotation could be conceptually simple enough?
b
Slightly confused about what you are trying to achieve sorry. There is no way to opt out a class currently but would
@NonRestartableComposable
work for your lambda?
@shikasd might be able to help with controlled composition
s
@Composable
lambda is always restartable, the groups are hardcoded in runtime. I am also confused about what you are trying to achieve here, so might need more context to help. Ideally, you won't be using
currentRecomposeScope
for invalidation and rely on states instead.