Bug 2310596 - flexmark-java: Remove build-dependency on maven-local-openjdk17
Summary: flexmark-java: Remove build-dependency on maven-local-openjdk17
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: flexmark-java
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Jerry James
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-09-07 06:54 UTC by Mikolaj Izdebski
Modified: 2024-10-04 00:16 UTC (History)
2 users (show)

Fixed In Version: flexmark-java-0.64.6-7.fc42 flexmark-java-0.64.6-7.fc41
Clone Of:
Environment:
Last Closed: 2024-09-25 15:14:39 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github vsch flexmark-java issues 632 0 None open Test failures with OpenJDK 21 2024-09-08 21:57:38 UTC

Description Mikolaj Izdebski 2024-09-07 06:54:15 UTC
In Fedora 42, Javapackages project (the Java packaging tooling used
for building Java packages) will stop supporting OpenJDK 8 (1.8),
OpenJDK 11 and OpenJDK 17 for building RPM packages with. In Fedora 42
the only Java version supported for building Fedora packages will be
OpenJDK 21. Later on support for newer Java version(s) will be added.

This change is directly related to OpenJDK 11 support ending in
October 2024, but at the same time we are also dropping
Javapackages support for the two other legacy Javas -- OpenJDK 8 (1.8)
and OpenJDK 17.

In particular, the above means that package maven-local-openjdk17
will be obsoleted and removed from Fedora rawhide (42).
PR: https://src.fedoraproject.org/rpms/javapackages-tools/pull-request/31

flexmark-java build-requires maven-local-openjdk17
Due the aforementioned change, please remove this build-dependency.


Reproducible: Always

Comment 1 Jerry James 2024-09-08 21:53:49 UTC
Unfortunately, flexmark-java fails tests with OpenJDK 21.  I do not know why.  Any suggestions on how to debug this issue would be gratefully received.  This is the first test failure:

[INFO] Running com.vladsch.flexmark.ext.abbreviation.ComboAbbreviationSpecTest
[ERROR] Tests run: 22, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 0.085 s <<< FAILURE! -- in com.vladsch.flexmark.ext.abbreviation.ComboAbbreviationSpecTest
[ERROR] com.vladsch.flexmark.ext.abbreviation.ComboAbbreviationSpecTest.testSpecExample[Full Spec] -- Time elapsed: 0.055 s <<< FAILURE!
org.junit.ComparisonFailure: 
file:///builddir/build/BUILD/flexmark-java-0.64.6-build/flexmark-java-0.64.6/flexmark-ext-abbreviation/src/test/resources/ext_abbreviation_ast_spec.md expected:<...ca">U.S.A.</abbr>, ([<abbr title="États-Unis d'Amérique">É.U.</abbr> or É.-U. d&rsquo;A. in French).</p>
<p>And here we have a <abbr title="Compact Disk">CD</abbr>, some CDs, and some other <abbr title="Compact Disk">CD</abbr>&rsquo;s.</p>
<p>Let&rsquo;s transfert documents through <abbr title="Transmission Control Protocol">TCP</abbr>/<abbr title="Internet Protocol">IP</abbr>, using <abbr title="Transmission Control Protocol">TCP</abbr> packets.</p>
.
Document[0, 535]
  Paragraph[0, 38] isTrailingBlankLine
    TextBase[0, 37] chars:[0, 37, "Some  … TML4."]
      Text[0, 16] chars:[0, 16, "Some  … bout "]
      Abbreviation[16, 20] chars:[16, 20, "HTML"]
      Text[20, 22] chars:[20, 22, ", "]
      Abbreviation[22, 26] chars:[22, 26, "SGML"]
      Text[26, 31] chars:[26, 31, " and "]
      Abbreviation[31, 36] chars:[31, 36, "HTML4"]
      Text[36, 37] chars:[36, 37, "."]
  Paragraph[39, 100] isTrailingBlankLine
    Text[39, 42] chars:[39, 42, "Let"]
    TypographicSmarts[42, 43] typographic: &rsquo; 
    TextBase[43, 84] chars:[43, 84, "s tal … -U. d"]
      Text[43, 60] chars:[43, 60, "s tal …  the "]
      Abbreviation[60, 66] chars:[60, 66, "U.S.A."]
      Text[66, 69] chars:[66, 69, ", ("]
      Abbreviation[69, 73] chars:[69, 73, "É.U."]
      Text[73, 84] chars:[73, 84, " or É] … -U. d"]
    Typog...> but was:<...ca">U.S.A.</abbr>, ([É.U. or É.-U. d&rsquo;A. in French).</p>
<p>And here we have a <abbr title="Compact Disk">CD</abbr>, some CDs, and some other <abbr title="Compact Disk">CD</abbr>&rsquo;s.</p>
<p>Let&rsquo;s transfert documents through <abbr title="Transmission Control Protocol">TCP</abbr>/<abbr title="Internet Protocol">IP</abbr>, using <abbr title="Transmission Control Protocol">TCP</abbr> packets.</p>
.
Document[0, 535]
  Paragraph[0, 38] isTrailingBlankLine
    TextBase[0, 37] chars:[0, 37, "Some  … TML4."]
      Text[0, 16] chars:[0, 16, "Some  … bout "]
      Abbreviation[16, 20] chars:[16, 20, "HTML"]
      Text[20, 22] chars:[20, 22, ", "]
      Abbreviation[22, 26] chars:[22, 26, "SGML"]
      Text[26, 31] chars:[26, 31, " and "]
      Abbreviation[31, 36] chars:[31, 36, "HTML4"]
      Text[36, 37] chars:[36, 37, "."]
  Paragraph[39, 100] isTrailingBlankLine
    Text[39, 42] chars:[39, 42, "Let"]
    TypographicSmarts[42, 43] typographic: &rsquo; 
    TextBase[43, 84] chars:[43, 84, "s tal … -U. d"]
      Text[43, 60] chars:[43, 60, "s tal …  the "]
      Abbreviation[60, 66] chars:[60, 66, "U.S.A."]
      Text[66, 84] chars:[66, 84, ", (É.] … -U. d"]
    Typog...>
	at org.junit.Assert.assertEquals(Assert.java:117)
	at com.vladsch.flexmark.test.util.FullSpecTestCase.testSpecExample(FullSpecTestCase.java:48)
	at com.vladsch.flexmark.test.util.ComboSpecTestCase.testSpecExample(ComboSpecTestCase.java:100)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:61)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.rules.ExpectedException$ExpectedExceptionStatement.evaluate(ExpectedException.java:258)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.junit.runners.Suite.runChild(Suite.java:128)
	at org.junit.runners.Suite.runChild(Suite.java:27)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:316)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:240)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:214)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:155)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
	at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)

Comment 2 Mikolaj Izdebski 2024-09-24 11:50:54 UTC
Fedora 42 update removing maven-local-openjdk17 is about to be pushed to stable.
Update link: https://bodhi.fedoraproject.org/updates/FEDORA-2024-72c58c691d
This means that flexmark-java is FTBFS now.

Besides maven-local-openjdk17, OpenJDK 17 is also planned to be removed in Fedora 42.
Change proposal: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/AKNHHXKEEKGHIAALVDOHX3IWIS3Y77LG/

Comment 3 Jerry James 2024-09-24 20:40:38 UTC
Do you know of a good summary of the changes between OpenJDK 17 and OpenJDK 21?  I need a clue....

Comment 4 Mikolaj Izdebski 2024-09-25 07:51:58 UTC
I've debugged the above failing test case (just this one) and the root cause seems to be a different behavior of regular expression matching, which Flexmark relies on heavily for.
The issue can be reproduced with the following code snippet:

import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Test {
  public static void main(String[] args) {
    String s = "É.U.";
    Pattern p = Pattern.compile("\\b\\QÉ.U.\\E");
    Matcher m = p.matcher(s);
    System.err.println(m.find() ? "Found" : "NOT FOUND");
  }
}

With Java 17 in prints "Found", while on Java 21 it prints "NOT FOUND".

Comment 5 Mikolaj Izdebski 2024-09-25 08:01:11 UTC
Starting with OpenJDK 19, regex \b character class matches ASCII characters only.
So it will not match "É" as in the reproducer above.
Ref: https://bugs.openjdk.org/browse/JDK-8291577

Comment 6 Mikolaj Izdebski 2024-09-25 08:21:37 UTC
Proposed patch submitted as pull request: https://src.fedoraproject.org/rpms/flexmark-java/pull-request/1

Comment 7 Fedora Update System 2024-09-25 15:09:52 UTC
FEDORA-2024-9920f36c27 (flexmark-java-0.64.6-7.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-9920f36c27

Comment 8 Fedora Update System 2024-09-25 15:14:39 UTC
FEDORA-2024-9920f36c27 (flexmark-java-0.64.6-7.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 9 Fedora Update System 2024-09-25 15:25:52 UTC
FEDORA-2024-ec344aada4 (flexmark-java-0.64.6-7.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-ec344aada4

Comment 10 Fedora Update System 2024-09-26 04:01:41 UTC
FEDORA-2024-ec344aada4 has been pushed to the Fedora 41 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-ec344aada4`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-ec344aada4

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 11 Fedora Update System 2024-10-04 00:16:01 UTC
FEDORA-2024-ec344aada4 (flexmark-java-0.64.6-7.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.