From a14709b0cd342d35e9f12b27c94b0ba73f02e0b8 Mon Sep 17 00:00:00 2001 From: DemchaAV Date: Mon, 1 Jun 2026 11:04:52 +0100 Subject: [PATCH] build: narrow flexmark-all to targeted modules + jcl-over-slf4j bridge (F3) GraphCompose's only flexmark consumer is `MarkDownParser`, which references the core parser + AST, `util.ast.Node`/`NodeVisitor`/ `VisitHandler`, and `util.data.MutableDataSet`. The full `flexmark-all` aggregator pulled ~40 jars of extensions, formatters, and converters that the codebase never touches. - Replace `flexmark-all` with the three modules actually used: `flexmark` (core), `flexmark-util-ast`, `flexmark-util-data`. - Add `jcl-over-slf4j` as an explicit compile dep. PDFBox 3.0.7's `PDDocument.` still calls `org.apache.commons.logging. LogFactory` directly; we exclude PDFBox's own commons-logging to keep a single logging facade, but the bridge was previously provided transitively via `flexmark-all`. Without it the classpath now misses LogFactory and every PDDocument-touching test fails with `NoClassDefFoundError` at clinit. The bridge routes those calls through SLF4J, which is the library's chosen logging facade. Consumer impact: callers that depended on flexmark extensions (`flexmark-ext-tables`, gfm-strikethrough, footnotes, etc.) flowing through GraphCompose must declare those modules explicitly. Gates: 1031 tests pass; dependency:tree no longer lists `flexmark-all`; japicmp vs v1.6.6 reports semver OK. --- CHANGELOG.md | 15 +++++++++++++++ pom.xml | 37 ++++++++++++++++++++++++++++++++++++- 2 files changed, 51 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fdec1a58..38cbc6d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,21 @@ planned; the next minor with new canonical DSL primitives is the Kotlin standard library transitively. Consumers that relied on `kotlin-stdlib` flowing through GraphCompose must declare it explicitly. +- Replaced the `flexmark-all` aggregator dependency with the three + modules actually referenced by `MarkDownParser`: `flexmark` + (core parser + AST), `flexmark-util-ast` (Node / NodeVisitor / + VisitHandler), and `flexmark-util-data` (MutableDataSet). No + extension modules (tables, footnotes, gfm-strikethrough, etc.) + are used by GraphCompose. Consumers that relied on extensions + flowing through GraphCompose must depend on the relevant + `flexmark-ext-*` modules explicitly. +- Added `jcl-over-slf4j` as an explicit compile dependency. PDFBox + 3.0.7's `PDDocument.` calls `org.apache.commons.logging. + LogFactory` directly; we exclude PDFBox's own `commons-logging` + artifact to keep one logging facade, and the bridge routes those + calls through SLF4J. Previously the bridge was provided + transitively via `flexmark-all`; making it explicit keeps the + classpath reproducible after the flexmark narrowing above. ### Internal diff --git a/pom.xml b/pom.xml index 25f9af0b..db3ea72c 100644 --- a/pom.xml +++ b/pom.xml @@ -122,6 +122,21 @@ slf4j-api ${slf4j.version} + + + org.slf4j + jcl-over-slf4j + ${slf4j.version} + org.apache.pdfbox @@ -135,9 +150,29 @@ + + + com.vladsch.flexmark + flexmark + ${flexmark.version} + + + com.vladsch.flexmark + flexmark-util-ast + ${flexmark.version} + com.vladsch.flexmark - flexmark-all + flexmark-util-data ${flexmark.version}