Closed reibitto closed 4 years ago
Are you using any custom IDEA distribution to build your plugin against?
We're targeting 2019.3 (IntelliJ build 193.5233.102) currently. I'm not sure if I understood your question though.
https://github.com/zio/zio-intellij/blob/1ca07fc2cf48cac9a9915ac223a2cd44d62a9ffb/build.sbt#L21-L23
Okay, I see from your build.sbt that you're using the default repository for downloading IJ builds. It seems that recent IDEA distributions published there do not include JBR at all. Guess I'll need to add some heuristics to try locating JBR installed by Toolbox app.
@reibitto Which jdk have you been using when the java.lang.NoClassDefFoundError
happened?
And how did you install IJ IDEA that provides jbrsdk-11_0_5-osx-x64-b630.1
: via Toolbox or as a standalone application?
The exception you're facing shouldn't impact overall functionality - it simply fails to initialise Mac-specific features such as touchbar and global menu. Can you confirm this?
I'm currently using openjdk-11.0.2.jdk.
I tried so many things that I don't 100% remember the exact steps I took to install jbrsdk-11_0_5-osx-x64-b630.1
, but I'm pretty sure it was through this plugin:
https://plugins.jetbrains.com/plugin/12836-choose-runtime
Oddly enough, using the plugin didn't actually solve the problem for me. After it downloaded and installed it, it only worked after I manually set JAVA_HOME
to the JBR like I mentioned in my original comment.
Also, when I use plain openjdk-11.0.2.jdk, in addition to Mac-specific features not working, the plugin appears to not be fully loaded. I don't see the underlines and suggestions that zio-intellij is supposed to give. I only see the plugin working correctly with JBR.
@hmemcpy might be able to confirm as I'm pretty sure he experienced the same problems.
@reibitto Could you please test with the v3.5.0?
Thanks @mutcianm. Just tried it and it seems to work. 👍
I'm trying to run this locally using the new plugin, unfortunately I get:
[error] Failed to download jbr 11_0_4b520.11: org.jetbrains.sbtidea.download.FileDownloader$DownloadException: Not found (404): https://cache-redirector.jetbrains.com/jetbrains.bintray.com/intellij-jbr/jbr-11_0_4-osx-x86_64-b520.11.tar.gz
I'm using openjdk-11.0.6 (installed with adoptopenjdk11 via brew). Why/where does it pick the 11_0_4 version?
@hmemcpy Could you please post intellijBuild
you're using?
sbt-idea-plugin tries to download and install JBR that was used to build intellijBuild
with, instead of searching for a first compatible one locally( see #49 ).
Would be great if you could test it with the most recent plugin 3.7.0 SDK(including jbr and plugins) downloading has been overhauled to eliminate installation inconsistencies
Starting with version 3.7.0 IDEA run configurations generated on project import should use the downloaded JBR as well.
Hey, I'm sorry it took me a while to respond! I want to confirm that the latest plugin solves all my issues on both Mac and Windows! The plugin seems to be downloading all the right versions of jbr, and everything starts smoothly!
Thanks again for fixing it! My plugin is now on sbt! This issue can be closed.
We're developing an IntelliJ plugin using Scala which is currently using
gradle-intellij-plugin
, but we want to migrate it over to SBT using this plugin but I'm seeing errors like this when using therunIDE
task:From what I can tell this is because JBR isn't being used. When I manually set JAVA_HOME to point to JBR before running SBT, everything works as expected:
Should this be handled automatically by
sbt-idea-plugin
? Or maybe expose an option of some kind? For example,gradle-intellj-plugin
exposes ajbrVersion
setting: https://github.com/JetBrains/gradle-intellij-plugin#configurationOr is there a different way of resolving the issue that I'm seeing? FWIW, I tried
runIDE
on some other IntelliJ plugins based onsbt-idea-plugin
that I found publicly on GitHub and I ran into the same NoClassDefFoundErrors for macOS. If it helps, this is what our current build.sbt looks like: https://github.com/reibitto/zio-intellij/blob/1247caf840f4d52c6f49fc5e19b02e2eef86cd69/build.sbt