ignatov / intellij-erlang

Erlang IDE
https://www.jetbrains.com/help/idea/2018.2/getting-started-with-erlang.html
Other
735 stars 120 forks source link

Add support for IntelliJ 2023.3 #1025

Closed alvaropag closed 10 months ago

alvaropag commented 11 months ago

Hello! Could you add support for IntelliJ 2023.3? Thanks

leonardb commented 11 months ago

Seconded. Intellij just updated and plugin is disabled as it requires IDE build 232.* or earlier

m-aljawahiri commented 11 months ago

Yes. Please add support for 2023.3. Thanks.

bighunter513 commented 11 months ago

intellij-erlang-0.233.3.jar.zip Here is temp build from my local clone. you can use it for temporary. Old Project may cant open, use New -> Project to open is okay.

bighunter513 commented 11 months ago

Hello! Could you add support for IntelliJ 2023.3? Thanks

https://github.com/ignatov/intellij-erlang/issues/1025#issuecomment-1846636214

bighunter513 commented 11 months ago

Seconded. Intellij just updated and plugin is disabled as it requires IDE build 232.* or earlier

https://github.com/ignatov/intellij-erlang/issues/1025#issuecomment-1846636214

bighunter513 commented 11 months ago

Yes. Please add support for 2023.3. Thanks.

https://github.com/ignatov/intellij-erlang/issues/1025#issuecomment-1846636214

leonardb commented 11 months ago

I built off master with a couple of small patches and everything seems to work (including existing projects)

leonard@captmarvel:/tmp/intellij-erlang$ git diff
diff --git a/build.gradle b/build.gradle
index f68031eb..2ea6da45 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,5 +1,5 @@
 plugins {
-  id 'org.jetbrains.intellij' version "1.16.0"
+  id 'org.jetbrains.intellij' version "1.16.1"
 }

 dependencies {
diff --git a/gradle.properties b/gradle.properties
index 34048313..76debe94 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -3,7 +3,7 @@
 # https://www.jetbrains.com/intellij-repository/snapshots

 version = 0.11
-ideaVersion = 2023.2
+ideaVersion = 2023.3
 javaVersion = 17
 javaTargetVersion = 17
 buildNumber = SNAPSHOT
diff --git a/tests/org/intellij/erlang/build/ErlangCompilationTestBase.java b/tests/org/intellij/erlang/build/ErlangCompilationTestBase.java
index 202615ee..765b7b33 100644
--- a/tests/org/intellij/erlang/build/ErlangCompilationTestBase.java
+++ b/tests/org/intellij/erlang/build/ErlangCompilationTestBase.java
@@ -106,7 +106,7 @@ public abstract class ErlangCompilationTestBase extends HeavyPlatformTestCase {
     }
   }

-  @Override
+  //@Override
   protected boolean isRunInWriteAction() {
     return false;
   }

disabled existing plugin and installed from disk ./build/distributions/intellij-erlang-0.11.SNAPSHOT.zip

kyle-neal commented 11 months ago

@leonardb thanks! This worked for me too.

To those who haven't built the plugin before from source (as myself). After applying the patches in @leonardb comment, here's how I got things working.

To build just use ./gradlew build. Java 17 must be installed and set as default (I'm on ubuntu jammy)

# Print OS version
kyle@spawn:/opt/intellij-erlang$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.3 LTS
Release:        22.04
Codename:       jammy

# Install java 17
kyle@spawn:/opt/intellij-erlang$ sudo apt install openjdk-17-jdk

# Set java17 as default
kyle@spawn:/opt/intellij-erlang$ sudo update-alternatives --config java
There are 3 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                            Priority   Status
------------------------------------------------------------
* 0            /usr/lib/jvm/java-17-openjdk-amd64/bin/java      1711      auto mode
  1            /usr/lib/jvm/java-11-openjdk-amd64/bin/java      1111      manual mode
  2            /usr/lib/jvm/java-17-openjdk-amd64/bin/java      1711      manual mode
  3            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1081      manual mode

Press <enter> to keep the current choice[*], or type selection number: 0

# Build intellij-erlang
kyle@spawn:/opt/intellij-erlang$ ./gradlew build
...
BUILD SUCCESSFUL in 2m 7s

Resulting file will wind up in build/distributions/intellij-erlang-0.11.SNAPSHOT.zip. Then it can be installed via Install plugin from disk... in intellij after disabling the official plugin, just as what @leonardb said. Restart IDE and erlang features should work again.

puckpuck commented 11 months ago

@leonardb would you be able to open a PR with the changes you did in your comment?

leonardb commented 11 months ago

@puckpuck https://github.com/ignatov/intellij-erlang/pull/1026

ignatov commented 10 months ago

Thanks! I've uploaded a new version just after the New Year, having been on holiday for the whole of December.