Nikita Klimenko [JB]
03/07/2021, 4:23 PMarrow-meta-examples
). But IDE didn't register plugins ><Nikita Klimenko [JB]
03/07/2021, 4:24 PMrunIde
https://gist.github.com/koperagen/faf37cf62ba2b310653c4d0d0f0f545c (no Hello world LineMarker)raulraja
03/08/2021, 9:43 AMImran/Malic
03/08/2021, 8:24 PMclass MyIdeMetaPlugin : MyMetaPlugin(), MetaIde {
/** ... **/
}
IdeMetaPlugin
is not supposed to be inherited (as of now), as a means to register ones Ide plugin. That is done through the interface MetaIde
.
If you’re solely focused on IdePlugin’s, this is enough:
class MyIdeMetaPlugin : MetaIde {
/** ... **/
}
That’s why in the logs the Quotes, Type proofs Ide is registered, even though you’ve overwritten invoke
.
Those get automatically registered once the Ide tries to resolve you’re current code 😄Imran/Malic
03/08/2021, 8:29 PMNikita Klimenko [JB]
03/09/2021, 10:11 PM@ExperimentalContracts
class MyIdeMetaPlugin : MetaIde {
@ExperimentalContracts
override fun intercept(ctx: CompilerContext): List<CliPlugin> =
emptyList()
@ExperimentalContracts
override fun intercept(ctx: IdeContext): List<IdePlugin> =
listOf(
helloWorld
)
}
But still can't make helloWorld work in IDE. I believe it doesn't work because it absents in logs. Is it necessary to declare MyIdeMetaPlugin
somewhere in plugins.xml? As i understand, no. Just dependency on <depends>io.arrow-kt.arrow</depends>
. Correct? ^^Imran/Malic
03/09/2021, 10:57 PMNikita Klimenko [JB]
03/11/2021, 11:05 PMArrow Meta
by now and it was very convenient. My favorite part is that I don't need to write paths to test files, like with native IDE tests, but just pass String
to function
The only thing left is to make plugins work in IDE :c
Would really appreciate it if you could take a lookImran/Malic
03/11/2021, 11:14 PMImran/Malic
03/30/2021, 11:45 AMintellij's
ComponentRegistrar regarding service discovery seems to have a TypeInference issue, when we request 3rd Party Plugins depending on the machinery within IdeInternalRegistry
.
There is a quick fix I can push to Meta.
Within you’re project, you’d have to change to the latest SNAPSHOT here to:
plugins = ["gradle", "gradle-java", "java", "org.jetbrains.kotlin:${KOTLIN_IDEA_VERSION}", "io.arrow-kt.arrow:1.4.10-SNAPSHOT-1616003761"]
And register your plugin in the PluginXml:
<idea-plugin>
<id>mygroup.myartifact</id>
<name>My Meta Ide Example</name>
<vendor email="<mailto:support@yourlibrary.com|support@yourlibrary.com>" url="<http://www.yourlibrary.com>">YourLibrary</vendor>
<depends>com.intellij.gradle</depends>
<depends>com.intellij.java</depends>
<depends>org.jetbrains.kotlin</depends>
<depends>io.arrow-kt.arrow</depends>
<extensions defaultExtensionNs="com.intellij">
<applicationService serviceInterface="arrow.meta.ide.MetaIde" overrides="true" serviceImplementation="io.arrowkt.example.MyIdeMetaPlugin"/>
</extensions>
</idea-plugin>
In Meta Ide Plugin’s are interpreted as Services. Here you’d substitute the IdePlugin from Upstream Meta to yours. Then you won’t see any logs from Plugin features that you haven’t installed or added.Imran/Malic
03/30/2021, 11:48 AMImran/Malic
03/30/2021, 11:50 AMNikita Klimenko [JB]
04/02/2021, 12:11 PM