Repository navigation
Resolve the named root before synthesizing a Model layout - #122
Merged
HakanSeven12 merged 1 commit intoOct 19, 2026
Merged
Conversation
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.
When a minimal DXF has an empty, handle-less DICTIONARY, reference resolution assigns it a handle after OBJECTS reading.
ensure_model_layoutthen uses the stale named-root cache and synthesizes a layout dictionary owned by an absent object. An empty OBJECTS section can leave the same dangling ownership.Resolve a unique existing root, or create one when none exists, before synthesizing the Model layout. Resolve
ACAD_LAYOUTby its named membership instead of reusing an unrelated cached dictionary. Synchronize the root/layout caches and complete both membership and ownership. Null identities, ambiguous roots and conflicting named targets are not reused; conflicts produce a warning without replacing the source objects.Regression tests cover empty and handle-less roots, repeated preparation, DXF read/write/read with unchanged LINE endpoints, unrelated cached metadata, null identities and conflicting/ambiguous source graphs. The tests stand independently of the separate existing-layout cache fix and require no external drawings.
Validation against upstream
5d4f11a(acadrust0.6.4):cargo check --all-targets --all-featurespasses;cargo test --workspacepasses 2001 tests including doctests; the all-features root/layout regressions pass 6 tests. The new regression tests fail on the unmodified current base and pass with this patch. Full all-features suites are also covered by the existing PR CI workflow.The unmodified base already fails
cargo fmt --all -- --checkandcargo clippy --workspace --all-targets -- -D warningson Rust 1.98. The final clippy error multiset matches that baseline; unrelated formatting/lint changes are excluded from this PR.Related independent fix: #121 resolves the existing-layout DXF dictionary cache. Neither PR depends on the other.