Status Update
Comments
ad...@google.com <ad...@google.com>
di...@google.com <di...@google.com>
ni...@hinge.co <ni...@hinge.co> #2
This seems easy to repro. The workaround for now is to either use api(...)
in module B or to let module A also depend on module C.
di...@google.com <di...@google.com> #3
Ahmet, I know that you were doing changes to the runtime classpath calculation. Could this have been impacted by those?
ak...@google.com <ak...@google.com> #4
We haven't landed anything there yet (and probably won't for a while as I'll be on leave)
Nicklas, I see you mentioned it's broken in Iguana and Jellyfish. Did it used to work with Hedgehog? It would help us narrow down the issue. If you don't know, I can give it a go too.
da...@gmail.com <da...@gmail.com> #5
IIRC It never worked in previous version. I had the issue forever
ni...@hinge.co <ni...@hinge.co> #6
I thought it had worked before HH, but I can't say for sure. It's broken in all versions after HH however.
ni...@hinge.co <ni...@hinge.co> #7
Any updates on this? This is extremely annoying to deal with.
xa...@google.com <xa...@google.com> #8
Jerome, can you re-assign and re-prioritize since Ahmet is out for a while. (also this seems more important than P3)
je...@google.com <je...@google.com>
am...@google.com <am...@google.com> #9
I thought it had worked before HH, but I can't say for sure. It's broken in all versions after HH however.
This was working in Giraffe according to
Ivan pointed out the issue could be related with
am...@google.com <am...@google.com> #10
Bumping the priority due to the number of affected users. Bingran, if after investigating you realize this is not caused by a change on the Project System side, please change the component back and bounce the issue back to us. Thanks!
bi...@google.com <bi...@google.com>
bi...@google.com <bi...@google.com> #11
- The problem is introduced in a change between H alpha04 - H alpha05 because alpha04 works and alpha05 doesn't work. I verified it with the project provided in
. P1 seems to be appropriate as it is confirmed to be a regression.b/320001476 - Ifb02f2dca686b06412de21a87659d5c3ca9cf594(the one mentioned in
) is in that range so we should start investigate with that one.comment #9 - I tried to revert Ifb02f2dca686b06412de21a87659d5c3ca9cf594 with tip of tree but got some errors to build. So I am not 100% sure that is the root cause.
Amaury, I am assigning it back to you because it is more likely to be related to a change on your side.
am...@google.com <am...@google.com>
am...@google.com <am...@google.com>
ni...@ansman.se <ni...@ansman.se> #12
What version is this fix targeting?
am...@google.com <am...@google.com> #13
What version is this fix targeting?
This is targeting Jellyfish
an...@google.com <an...@google.com> #14
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Koala | 2024.1.1 Canary 3
- Android Gradle Plugin 8.5.0-alpha03
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
an...@google.com <an...@google.com> #15
The fixes for this issue are now also available in:
- Android Studio Jellyfish | 2023.3.1 RC 1
- Android Gradle Plugin 8.4.0-rc01
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
ni...@hinge.co <ni...@hinge.co> #16
This issue has not been fully fixed, I opened a new issue for it here:
Description
A -> B -> C where they depend on each other in order using an `implementation` scoped dependency.
Module B provides a composable function that uses a composition local from module C.
If module A does not have an explicit dependency on module C, attempting to preview something that uses this composable function from B in module A leads to the preview failing to render with a `ClassNotFoundException` for the class referenced in module C.
It looks something like this:
```
// Module A
@Composable
@Preview
fun PreviewStuff() {
PreviewContent { ... }
}
// Module B
@Composable
fun PreviewContent(content: @Composable () -> Unit) {
CompositionLocalProvider(LocalStuff provides stuff) {
content()
}
}
// Module C
object LocalStuff {
private val LocalStuff = compositionLocalOf< Stuff?> { null }
val current: Stuff
@Composable
get() = LocalStuff.current
?: findStuff()
infix fun provides(stuff: Stuff): ProvidedValue<Stuff?> = LocalStuff(stuff)
}
```
------------------
Studio Build: Android Studio Iguana | 2023.2.1 Beta 1 (also happens on Jellyfish canaries)
Version of Gradle Plugin: 8.2.1
Version of Gradle: 8.5
Version of Java: 21
OS: macOS Sonoma 14.2