Skip to content

fix: make jcpan -t Inline pass#746

Closed
fglock wants to merge 1 commit into
masterfrom
fix/jcpan-inline-tests
Closed

fix: make jcpan -t Inline pass#746
fglock wants to merge 1 commit into
masterfrom
fix/jcpan-inline-tests

Conversation

@fglock
Copy link
Copy Markdown
Owner

@fglock fglock commented May 15, 2026

Summary

This fixes ./jcpan -t Inline, which was failing on Inline’s TestML-driven .t files, bogus -I flags from @INC entries under jar:PERL5LIB, and diagnostics.pm treating eval-bound exceptions as uncaught inside $SIG{__DIE__}.

Changes

  • Internals::abs_path returns existing jar:… library paths unchanged instead of undef (matches -e / Inline’s derive_minus_I expectations).
  • ArgumentParser shebang handling aligns with perlrun: alternate interpreters when #! has no word perl/indir; avoid infinite self-exec for jperl; delegate wrappers such as inc/bin/testml-cpan via PERLONJAVA_EXECUTABLE when their own shebang points at jperl; keep the original argv spelling (t/foo.t) so TestML path rewriting works.
  • diagnostics.pm detects eval context from (eval N) line in the exception text when caller() does not expose an (eval) frame during $SIG{__DIE__}.

Test plan

  • make (full unit test shard suite)
  • timeout 600 ./jcpan -t Inline → PASS (33 tests)

- Treat jar:PERL5LIB paths as stable absolutes in Internals::abs_path so
  Inline::derive_minus_I never emits bare -I flags.
- Implement perlrun-style alternate shebang delegation for wrappers such as
  inc/bin/testml-cpan (word-boundary perl/indir detection, skip self-exec,
  spawn via PERLONJAVA_EXECUTABLE when the wrapper targets jperl).
- Preserve argv spelling when delegating so TestML path rewrites stay relative.
- In diagnostics.pm death_trap, detect eval context from "(eval N) line"
  when caller lacks an (eval) frame under $SIG{__DIE__}.

Verified: make; ./jcpan -t Inline

Generated with [Cursor](https://cursor.com/docs)

Co-Authored-By: Cursor <cursoragent@cursor.com>
@fglock fglock closed this May 15, 2026
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