arrow-kt / arrow-meta-examples

Some examples for Λrrow Meta the functional companion to Kotlin's Compiler & IDE.
Apache License 2.0
58 stars 20 forks source link

Adds ide plugin #19

Closed i-walker closed 3 years ago

i-walker commented 4 years ago

This subproject can't access descriptors of the ide part of Meta, because there is no published version users can add in:

// build.gradle
intellij {
    version '2019.3.3'
    pluginName = "My Ide Plugin"
    plugins = ["io.arrow-kt.arrow"]
}

thus the following doesn't work either:

<!--plugin.xml-->
<idea-plugin>
  <!--.. other dependencies-->
 <depends>io.arrow-kt.arrow</depends>
</idea-plugin>

Both of the aformentioned changes are remaining to create a hello world plugin.

rachelcarmena commented 4 years ago

This subproject can't access descriptors of the ide part of Meta, because there is no published version users can add in:

// build.gradle
intellij {
    version '2019.3.3'
    pluginName = "My Ide Plugin"
    plugins = ["io.arrow-kt.arrow"]
}

thus the following doesn't work either:

<!--plugin.xml-->
<idea-plugin>
  <!--.. other dependencies-->
 <depends>io.arrow-kt.arrow</depends>
</idea-plugin>

Both of the aformentioned changes are remaining to create a hello world plugin.

We still have a snapshot version in Arrow Meta so we're using a snapshot repository: https://meta.arrow-kt.io/idea-plugin/snapshots/1.3.61-SNAPSHOT/updatePlugins.xml

As soon as we have a release version, we can publish the plugins on official places: Jetbrains Plugin Repository in this case.

i-walker commented 4 years ago

Agree. But I would not merge this until we have an EAP or release version, because folks would expect an Ide example using Meta. Maybe we can publish an experimental EAP of some sort. What do you think?

rachelcarmena commented 4 years ago

Agree. But I would not merge this until we have an EAP or release version, because folks would expect an Ide example using Meta. Maybe we can publish an experimental EAP of some sort. What do you think?

It can be an option, however, I don't think if I understand the purpose of this plugin and the difference with the IDEA plugin that can be installed now...

i-walker commented 4 years ago

The ide plugin that is proposed here is the one developers use to define their own Meta ide plugins, with the DSL. They depend on the one, which is in Arrow Meta.

i-walker commented 4 years ago

Unfortunately, a published snapshot is not enough for the IntelliJ Platform, to include the dependency in their classpath. https://www.jetbrains.org/intellij/sdk/docs/basics/plugin_structure/plugin_dependencies.html

rachelcarmena commented 4 years ago

The ide plugin that is proposed here is the one developers use to define their own Meta ide plugins, with the DSL. They depend on the one, which is in Arrow Meta.

The Hello World example for the Compiler Plugin shows how to create another compiler plugin with the Hello World plugin.

I think I was expecting the same here: how to create an IDEA plugin from Arrow IDEA plugin + Hello World Plugin.

However, I've seen a difference: Compiler Plugin doesn't include Hello World plugin and IDEA Plugin already includes Hello World plugin. What if Hello World plugin is removed from IDEA Plugin and then is included here to show how it works?

i-walker commented 4 years ago

That's an option, we can explore. Though the same issue remains, which was raised here https://kotlinlang.slack.com/archives/CJ699L62W/p1581883669083900.

Redrield commented 4 years ago

Is there any timeline for when it'll be possible to make arrow IDE plugins?

i-walker commented 4 years ago

Excuse our late response @Redrield . We're setting up a 47 account for a Plugin registry to publish the library, so that we can resolve the dependency error's we currently have, for plugin developer depending on Meta.

We will announce this in a public channel once that is done. From there I'll be adding a few examples and Docs.

rachelcarmena commented 4 years ago

@i-walker , mate, this commit is removing necessary files. They are independent projects. On the other hand, SHADOW_JAR_VERSION=5.2.0ide-plugin could be removed because it's not being used.

i-walker commented 4 years ago

Yes, they should be dependent so that users can publish either their compiler-plugin separately or the ide-plugin with the compiler plugin.

rachelcarmena commented 4 years ago

Yes, they should be dependent so that users can publish either their compiler-plugin separately or the ide-plugin with the compiler plugin.

The Idea plugin already imports the Compiler Plugin.

i-walker commented 4 years ago

I meant the compiler plugin the user creates not the one from Arrow.