Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems when using for a compose multiplatform project #447

Open
kangwang1988 opened this issue Apr 6, 2023 · 2 comments
Open

Problems when using for a compose multiplatform project #447

kangwang1988 opened this issue Apr 6, 2023 · 2 comments

Comments

@kangwang1988
Copy link

kangwang1988 commented Apr 6, 2023

When using vscode extension for kotlin, I found several problems.

  1. The customized jar dependencies doesn't appear in the project & external dependencies area(left bottom).
    image

  2. There is some error when parsing the kotlin source file: [Error - 1:29:42 AM] org.jetbrains.kotlin.codegen.CompilationException: Back-end (JVM) Internal error: Couldn't inline method call: remember {
    mutableStateOf(null)
    }
    Method: null
    File being compiled: (152,9) in //Users/kylewong/Codes/dx-ng/dxng_playground/src/jvmMain/kotlin/com/taobao/dinamicx/dxng/dxng_playground/ui/DemoMVP.kt
    The root cause java.lang.IllegalStateException was thrown at: org.jetbrains.kotlin.codegen.inline.SourceCompilerForInlineKt.getMethodNode(SourceCompilerForInline.kt:118)
    [Error - 1:29:42 AM] at org.jetbrains.kotlin.codegen.inline.InlineCodegen.performInline(InlineCodegen.kt:63)
    [Error - 1:29:42 AM] at org.jetbrains.kotlin.codegen.inline.PsiInlineCodegen.genCallInner(PsiInlineCodegen.kt:74)
    [Error - 1:29:42 AM] at org.jetbrains.kotlin.codegen.CallGenerator.genCall(CallGenerator.kt:110)
    [Error - 1:29:42 AM] at org.jetbrains.kotlin.codegen.ExpressionCodegen.invokeMethodWithArguments(ExpressionCodegen.java:2759)

  3. The jump to definition doesn't work for external jar even there is a corresponding source.jar

@themkat
Copy link
Collaborator

themkat commented Apr 7, 2023

  1. Don't think support for that on the Kotlin Language Server have ever been implemented... That is only implemented in Java extensions to my knowledge. Unsure if the Java compatbility support extension by @daplf gives some of this as I don't use VSCode. My guess is no.

  2. I would scroll WAY UP in the logs to see if any error messages were printed during dependency resolution instead. That error message doesn't really tell me anything other than that an earlier error or bug with dependencies or compilation happened. If you can share your logs at that level, maybe we can find some interesting info helping us solve the issue 🙂

  3. I have never gotten jump to definitions to work, so my guess is that they don't, or have very limited support within your project. Never use it as I don't rely upon it, even for big codebases.

@daplf
Copy link
Contributor

daplf commented Apr 7, 2023

Hey 👋

Don't think support for that on the Kotlin Language Server have ever been implemented... That is only implemented in Java extensions to my knowledge. Unsure if #4 (comment) by @daplf gives some of this as I don't use VSCode. My guess is no.

Correct. The Java Projects tab is managed by vscode-java. The companion extension I worked on doesn't provide this (and it doesn't need to). If you're not using Java, you probably don't need to worry about that. In any case, as far as I recall, vscode-java supports .gradle.kts files: eclipse-jdtls/eclipse.jdt.ls#1849. Maybe it's a problem on their side, idk.

The jump to definition doesn't work for external jar even there is a corresponding source.jar

Jumping to a definition on an external jar works for maven projects (with some exceptions: #308). For gradle this is not yet implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants