Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 796875 - [TRACKER] java packages that provide module-info.java and can otherwise be built with jdk 1.8
Summary: [TRACKER] java packages that provide module-info.java and can otherwise be bu...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords: PullRequest, Tracker
Depends on: 796935 797289 797634 799695 832692 832693 832694 832695 841785 842912 843104 843176 843182 843185 843254 843557 847592 849524 857858 857897 858560 859808 866923 880243 902517
Blocks: module-info 842447
  Show dependency tree
 
Reported: 2021-06-20 09:29 UTC by Miroslav Šulc
Modified: 2023-03-21 10:02 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Miroslav Šulc gentoo-dev 2021-06-20 09:29:38 UTC
this is a tracker for packages that are currently set to use both DEPEND and RDEPEND ">=virtual/jdk-1.8" and at the same time they provide module-info.java that needs to be compiled using at least jdk 9 (which is still masked atm). planned change in java-pkg-simple.eclass will ignore module-info.java if jdk < 9 is used for compilation (as it cannot compile module-info.java because it's a java 9+ feature).

once jdk 11 and [gentoo-vm] on java 11 are unmasked, packages in this tracker must be revbumped to use DEPEND=">=virtual/jdk-11:*" so that they are recompiled using java version that can compile module-info.java to provide module-info.class in their jar files.

those that already have jdk 11 enabled including [gentoo-vm] and have jdk 11 set as the default vm should not encounter any issues. but if they have java 11 enabled and jdk 1.8 is set as the default, there might be some issues when running apps that need module-info.class in jar files as those would be ignored during compilation and hence missing from the jar files.

also, note that there are also packages that provide module-info.class but use other way to generate it, like using bndlib (for example tomcat). those packages (imo) should not be affected and should not be tracked here.

for more information you can also have a look here: https://github.com/gentoo/gentoo/pull/21326#discussion_r654816135
Comment 1 Larry the Git Cow gentoo-dev 2021-06-24 16:22:04 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4419bceb0833e2b9ae045d9392f201ee359a84b7

commit 4419bceb0833e2b9ae045d9392f201ee359a84b7
Author:     Miroslav Šulc <fordfrog@gentoo.org>
AuthorDate: 2021-06-24 16:21:37 +0000
Commit:     Miroslav Šulc <fordfrog@gentoo.org>
CommitDate: 2021-06-24 16:21:59 +0000

    java-pkg-simple.eclass: added support for module-info.java compilation
    
    for more info see https://bugs.gentoo.org/796875
    
    Bug: https://bugs.gentoo.org/796875
    Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>

 eclass/java-pkg-simple.eclass | 57 ++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 53 insertions(+), 4 deletions(-)
Comment 2 Larry the Git Cow gentoo-dev 2021-06-27 16:39:33 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bcd03209d095c9e170e49f706414ad1d380da7f9

commit bcd03209d095c9e170e49f706414ad1d380da7f9
Author:     Miroslav Šulc <fordfrog@gentoo.org>
AuthorDate: 2021-06-27 16:38:29 +0000
Commit:     Miroslav Šulc <fordfrog@gentoo.org>
CommitDate: 2021-06-27 16:39:29 +0000

    java-pkg-simple.eclass: improved code related to java 9+ modules
    
    Bug: https://bugs.gentoo.org/796875
    Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>

 eclass/java-pkg-simple.eclass | 32 ++++++++++++++++++++++++--------
 1 file changed, 24 insertions(+), 8 deletions(-)
Comment 3 Florian Schmaus gentoo-dev 2022-05-03 20:15:00 UTC
All packages that fall into this category should basically

DEPEND=">=virtual/jdk-9:*"
RDEPEND=">=virtual/jre-8:*"

or, if, for example, compilation with Java 17 is not supported

DEPEND="
    || (
       virtual/jdk:9
       virtual/jdk:11
    )
"
RDEPEND=">=virtual/jre-8:*"

as this will ensure that the java package is build with the correct target (8) while module-info.java is also compiled.
Comment 4 Larry the Git Cow gentoo-dev 2022-05-05 09:30:53 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a890940dce62dea54a867901f85e37985bc76943

commit a890940dce62dea54a867901f85e37985bc76943
Author:     Florian Schmaus <flow@gentoo.org>
AuthorDate: 2022-05-03 20:19:05 +0000
Commit:     Florian Schmaus <flow@gentoo.org>
CommitDate: 2022-05-05 09:30:28 +0000

    java-pkg-simple.eclass: eqawarn if module-info.java is not compiled
    
    In preperation of this ewarn part becoming 'die' (bug #842447), switch
    it to eqawarn to improve catching the affected packages.
    
    Bug: https://bugs.gentoo.org/796875
    Bug: https://bugs.gentoo.org/842447
    Signed-off-by: Florian Schmaus <flow@gentoo.org>
    Closes: https://github.com/gentoo/gentoo/pull/25306

 eclass/java-pkg-simple.eclass | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)