Skip to content

refactor(engine): retire the dormant ECS/Entity runtime#353

Merged
DemchaAV merged 1 commit into
2.0-devfrom
refactor/retire-ecs-cluster
Jul 10, 2026
Merged

refactor(engine): retire the dormant ECS/Entity runtime#353
DemchaAV merged 1 commit into
2.0-devfrom
refactor/retire-ecs-cluster

Conversation

@DemchaAV

Copy link
Copy Markdown
Owner

Why

The render path — DocumentSessionLayoutCompilerLayoutGraph → the
fixed-layout backend SPI → PdfFixedLayoutBackend — carries the whole engine, but
the legacy Entity-Component-System runtime (EntityManager, SystemECS, the
Entity component model, the ECS render pipeline) is dormant: nothing on that path
references it. It only stayed compiled because a handful of live value types and one
snapshot helper still linked against it.

What

  • Removed the ECS cluster: engine.core.* (EntityManager / SystemECS / Canvas
    / …), the Entity component model with its geometry / layout.coordinator /
    renderable companions, engine.pagination.*, engine.render.* with the
    engine.render.guides renderers, engine.exceptions.*, and
    LayoutSnapshotExtractor — plus the unit tests and com.demcha.mock fixtures that
    only drove them (46 main + 13 test files).
  • Decoupled the six live leaves that still compiled against it, byte-identically:
    • Margin / Padding / Anchor drop their ECS render methods and the
      RenderCoordinate interface; they stay plain value types (still carrying the
      empty Component marker) with every factory / accessor / equals/hashCode
      unchanged.
    • ParagraphWrapping / TextFlowSupport call TextControlSanitizer.remove(...)
      directly — the removed BlockText.sanitizeText was a pure delegate to it.
    • LayoutInsetsSnapshot inlines the snapshot-rounding helper it borrowed from
      LayoutSnapshotExtractor.
  • Pruned the four test-logback loggers that named the removed packages and noted the
    removal in the 2.0 changelog. The four public snapshot records, the Component
    marker, Anchor / HAnchor / VAnchor, ContentSize, and the live
    engine.render.{word,pdf} trees are kept.

Tests

  • ./mvnw -f aggregator/pom.xml verify -pl :graph-compose-qa -am — full multi-module
    compile + javadoc gate + the qa visual/parity byte-identity suite: 643 tests, 0
    failures
    . Rendered output (PDF pixels, layout snapshots, page margins) is
    identical, and the public guideLines(...) overlay is unaffected.
  • A repo-wide grep across all modules confirms zero surviving references to any
    removed type.

The render path — DocumentSession → LayoutCompiler → LayoutGraph → the
fixed-layout backend SPI → PdfFixedLayoutBackend — never touches the old
Entity-Component-System engine. Remove it: the EntityManager / SystemECS
runtime, the Entity component model with its geometry / coordinator /
renderable companions, the ECS render pipeline (engine.render.* and the
engine.render.guides renderers), LayoutSnapshotExtractor, and the unit
tests plus com.demcha.mock fixtures that only exercised them.

Six live leaves that still compiled against the cluster are decoupled with
no change in behavior:

- Margin / Padding / Anchor drop their ECS render methods and the
  RenderCoordinate interface, staying plain value types (still the empty
  Component marker) with every factory, accessor and equals/hashCode intact.
- ParagraphWrapping / TextFlowSupport call TextControlSanitizer.remove(...)
  directly — the removed BlockText.sanitizeText was a pure delegate to it.
- LayoutInsetsSnapshot inlines the snapshot-rounding helper it borrowed from
  LayoutSnapshotExtractor, byte-for-byte.

Output is unchanged: the qa visual/parity suite (643 tests) stays green and
the public guideLines(...) overlay is unaffected.
@DemchaAV DemchaAV merged commit 2d3dfd5 into 2.0-dev Jul 10, 2026
12 checks passed
@DemchaAV DemchaAV deleted the refactor/retire-ecs-cluster branch July 10, 2026 10: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