I'm trying to understand the impact of this line m...
# compose
v
I'm trying to understand the impact of this line missing from a module that should've had this enabled? The previews stop working but I suspect that even recomposition and everything else that the Compose compiler does should be impacted by it? Before I go down the rabbit hole, I figured it would be wise to check here if someone had a clear answer for this already. On a related note, I wish this wasn't a silent failure.
Copy code
buildFeatures {
  compose = true
}
m
It is important for tooling to work, previews are one part of this and things like Layout Inspector are impacted as well by this but it shouldn't impact the way compiler or runtime works. There was a previous discussion about this: https://kotlinlang.slack.com/archives/CJLTWPH7S/p1717057006656189?thread_ts=1717055774.450989&cid=CJLTWPH7S
P.S: worth mentioning that in the near feature this flag won't be needed anymore
s
This line adds a compose compiler dependency and sets up source information, I think Probably tooling is also enabled based on this value as well, likely that's what you see.
Right now you need to have it enabled even though you add compose compiler plugin for it to work correctly. We are working on removing this requirement at some point, but it is a bit hard because of AGP/Kotlin versioning disparities
v
Interesting. So if this didn't exist, what else should've technically been broken in that module apart from the tooling piece? Are you suggesting that Compose compiler doesn't do the right thing without it? Just trying to figure out the right way to articulate it
s
source information flag is off, so layout inspector and other features that rely on source information won't work