refactor(engine): retire the dormant ECS/Entity runtime#353
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The render path —
DocumentSession→LayoutCompiler→LayoutGraph→ thefixed-layout backend SPI →
PdfFixedLayoutBackend— carries the whole engine, butthe legacy Entity-Component-System runtime (
EntityManager,SystemECS, theEntitycomponent model, the ECS render pipeline) is dormant: nothing on that pathreferences it. It only stayed compiled because a handful of live value types and one
snapshot helper still linked against it.
What
engine.core.*(EntityManager/SystemECS/Canvas/ …), the
Entitycomponent model with itsgeometry/layout.coordinator/renderablecompanions,engine.pagination.*,engine.render.*with theengine.render.guidesrenderers,engine.exceptions.*, andLayoutSnapshotExtractor— plus the unit tests andcom.demcha.mockfixtures thatonly drove them (46 main + 13 test files).
Margin/Padding/Anchordrop their ECS render methods and theRenderCoordinateinterface; they stay plain value types (still carrying theempty
Componentmarker) with every factory / accessor /equals/hashCodeunchanged.
ParagraphWrapping/TextFlowSupportcallTextControlSanitizer.remove(...)directly — the removed
BlockText.sanitizeTextwas a pure delegate to it.LayoutInsetsSnapshotinlines the snapshot-rounding helper it borrowed fromLayoutSnapshotExtractor.removal in the 2.0 changelog. The four public snapshot records, the
Componentmarker,
Anchor/HAnchor/VAnchor,ContentSize, and the liveengine.render.{word,pdf}trees are kept.Tests
./mvnw -f aggregator/pom.xml verify -pl :graph-compose-qa -am— full multi-modulecompile + 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.removed type.