Skip to content

build: narrow flexmark-all to targeted modules + jcl-over-slf4j bridge (F3)#108

Merged
DemchaAV merged 1 commit into
developfrom
chore/flexmark-targeted-modules
Jun 1, 2026
Merged

build: narrow flexmark-all to targeted modules + jcl-over-slf4j bridge (F3)#108
DemchaAV merged 1 commit into
developfrom
chore/flexmark-targeted-modules

Conversation

@DemchaAV
Copy link
Copy Markdown
Owner

@DemchaAV DemchaAV commented Jun 1, 2026

Summary

Continues the v1.6.7 dependency-cleanup cycle. Implements track
F3 from the readiness taskboard using the
F1 audit as input.

What changed

  • flexmark-all → targeted modules. GraphCompose's only
    flexmark consumer is com.demcha.compose.engine.text.markdown.MarkDownParser,
    which references core parser + AST classes, util.ast.Node/
    NodeVisitor/VisitHandler, and util.data.MutableDataSet.
    The aggregator pulled ~40 jars (extensions, formatters,
    converters) the codebase never touches. Replaced with
    flexmark (core), flexmark-util-ast, flexmark-util-data.
  • jcl-over-slf4j added explicitly. Fixing F3 surfaced a
    latent gap: PDFBox 3.0.7's PDDocument.<clinit> still calls
    org.apache.commons.logging.LogFactory directly. We
    intentionally exclude PDFBox's own commons-logging artefact
    (single logging facade — SLF4J), but the bridge was provided
    transitively via flexmark-all. Without it, every
    PDDocument-touching test now fails with NoClassDefFoundError
    at clinit. The standard SLF4J bridge fixes it cleanly.

Consumer impact

Callers that depended on flexmark extensions (flexmark-ext-tables,
gfm-strikethrough, footnotes, …) flowing transitively through
GraphCompose must depend on those modules explicitly. Logging
behaviour is unchanged for consumers — SLF4J was already the
project's logging facade.

Test plan

  • ./mvnw test -pl .1031 tests, 0 failures, 0 errors
  • ./mvnw dependency:tree -pl .flexmark-all removed; 3
    direct flexmark modules + 8 transitive util-* (vs ~40 from
    the aggregator); jcl-over-slf4j present; PDFBox's
    commons-logging excluded as before.
  • ./mvnw verify -pl . -P japicmp — semver OK vs v1.6.6.

…e (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.<clinit>` 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.
@DemchaAV DemchaAV force-pushed the chore/flexmark-targeted-modules branch from a594a10 to a14709b Compare June 1, 2026 11:20
@DemchaAV DemchaAV merged commit 09e07e4 into develop Jun 1, 2026
11 checks passed
@DemchaAV DemchaAV deleted the chore/flexmark-targeted-modules branch June 1, 2026 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant