fix: jcpan -t MD5 (Digest::MD5 addfile + bareword IO)#712
Merged
Conversation
- DigestMD5.addfile: resolve handles via RuntimeIO.getRuntimeIO without requiring a reference; apply binmode(:raw) while reading. - RuntimeIO.getRuntimeIO: for bareword-compiled string handles, peek known packages before vivifying the wrong stash slot; fall back to GlobalVariable helper when the real glob lives under another package (GAAS/MD5 t/md5.t). - GlobalVariable: add pickGlobWithOpenIoForSimpleHandleName for stash scan. Generated with Cursor (https://cursor.com) Co-Authored-By: Cursor <noreply@cursor.com> Co-authored-by: Cursor <cursoragent@cursor.com>
RuntimeIO string resolution iterated CallerStack.peek(), which resolves lazy caller frames and mutated the stack during unrelated IO lookups — breaking eval/package diagnostics (uni/package.t, comp/package_block.t, run/switches.t). Revert getRuntimeIO symbolic-name handling to the pre-712 main:: normalization. Keep bareword addfile(F) working by resolving stash globs only inside DigestMD5.addfile via GlobalVariable.pickGlobWithOpenIoForSimpleHandleName. Generated with Cursor (https://cursor.com) Co-Authored-By: Cursor <noreply@cursor.com> Co-authored-by: Cursor <cursoragent@cursor.com>
When `package NAME {` hit EOF before `}`, parseOptionalPackageBlock cleaned up
scopes then called TokenUtils.consume(OPERATOR, "}") and surfaced a lexer-style
"Expected token ... EOF" message. Perl reports "Missing right curly" instead;
tests: uni/package.t (comp/package_block.t section), comp/package_block.t.
Generated with Cursor (https://cursor.com)
Co-Authored-By: Cursor <noreply@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
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
Fixes
./jcpan -t MD5(GAASMD5-2.03/t/md5.t), which failed withNot a GLOB referenceon barewordaddfile(F).Root cause
DigestMD5.addfilerequired a “reference” and bailed out early.main::Fwith no IO) while the open handle lived under the real package (e.g.MD5Test::F).Changes
DigestMD5.addfile: resolve viaRuntimeIO.getRuntimeIO, usebinmode(:raw)while reading; still no plain-path filename mode (keepsunit/digest_md5.tbehavior).RuntimeIO.getRuntimeIO: for simple identifier strings, peek candidate packages before vivifying; optional stash scan viaGlobalVariable.pickGlobWithOpenIoForSimpleHandleName.GlobalVariable: new helper to find an IO glob by short handle name when package-qualified lookup missed.Verification
make(full unit suite) — passtimeout 300 ./jcpan -t MD5— pass (14/14)