Skip to content

Cycle list refactor#158

Merged
Velli20 merged 4 commits into
mainfrom
cycle-list-refactor
May 19, 2026
Merged

Cycle list refactor#158
Velli20 merged 4 commits into
mainfrom
cycle-list-refactor

Conversation

@Velli20
Copy link
Copy Markdown
Owner

@Velli20 Velli20 commented May 19, 2026

No description provided.

codex added 4 commits May 17, 2026 18:26
Add shared reader traits in pdf-page so dictionary-backed and
stream-backed objects own their cycle handling in one place.
The default cyclic_read path now returns a cyclic dependency
error, while PdfPages keeps its branch-skipping behavior.

Update the page reader, XObject reader, ExtGState reader, and
call sites to use the trait entrypoints directly.
Document the new object_reader module and keep the public
reader APIs consistent across the workspace.

Co-authored-by: Codex <codex@openai.com>
Replace the shared cycle-list wrapper with direct HashSet
tracking in pdf-page's default resource cache and in
pdf-object-collection's reference resolver.

The page reader traits already own begin/end cycle handling,
so the extra helper struct was redundant and removed along
with its public module export.

Co-authored-by: Codex <codex@openai.com>
Move active read tracking out of ResourceCache and into
pdf-page's object readers so the cycle guard lives beside
the ReadFromDictionary and ReadXObject entrypoints.

Thread a dedicated ReadCycleTracker through page, resource,
and XObject parsing, while keeping lazy cache placeholder
resolution separate from active-read cycle detection.

Update the document page-tree entrypoint and the related
tests to construct and pass the tracker explicitly.

Co-authored-by: Codex <codex@openai.com>
Return cyclic dictionary and XObject reads as None instead of
threading cyclic-dependency errors through call sites. This keeps the
page-tree, resource, pattern, and soft-mask code paths explicit about
optional recursive results while removing the old predicate helpers.

Also drop the redundant cyclic-dependency helpers from the page and
image error types.

Co-authored-by: Codex <codex@openai.com>
@Velli20 Velli20 merged commit 4d9d931 into main May 19, 2026
4 checks passed
@Velli20 Velli20 deleted the cycle-list-refactor branch May 19, 2026 18:31
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.

2 participants