Skip to content

Add Perl 5.36 support#1

Open
riccardo-perotti wants to merge 1 commit into
masterfrom
rp.ROP-9262.perl-536-support
Open

Add Perl 5.36 support#1
riccardo-perotti wants to merge 1 commit into
masterfrom
rp.ROP-9262.perl-536-support

Conversation

@riccardo-perotti

Copy link
Copy Markdown

Ports perl-sys to Perl 5.36. Upstream (vickenty/perl-sys) is frozen ~2021 and predates Perl's 5.31 embed.fnc flag rework, so it can't generate bindings for 5.36. This is needed to build gt-core's Rust XS cdylib on the new Debian Bookworm / Perl 5.36 base image.

master was fast-forwarded from the dormant 2019 fork-point to current upstream HEAD (725fb43) first, so this PR is just the 5.36 changes.

Changes (all under build/)

  • embed.fnc/v5.36 — Perl 5.36.0's embed.fnc (the per-version API data file perl-sys generates from).
  • regen.plSTUB_TYPES += 5.36's new opaque structs (COP, REGEXP, PMOP, LOGOP, OPSLAB, PERL_SI, yy_parser); plus an up-front filter that skips functions whose types the mapper can't model (niche interpreter internals), keeping every render site consistent.
  • lib/PerlSys/EmbedFnc.pm — honor the T ("no implicit pTHX") flag, renamed from n in 5.36 (fixes a C redefinition of parameter 'my_perl' in the interpreter-lifecycle wrappers); and select functions by linkability (A/p/b) rather than the stale A/!M/!D heuristic, so core fns the 5.31 rework reflagged (hv_fetch, sv_iv, …) still bind.
  • build.rs — declare cargo:rerun-if-changed inputs so generator edits actually re-trigger.

Verification

Builds gt-core's cdylib (libgtcore.so) and passes cargo test 7/7 against Perl 5.36 in perl-base-image-v2 (via a Cargo [patch] to this fork).

Follow-up

  • ROP-9263 — fully map the remaining 5.36 API types and remove the skip-filter (the ~38 niche functions currently dropped; none used by gt-core).

Jira Tickets

🤖 Generated with Claude Code

Port perl-sys to Perl 5.36 — upstream (vickenty) is frozen ~2021 and
predates Perl's 5.31 embed.fnc flag rework:

  - add build/embed.fnc/v5.36 (Perl 5.36.0's embed.fnc)
  - STUB_TYPES += 5.36's new opaque structs (COP, REGEXP, PMOP, LOGOP,
    OPSLAB, PERL_SI, yy_parser)
  - regen.pl: skip functions whose types perl-sys can't map (niche
    internals; none used by gt-core) so every render site stays consistent
  - EmbedFnc.pm: honor the 'T' (no-pTHX) flag, renamed from 'n' in 5.36,
    fixing a C "redefinition of parameter 'my_perl'"
  - EmbedFnc.pm: select fns by linkability (A/p/b) instead of the stale
    A/!M/!D heuristic, so reflagged core fns (hv_fetch, sv_iv, ...) bind
  - build.rs: declare cargo:rerun-if-changed inputs

Builds gt-core's cdylib and passes cargo test 7/7 against Perl 5.36.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

JiraID:ROP-9262
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