Merge ~vpa1977/ubuntu/+source/intellij-community-idea:java21_ftbfs_patch into ubuntu/+source/intellij-community-idea:ubuntu/devel

Proposed by Vladimir Petko
Status: Merged
Merge reported by: Vladimir Petko
Merged at revision: 31559c3e21494cb8cb8e5c625221890a37bc5188
Proposed branch: ~vpa1977/ubuntu/+source/intellij-community-idea:java21_ftbfs_patch
Merge into: ubuntu/+source/intellij-community-idea:ubuntu/devel
Diff against target: 85 lines (+44/-1)
4 files modified
debian/changelog (+9/-0)
debian/control (+3/-1)
debian/patches/java21-stub-decompiler-fails-on-enums.patch (+31/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Dan Bungert Pending
git-ubuntu import Pending
Review via email: mp+459687@code.launchpad.net

Description of the change

This MR is a prerequisite for fixing kotlin ftbfs

Changes:
 - cherry-pick upstream patch to resolve protobuf types not found errors in kotlin compiler (it was throwing nullpointer when generating stubs for enumerations in protobuf)
 - require asm 9.6 so that Java 21 can be parsed

PPA: ppa:vpa1977/gettext [1]

Testing:
 - piuparts test (Install/Purge) [2]
 - rebuild kotlin with default Java 21 and updated intellij [3]

[1] https://launchpad.net/~vpa1977/+archive/ubuntu/gettext
[2] https://bugs.launchpad.net/ubuntu/+source/kotlin/+bug/2051757/comments/1
[3] https://launchpad.net/~vpa1977/+archive/ubuntu/gettext-21/+sourcepub/15766367/+listing-archive-extra

To post a comment you must log in.
Revision history for this message
Dan Bungert (dbungert) wrote :

Already merged

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/debian/changelog b/debian/changelog
index 8211e40..d624327 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
1intellij-community-idea (183.5153.4-4ubuntu1) noble; urgency=medium
2
3 * Resolve Java 21 kotlin ftbfs, see launchpad bug 2051757:
4 - d/p/java21-stub-decompiler-fails-on-enums.patch: cherry-pick
5 upstream patch to resolve kotlin ftbfs (See 1057513).
6 - d/control: require updated libasm-java to support Java 21.
7
8 -- Vladimir Petko <vladimir.petko@canonical.com> Wed, 24 Jan 2024 11:33:44 +1300
9
1intellij-community-idea (183.5153.4-4) unstable; urgency=medium10intellij-community-idea (183.5153.4-4) unstable; urgency=medium
211
3 * Team upload12 * Team upload
diff --git a/debian/control b/debian/control
index f2c03d4..b0c8dfe 100644
--- a/debian/control
+++ b/debian/control
@@ -1,7 +1,8 @@
1Source: intellij-community-idea1Source: intellij-community-idea
2Section: java2Section: java
3Priority: optional3Priority: optional
4Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>4Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
5XSBC-Original-Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>
5Uploaders: Saif Abdul Cassim <saif.15@cse.mrt.ac.lk>6Uploaders: Saif Abdul Cassim <saif.15@cse.mrt.ac.lk>
6Build-Depends:7Build-Depends:
7 ant,8 ant,
@@ -9,6 +10,7 @@ Build-Depends:
9 default-jdk,10 default-jdk,
10 dh-exec,11 dh-exec,
11 gradle-debian-helper,12 gradle-debian-helper,
13 libasm-java (>= 9.6~),
12 libautomaton-java,14 libautomaton-java,
13 libbatik-java,15 libbatik-java,
14 libcommons-codec-java,16 libcommons-codec-java,
diff --git a/debian/patches/java21-stub-decompiler-fails-on-enums.patch b/debian/patches/java21-stub-decompiler-fails-on-enums.patch
15new file mode 10064417new file mode 100644
index 0000000..6dc88f6
--- /dev/null
+++ b/debian/patches/java21-stub-decompiler-fails-on-enums.patch
@@ -0,0 +1,31 @@
1Description: [java] IDEA-323038 Stub decompiler fails on enums in Java 21-ea builds
2 Java 21 compiler adds the method parameter section to mandated methods like valueOf
3 in enums (see JDK-8292275). The new thing is that mandated method parameter may have
4 no name. It's unexpected for stub decompiler, which fails with NullPointerException.
5Author: Tagir Valeev <tagir.valeev@jetbrains.com>
6Origin: upstream, https://github.com/JetBrains/intellij-community/commit/459851b9caea42ab6e99494409470a9060321686
7Bug: https://youtrack.jetbrains.com/issue/IDEA-323038
8Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1057513
9Forwarded: not-needed
10Applied-Upstream: 459851b9caea42ab6e99494409470a9060321686
11Last-Update: 2024-01-24
12--- a/java/java-psi-impl/src/com/intellij/psi/impl/compiled/StubBuildingVisitor.java
13+++ b/java/java-psi-impl/src/com/intellij/psi/impl/compiled/StubBuildingVisitor.java
14@@ -649,7 +649,7 @@
15 @Override
16 public void visitParameter(String name, int access) {
17 int paramIndex = myParamNameIndex++ - myParamIgnoreCount;
18- if (!isSet(access, Opcodes.ACC_SYNTHETIC) && paramIndex >= 0 && paramIndex < myParamCount) {
19+ if (name != null && !isSet(access, Opcodes.ACC_SYNTHETIC) && paramIndex >= 0 && paramIndex < myParamCount) {
20 setParameterName(name, paramIndex);
21 }
22 }
23@@ -666,7 +666,7 @@
24 }
25 }
26
27- private void setParameterName(String name, int paramIndex) {
28+ private void setParameterName(@NotNull String name, int paramIndex) {
29 if (ClsParsingUtil.isJavaIdentifier(name, LanguageLevel.HIGHEST)) {
30 myParamStubs[paramIndex].setName(name);
31 }
diff --git a/debian/patches/series b/debian/patches/series
index 34d32be..5c1b3ef 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,4 @@ asm-compatibility.patch
5gradle-build-scripts.patch5gradle-build-scripts.patch
6java17-compatibility.patch6java17-compatibility.patch
7java21-compatibility.patch7java21-compatibility.patch
8java21-stub-decompiler-fails-on-enums.patch

Subscribers

People subscribed via source and target branches