Skip to content

fix: preserve Type::Tiny deparse source metadata - #882

Closed
fglock wants to merge 7 commits into
masterfrom
fix/type-tiny-compiler
Closed

fix: preserve Type::Tiny deparse source metadata#882
fglock wants to merge 7 commits into
masterfrom
fix/type-tiny-compiler

Conversation

@fglock

@fglock fglock commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • Preserve compiler-retained anonymous-sub source metadata through RuntimeCode transfers.
  • Expose exact source spans through Internals::jperl_cv_deparse_info.
  • Make B::Deparse prefer exact runtime spans and retain source-visible fallback behavior.

Validation

  • make — passes.
  • Focused Error-TypeTiny-Assertion/basic.t — still has one failure: the Any->create_child_type explanation reports sub { "DUMMY" } instead of sub { 0; }.

The remaining Type::Tiny failure is documented explicitly so CI/review can confirm whether the unresolved path is covered by the project checks.

Generated with Codex

Co-Authored-By: Codex 158243242+openai-codex@users.noreply.github.com

fglock and others added 7 commits August 3, 2026 10:23
Allow the native Storable writer to serialize Perl code references when Storable::Deparse is enabled, using compiler-retained source text. Add a unit regression test validated against standard Perl.

Generated with [Codex](https://openai.com/codex)

Co-Authored-By: Codex <158243242+openai-codex[bot]@users.noreply.github.com>
(cherry picked from commit 57a55e4)
Carry anonymous-sub source spans through Internals and RuntimeCode definition
transfers so B::Deparse can recover compiler-retained source for CPAN closures.
Use the exact span before line-based source heuristics and retain compatibility
with existing source-visible deparse behavior.

Generated with [Codex](https://openai.com/codex)

Co-Authored-By: Codex <158243242+openai-codex@users.noreply.github.com>
Carry parser source spans and bounded source text through interpreted
anonymous subroutines and closure copies. Make B::Deparse use the standard
source formatter while honoring ambient pragmas and AST offsets that fall
inside the subroutine body.

Generated with [Codex](https://openai.com/codex)

Co-Authored-By: Codex <158243242+codex[bot]@users.noreply.github.com>
Include each distribution's inc directory in the PERL5LIB generated for
Test::Harness child processes. This lets bundled test helpers such as
Test::Fatal remain discoverable during jcpan test runs.

Generated with [Codex](https://openai.com/codex)

Co-Authored-By: Codex <158243242+codex[bot]@users.noreply.github.com>
Make Scalar::Util::looks_like_number treat false as non-numeric while true
remains numeric, matching Perl and the Type::Tiny numeric constraints.

Generated with [Codex](https://openai.com/codex)

Co-Authored-By: Codex <158243242+codex[bot]@users.noreply.github.com>
Preserve blessed Perl die payloads when eval compilation catches a BEGIN-time exception, and parse known callback subs with block arguments as anonymous CODE references.

Generated with Codex

Co-Authored-By: Codex <noreply@openai.com>
@fglock fglock closed this Aug 4, 2026
@fglock
fglock deleted the fix/type-tiny-compiler branch August 4, 2026 07:54
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