Question on remote development

I watched the video (https://www.youtube.com/watch?v=T2VvY6kgALY) and start my journey to split the plugin, looks an interesting activity.

I’ve few question on “best practice” or at least avoid some rookie mistake:

  1. Call on external API: my plugin use Gitlab API, my guts feeling says that should be in the client side, to avoid double hop and maybe less proxy/firewall issue in corporate environments
  2. I’ve my implementation of VFS that proxy what is on Gitlab remote repository, mainly for diff and other things, in which module should be?
  3. I cannot find the package com.intellij.collaboration.ui.codereview.editor and in general the full collaboration packages, which module declare it? And should be frontend or backend? I think about heavy on UI, but maybe I’m wrong

Thanks a lot in advance for the support

I’m almost able to have my plugin running in remote way, the main issue I’m facing right now is that I cannot understand how to declare external dependency, I’ve them in the gradle plugin like this:

dependencies {
  intellijPlatform {
    intellijIdea(libs.versions.intellij.platform)
    bundledModules(
    listOf(
        “intellij.platform.frontend”,
        “intellij.platform.tasks”,
        “intellij.platform.collaborationTools”,
        “intellij.platform.vcs.impl”
        )
    )
    bundledPlugins(
        listOf(
            “com.intellij.platform.images”,
            “org.intellij.plugins.markdown”,
        )
   )
    compileOnly(libs.kotlin.serialization.core.jvm)
    compileOnly(libs.kotlin.serialization.json.jvm)
    runtimeOnly(libs.kotlin.reflect) {
        exclude(group = “org.jetbrains.kotlin”)
    }
    api(libs.bundles.resilience4j) {
            exclude(group = "org.jetbrains.kotlin")
            exclude(group = "org.jetbrains.kotlinx")
            exclude(group = "org.slf4j")
        }
  }
}

While I can see the dependencies at compile time I cannot see them at runtime leading to ClassDefNotFoundException
I try to move also outside the intellijPlatform (that was the first attempt) with no changes at all.

If I’m not mistaken, that’s explained in the 4th item at Questions on V2 plugin descriptor - #3 by nik

You either create an empty module with “loading=embedded” and then declare a dependency on it.
Or (if you feel rested) setup your Gradle build to inline the dependency into the module jar at lib/my.module.jar. That’s what I did, but only because I had to make my own Gradle plugin for my LSP client library.

1 Like

Will check if I can do something with gradle, linking/shading all the transitive dependency.

Just marked the frontend module embedded make it working, but not really sure about the implication of it.
In addition in the documentation about remote development says that at the moment embedded should be considered for internal use only and not to use (see Modular Plugins (Experimental) | IntelliJ Platform Plugin SDK).

So now I get the answer 4 and why is needed an embedded module with only the dependencies, this because if you declare the frontend embedded load on both sides and the communication between frontend and backend doesn’t work, but with a 4th module this problem is solved.