compose-multiplatform icon indicating copy to clipboard operation
compose-multiplatform copied to clipboard

No Sources in Multiplatform

Open GazimSoliev opened this issue 1 year ago • 2 comments

Describe the bug No Sources in Multiplatform, IDE can'r find them

Affected platforms Select one of the platforms below:

  • All

If the bug is Android-only, report it in the Jetpack Compose tracker

Versions

  • Kotlin version*: 1.9.21
  • Compose Multiplatform version*: 1.5.11
  • OS version(s)* (required for Desktop and iOS issues): Arch Linux
  • OS architecture (x86 or arm64): x86
  • JDK (for desktop issues): 17

To Reproduce Steps and/or the code snippet to reproduce the behavior: Look sources

Expected behavior See sources

Screenshots image image

GazimSoliev avatar Jan 31 '24 07:01 GazimSoliev

Hello! I can't reproduce that. Could you please provide information about reproducing the issue, step by step?

mazunin-v-jb avatar Jan 31 '24 11:01 mazunin-v-jb

I have the same problem after apply org.jetbrains.compose plugin in shared project. Add a dependency e.g. implementation(compose.material3) to commonMain. Then open MyApplicationTheme.kt in androidApp, from there open MaterialTheme composable on line 49 with Command+Click. That will reproduce this bug.

Here is the demo project https://github.com/daoenpan/kmp-bugreport

I use Android Studio Hedgehog | 2023.1.1 Patch 2

daoenpan avatar Feb 03 '24 19:02 daoenpan

I'm facing the same issue. I created a project through the Kotlin Multiplatform Wizard web page. When I add, for example,

@Composable
fun Foobar() {
    Text("Foo")
}

to a file under androidMain and click go to definition on the Text function, it will show the sources of Text composable. But if I add Foobar under commonMain and go to definition of Text from there, I get IntelliJ API Decompiler stub source generated from a class file.

Is it possible to access the sources from commonMain somehow?

ktkahkon avatar Mar 10 '24 11:03 ktkahkon

I get the source on Android Studio Iguana | 2023.2.1

MindWing-net avatar Mar 14 '24 07:03 MindWing-net

Hello! I can't reproduce that. Could you please provide information about reproducing the issue, step by step?

Now it's working in commonMain, but it doesn't work for specific target for example desktopMain (aka jvmMain)

GazimSoliev avatar Mar 25 '24 20:03 GazimSoliev