fix: unblock jcpan -t Reply (PerlIO::utf8_strict stub)#636
Merged
Conversation
`./jcpan -t Reply` failed because PerlIO::utf8_strict (XS) has no Java
implementation. It is pulled in by Mixin::Linewise::Readers, which
Config::INI::Reader (and therefore Config::INI::Reader::Ordered, a
direct prereq of Reply) requires at compile time. Without it,
Config::INI::Reader::Ordered's own test suite and Reply's
t/00-compile.t both fail to load most of the Reply tree.
Changes:
* Add `src/main/perl/lib/PerlIO/utf8_strict.pm` as a load-only stub.
* Treat `:utf8_strict` as an alias for `:utf8` in
`LayeredIOHandle.addLayer` — the JVM's UTF-8 CharsetDecoder already
rejects malformed input, which matches the XS module's "strict"
semantics.
After this change:
* `Config::INI::Reader::Ordered` 0.022 — t/reader-ordered.t passes.
* `Reply` 0.42 — 23/24 of t/00-compile.t pass; the only remaining
failure is `Reply/Plugin/LexicalPersistence.pm loaded ok`, which
requires PadWalker (XS lexical-pad introspection). Stubbing
PadWalker is left out of this PR because the module's API cannot
be meaningfully emulated without a real Perl-style pad model.
Generated with [Devin](https://cli.devin.ai/docs)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
ca403af to
09ecb8b
Compare
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
./jcpan -t Replyfailed becausePerlIO::utf8_strict(XS) has no Java implementation. It is pulled in byMixin::Linewise::Readers, whichConfig::INI::Reader(and thereforeConfig::INI::Reader::Ordered, a direct prereq ofReply) requires at compile time. Without it,Config::INI::Reader::Ordered's own test suite and most ofReply'st/00-compile.tfail to load.Changes
src/main/perl/lib/PerlIO/utf8_strict.pmas a load-only stub.:utf8_strictas an alias for:utf8inLayeredIOHandle.addLayer— the JVM's UTF-8CharsetDecoderalready rejects malformed input, which matches the XS module's "strict" semantics.Not in this PR
Reply::Plugin::LexicalPersistencestill fails its compile test because itusesPadWalker(XS lexical-pad introspection).PadWalker's API cannot be meaningfully emulated without a real Perl-style pad model, so a stub would be misleading. Left out intentionally — only that one subtest oft/00-compile.tremains failing.Test plan
make— full unit test suite passes../jcpan -t Reply—Config::INI::Reader::Ordered0.022t/reader-ordered.tpasses;Reply0.42t/00-compile.tgoes from 5 failures down to 1 (the PadWalker one above).Generated with Devin