Skip to content

build: extract graph-compose-testing into its own module#300

Merged
DemchaAV merged 4 commits into
2.0-devfrom
build/2.0-extract-testing
Jul 5, 2026
Merged

build: extract graph-compose-testing into its own module#300
DemchaAV merged 4 commits into
2.0-devfrom
build/2.0-extract-testing

Conversation

@DemchaAV

@DemchaAV DemchaAV commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Why

The consumer testing helpers — LayoutSnapshotAssertions (deterministic layout
snapshots) and PdfVisualRegression (page pixel-diff) — shipped inside the
graph-compose jar, pulling Jackson and PDFBox onto every consumer. 2.0 splits
them into their own module so the core stays lean and consumers add the testing
support at test scope only when they want it. The packages are unchanged, so
imports stay the same; only the artifact that carries them moves.

What

  • graph-compose-testing — new published module (standalone + lockstep with
    the engine, like render-docx), carrying com.demcha.compose.testing.{layout,visual}
    plus its Jackson + PDFBox dependencies. The engine pom drops Jackson.
  • graph-compose-qa — new non-published module (aggregator child at the
    reactor tail) holding the cross-module suites that import the testing module.
    They can't stay in the engine's test scope: the engine can't test-depend on a
    module that compile-depends on it (a reactor cycle). They reuse the engine's
    shared test scaffolding through its existing tests-classifier jar, and their
    snapshot/visual baselines move with them.
  • Build / CI / release wiring — both modules added to aggregator/pom.xml;
    the CI build gate now runs the engine + testing + qa reactor slice on every
    matrix JDK; publish.yml deploys graph-compose-testing after the engine;
    cut-release.ps1 bumps and commits testing/pom.xml in lockstep (qa inherits
    its version from the aggregator, so it needs none).
  • VersionConsistencyGuardTest extended to hold graph-compose-testing and
    graph-compose-render-docx at the engine version and to require qa to inherit
    its version.
  • Consumer docs + CHANGELOG note the new test-scope dependency; imports are
    unchanged.

Tests

  • Standalone engine: ./mvnw clean verify -pl . → BUILD SUCCESS, 1229 tests.
  • Reactor slice: ./mvnw -f aggregator/pom.xml clean verify -pl :graph-compose,:graph-compose-testing,:graph-compose-qa -am
    → BUILD SUCCESS — engine + graph-compose-testing (7) + graph-compose-qa (134).
    The moved snapshot/visual suites pass against their relocated baselines, so
    renders stay byte-identical.

DemchaAV added 4 commits July 5, 2026 18:44
The consumer testing helpers — LayoutSnapshotAssertions (deterministic layout
snapshots) and PdfVisualRegression (page pixel-diff) — shipped inside the engine
jar, forcing Jackson and PDFBox onto every graph-compose consumer. Split them
into their own published, lockstep-versioned module so the core stays lean and
consumers opt in at test scope. Imports are unchanged (same
com.demcha.compose.testing.* packages); only the artifact carrying them moves.

- New graph-compose-testing module (standalone + published, like render-docx),
  carrying com.demcha.compose.testing.{layout,visual} plus its Jackson and PDFBox
  dependencies. The engine pom drops Jackson.
- New non-published graph-compose-qa module (aggregator child, reactor tail) for
  the cross-module suites that need the testing module on the classpath — they
  cannot stay in the engine's test scope without a reactor cycle. They reuse the
  engine's shared test scaffolding through its existing tests-classifier jar, and
  their snapshot/visual baselines move with them.
- Wire both into aggregator/pom.xml, publish.yml (deploy testing), and
  cut-release.ps1 (bump + commit testing); the CI build gate now runs the
  engine + testing + qa reactor slice on every matrix JDK.
- VersionConsistencyGuardTest now holds graph-compose-testing and
  graph-compose-render-docx at the engine version and requires qa to inherit its
  version from the aggregator parent.
The examples module used Jackson (EngineDeckData reads the comparative-benchmark
JSON) and LayoutSnapshotJson (LayoutSnapshotRegressionExample), both of which it
had been getting transitively from the engine jar. With Jackson and the testing
helpers now out of the core, the examples build lost them. Add a direct
graph-compose-testing dependency — it supplies LayoutSnapshotJson and brings
jackson-databind transitively, restoring the examples compile.
The examples module now depends on graph-compose-testing (for LayoutSnapshotJson
and the jackson it brings). Like render-docx, that module is a SNAPSHOT not on
Maven Central, so the examples-generation job must install it into the local repo
after the engine, or dependency resolution fails before compile.
…case exec

cut-release.ps1's ShowcaseSync installs only the root artifact before running the
examples module via exec:java, but examples also depends on the bumped render-docx
and graph-compose-testing SNAPSHOTs, which are not on Maven Central. After the
Step-1 version bump they are absent from the local repo, so exec:java fails to
resolve them. Install each sibling alongside the root, and mirror the commands in
the -DryRun preview.
@DemchaAV DemchaAV merged commit 1a4eb45 into 2.0-dev Jul 5, 2026
10 checks passed
@DemchaAV DemchaAV deleted the build/2.0-extract-testing branch July 5, 2026 19:11
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