Repository navigation
Modernize dev/CI infrastructure, fix XS blessed-ref bug, prep 1.103_001 - #7
Merged
Merged
Conversation
Per-distribution Docker dev environment that runs without host Perl. A thin Dockerfile wrapper adds a non-root `perl` user atop perldocker/perl-tester so bind-mount writes do not leak root ownership onto the host. The compose project name `params-util` scopes all volumes (cpanm-cache-*, locallib-dev) under that prefix, preventing dependency contamination between sibling CPAN distributions sharing the same Docker engine. Matrix services cover stable Perls 5.30 through 5.42; the `dev` service runs 5.42 as the devcontainer primary with persistent local::lib at /opt/perl5 so author deps survive container restarts. MANIFEST.SKIP excludes the new dev/CI artifacts (.devcontainer/, docker-compose.yml, .github/) from the CPAN tarball. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: Jens Rehsack <sno@netbsd.org>
Two `requires` keys in the same hashref overwrote rather than merged in the META_MERGE test prereqs section, leaving only Test::LeakTrace declared. Test::More and the rest of %TEST_DEPS were silently dropped from the META develop section, so smokers without Test::More installed would have hit a runtime failure rather than a clean prereq miss. Merge both into one hashref so all test prereqs are declared. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: Jens Rehsack <sno@netbsd.org>
xt/perlcritic.t flagged the public _SCALAR0/_ARRAY0/_HASH0/_SET0 predicates in PP.pm via Bangs::ProhibitNumberedNames. Renaming would break the established Params::Util API, so the policy is added to the per-file no-critic block at the top of PP.pm. xt/perltidy.t failures: spacing in three driver-test fixtures and the SKIP bracket in Makefile.PL, plus a side-effect collapse of the test prereqs onto one line. All produced by perltidy with the existing .perltidyrc. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: Jens Rehsack <sno@netbsd.org>
Travis-CI has not been the project's primary or backup CI for some time; testing now runs on GitHub Actions, and the next commit moves the Linux matrix to perldocker containers. Drop the legacy file and its MANIFEST.SKIP guard. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: Jens Rehsack <sno@netbsd.org>
Replace the host-based shogo82148/actions-setup-perl matrix with
perldocker/perl-tester containers for the Linux pipeline. This matches
the local docker-compose dev environment exactly and eliminates
"works locally, fails in CI" drift on the Linux side.
Layout:
- dist: builds the tarball inside perldocker:5.42, publishes artifact
- test-linux: matrix on perl 5.30..5.42 x {default, pureperl}, plus a
pureperl + force-CC-failure smoke job on 5.42
- test-other-os: macOS + Windows-latest with shogo82148/setup-perl on
the most recent stable Perl. Linux containers cannot exercise Apple
clang or Strawberry/MSVC, so XS-build verification on those platforms
stays on host runners.
Auto-discovery of Perl versions via shogo82148 is dropped; the matrix
list now lives in the workflow file (and mirrors docker-compose.yml).
A future SSOT file (.perl-versions or similar) could de-duplicate, but
that is left for when more distros adopt the same pattern.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: Jens Rehsack <sno@netbsd.org>
Closes #3. The XS implementations of _HASH, _HASH0, _ARRAY and _ARRAY0 used is_hash() and is_array() helpers that only check the underlying SV type, not the blessed status. The pure-perl versions check `ref X eq 'HASH'` / `'ARRAY'`, which excludes blessed refs as documented ("raw and unblessed"). Issue #3 reported the divergence on _HASH0; the same defect existed in three sibling functions. Add `!sv_isobject(ref)` at the four call sites rather than changing is_hash/is_array, so _ARRAYLIKE and _HASHLIKE (which intentionally accept blessed plain refs and overload-equipped objects) are unaffected. Regression tests added to both pp and xs variants of t/02_main.t for each function, with empty/non-empty blessed inputs as appropriate. _ARRAYLIKE / _HASHLIKE / _INSTANCE coverage of blessed inputs already exists in t/05_typelike.t and t/02_main.t respectively. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: Jens Rehsack <sno@netbsd.org>
Refresh ppport.h from the version bundled with the current Devel::PPPort release. Picks up support for newer Perls including 5.42 and brings the file in line with upstream PPPort additions since the previous regeneration (3.62, shipped with 1.102). Generated under perl 5.42.2 inside the devcontainer. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: Jens Rehsack <sno@netbsd.org>
Summarise the user-visible changes introduced on the modernize-dev-infra branch: the #3 fix, the META test-prereqs correction, the ppport.h refresh, the CI pivot from Travis to GitHub Actions on perldocker containers, the new devcontainer setup, and the author-test cleanups. Date is left as "unreleased"; will be set at release time. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: Jens Rehsack <sno@netbsd.org>
lib/Params/Util.pm pulls in `parent` via `use parent qw{Exporter
XSLoader}`, but the module was only listed under CONFIGURE_REQUIRES
(via %CONFIGURE_DEPS in Makefile.PL), not under PREREQ_PM. The
distribution declares 5.008 as its minimum Perl, and `parent` only
became core in 5.10.1, so installs on older Perls would fail at
runtime with "Can't locate parent.pm".
Add `parent => 0` to %RUN_DEPS so it appears in PREREQ_PM and the
META runtime/requires section.
Verified via MYMETA.json after `perl Makefile.PL` in the devcontainer.
Also expand the Changes 1.103 entry to record this fix alongside the
existing RT#75561 cross-reference for the GH#3 work.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: Jens Rehsack <sno@netbsd.org>
Bump VERSION in lib/Params/Util.pm and lib/Params/Util/PP.pm to 1.103_001 and set the Changes header to today's date. The underscore in the version marks this as a TRIAL release on PAUSE — not indexed by default, useful for soliciting CPAN smoker results on the XS blessed-ref fix and the new perldocker CI matrix before cutting 1.103 final. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: Jens Rehsack <sno@netbsd.org>
GitHub Actions rejected the workflow with "expression not closed" at
line 33. Cause: YAML single-quoted scalars decode `''` to a literal
apostrophe, so the GHA empty-string `''` in `... || '' }}` collapsed
to a single quote, breaking expression parsing.
Switch to the unquoted-YAML + `fromJSON('[...]')[bool]` indexing form
used by the previous workflow. Same human-readable result, no quote
collisions. The `test-other-os` `name:` is also unquoted for
consistency.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: Jens Rehsack <sno@netbsd.org>
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
Modernize the test/dev infrastructure for Params-Util and address several long-standing issues. Cut as
1.103_001(TRIAL/developer release) so the XS blessed-ref fix and the new CI matrix can soak through CPAN smokers before promoting to1.103final.Bugs fixed
_HASH,_HASH0,_ARRAY,_ARRAY0now reject blessed references, matching the documented "raw and unblessed" contract and the pure-perl behaviour. (Reported 2012 by AUBERTG, patches 2014 by PCOCHRANE, PP-as-reference confirmed 2024 by rjbs, GH re-report by @wolfsage.)parentas a runtime prerequisite —lib/Params/Util.pmdoesuse parent qw{Exporter XSLoader}butparentwas only inCONFIGURE_REQUIRES.requireskey in the test prereqs hash silently droppedTest::MoreandStorablefrom the develop section.Infrastructure
.devcontainer/+docker-compose.ymlwith non-rootperluser, per-distro volume scoping, matrix services for Perl 5.30..5.42.perldocker/perl-testercontainers; macOS-latest and Windows-latest stay on host runners (Strawberry) to verify XS builds under clang and MSVC respectively..travis.ymlremoved.Out of scope (deferred)
lib/Params/Util.pm(_CAN, assertion-variant, Test::-variant) — feature additions, separate work.Commits
Test plan
docker compose run --rm perl-5.42green (already verified)_HASH0(bless {}, 'cat')) returns undef under XSCloses #3.
🤖 Generated with Claude Code