Fix bundled CPAN module regressions#858
Merged
Merged
Conversation
Fix remaining bundled CPAN module failures for Class::DBI and XML::TreePP, and repair weak-reference lifetime handling exposed by DBIx::Class. Defer automatic weak sweeps while temporary roots protect return-value handoff so live object graphs are not destroyed before caller assignment completes. Add regression coverage for weak cache cleanup after failed construction and returned object handoff assignment. Generated with OpenAI Codex Co-Authored-By: OpenAI Codex <codex@openai.com>
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.
Summary
Notes
The Class::DBI patch is not a test bypass. Class::DBI objects overload boolean context, so the live-object cache must test
refrather than truthiness. Class::DBI already uses the samerefpattern in its HasA relationship code because overloaded objects may appear false.DBIx::Class uncovered a separate runtime lifetime issue: an immediate weak sweep could run while a returned object graph was only protected by temporary roots during caller assignment. The runtime fix is generic and does not special-case DBI or DBIx::Class.
Verification
makemake test-bundled-modulestimeout 3600 ./jcpan -t DBIx::Classtimeout 1800 ./jcpan -t Class::DBItimeout 900 ./jcpan -t XML::TreePPperlbeforejperlgit diff --check