Is it possible to get a clean, working IntelliJ pr...
# arrow-meta
j
Is it possible to get a clean, working IntelliJ project setup for arrow-meta? I'm using 2020.1.2 rc. I've cloned current master of arrow-meta, imported it as a Gradle project, but still get unresolved references. E.g.
ExtensionPhase
in
valueArgumentCoercion.kt
and many other files in the
idea-plugin
module. I'd be glad to any help here.
r
Hi @Joachim Ansorg,
master
branch is a stable branch. Commits merged on
master
branch need to pass the build check and tests.
ExtensionPhase
comes from
compiler-plugin
. Do errors raise when building the
idea-plugin
module?
j
gradle is building fine, IntelliJ fails to resolve the class in the editor. I was wondering if anyone knows how to force IntelliJ to do the right thing here
r
Invalidate caches and restart works for me in those cases
j
I just tried that, it didn't work. But I also tried to go back to 2019.3 and this seems to work. This means that 2020.1 seems to be broken with the Gradle setup of arrow-meta, at least for me 😞 I can work with 2019.3 for now, that's good enough
r
Oh no... I'm going to try 2020.1
@Joachim Ansorg, it doesn't work for me. I realized that Intellij doesn't ask things when opening (importing settings) neither when importing a project, it's opened without asking configuration things. I tried latest release:
2020.1.1
(not rc)
@Joachim Ansorg, I tried other Gradle projects and they worked properly
So I came back to Arrow Meta and I realized that the problem is just with
idea-plugin
and dependencies with
compiler-plugin
However, dependencies between
compiler-plugin
and
meta-test
work
So it seems the problem is the shadowed jar
It seems the new Intellij doesn't know how to manage the dependency of a shadowed jar
j
thanks for your thorough analysis of this issue! I agree that this seems like an issue with the shadowed jar. But unfortunately I don't know how to fix this. YouTrack might have some clues, but I doubt it
r
I remember now that I got a similar issue when creating an example, however I was using
2019.3
and I didn't understand the reason why I didn't get that issue with Arrow Meta workspace: https://github.com/johnrengelman/shadow/issues/264
@Joachim Ansorg while we're investigating another way to solve it, you could add this dependency to idea-plugin:
compileOnly project(':compiler-plugin')
because it doesn't impact on the plugin or library (POM, jar and ZIP from idea-plugin remain the same as before)
j
thank you @Rachel, I'll try that
🙌 1
@Rachel I've tried it. The IDE is working again with this change. But the idea-plugin module doesn't compile anymore due to compilation errors in a few files
r
Thanks @Joachim Ansorg, I didn't get those errors... please, could you share one of them?
j
@Rachel With
gradle clean publishAndRunIde
I'm seeing this and bunch of similar errors:
Copy code
Task :idea-plugin:compileKotlin FAILED
e: /IslandWork/source/arrow-meta/idea-plugin/src/main/kotlin/arrow/meta/ide/IdeMetaPlugin.kt: (15, 6): Class 'IdeMetaPlugin' is not abstract and does not implement abstract base class member public abstract fun registerProjectComponents(project: MockProject, configuration: CompilerConfiguration): Unit defined in arrow.meta.MetaPlugin
👍 1
r
Thanks @Joachim Ansorg, maybe it's caused by the transitive dependencies. I'll review it 👍
i
Hi @Joachim Ansorg I am working on a few missing peaces to allow feature derivation through 3rd party plugins using Arrow Meta. Depending, on some on going work in Meta. I hope to address it this weekend. Means, currently the features build with Meta, are not picked up by IntelliJ.
It’s not a big concern, but I am drafting an encoding, which allows coherent overrides at the right lifecycle phase.
Instead of going for a monoidal construction, which forces Meta features in 3rd party plugins.