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
1diff --git a/debian/changelog b/debian/changelog
2index 8211e40..d624327 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,12 @@
6+intellij-community-idea (183.5153.4-4ubuntu1) noble; urgency=medium
7+
8+ * Resolve Java 21 kotlin ftbfs, see launchpad bug 2051757:
9+ - d/p/java21-stub-decompiler-fails-on-enums.patch: cherry-pick
10+ upstream patch to resolve kotlin ftbfs (See 1057513).
11+ - d/control: require updated libasm-java to support Java 21.
12+
13+ -- Vladimir Petko <vladimir.petko@canonical.com> Wed, 24 Jan 2024 11:33:44 +1300
14+
15 intellij-community-idea (183.5153.4-4) unstable; urgency=medium
16
17 * Team upload
18diff --git a/debian/control b/debian/control
19index f2c03d4..b0c8dfe 100644
20--- a/debian/control
21+++ b/debian/control
22@@ -1,7 +1,8 @@
23 Source: intellij-community-idea
24 Section: java
25 Priority: optional
26-Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>
27+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
28+XSBC-Original-Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>
29 Uploaders: Saif Abdul Cassim <saif.15@cse.mrt.ac.lk>
30 Build-Depends:
31 ant,
32@@ -9,6 +10,7 @@ Build-Depends:
33 default-jdk,
34 dh-exec,
35 gradle-debian-helper,
36+ libasm-java (>= 9.6~),
37 libautomaton-java,
38 libbatik-java,
39 libcommons-codec-java,
40diff --git a/debian/patches/java21-stub-decompiler-fails-on-enums.patch b/debian/patches/java21-stub-decompiler-fails-on-enums.patch
41new file mode 100644
42index 0000000..6dc88f6
43--- /dev/null
44+++ b/debian/patches/java21-stub-decompiler-fails-on-enums.patch
45@@ -0,0 +1,31 @@
46+Description: [java] IDEA-323038 Stub decompiler fails on enums in Java 21-ea builds
47+ Java 21 compiler adds the method parameter section to mandated methods like valueOf
48+ in enums (see JDK-8292275). The new thing is that mandated method parameter may have
49+ no name. It's unexpected for stub decompiler, which fails with NullPointerException.
50+Author: Tagir Valeev <tagir.valeev@jetbrains.com>
51+Origin: upstream, https://github.com/JetBrains/intellij-community/commit/459851b9caea42ab6e99494409470a9060321686
52+Bug: https://youtrack.jetbrains.com/issue/IDEA-323038
53+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1057513
54+Forwarded: not-needed
55+Applied-Upstream: 459851b9caea42ab6e99494409470a9060321686
56+Last-Update: 2024-01-24
57+--- a/java/java-psi-impl/src/com/intellij/psi/impl/compiled/StubBuildingVisitor.java
58++++ b/java/java-psi-impl/src/com/intellij/psi/impl/compiled/StubBuildingVisitor.java
59+@@ -649,7 +649,7 @@
60+ @Override
61+ public void visitParameter(String name, int access) {
62+ int paramIndex = myParamNameIndex++ - myParamIgnoreCount;
63+- if (!isSet(access, Opcodes.ACC_SYNTHETIC) && paramIndex >= 0 && paramIndex < myParamCount) {
64++ if (name != null && !isSet(access, Opcodes.ACC_SYNTHETIC) && paramIndex >= 0 && paramIndex < myParamCount) {
65+ setParameterName(name, paramIndex);
66+ }
67+ }
68+@@ -666,7 +666,7 @@
69+ }
70+ }
71+
72+- private void setParameterName(String name, int paramIndex) {
73++ private void setParameterName(@NotNull String name, int paramIndex) {
74+ if (ClsParsingUtil.isJavaIdentifier(name, LanguageLevel.HIGHEST)) {
75+ myParamStubs[paramIndex].setName(name);
76+ }
77diff --git a/debian/patches/series b/debian/patches/series
78index 34d32be..5c1b3ef 100644
79--- a/debian/patches/series
80+++ b/debian/patches/series
81@@ -5,3 +5,4 @@ asm-compatibility.patch
82 gradle-build-scripts.patch
83 java17-compatibility.patch
84 java21-compatibility.patch
85+java21-stub-decompiler-fails-on-enums.patch

Subscribers

People subscribed via source and target branches