Module::Build support#327
Merged
Merged
Conversation
- croak-locations.t now passes all 29 tests (was failing 2) - Updated test results: 65/71 (91.5%), 808/839 subtests (96.3%) - All remaining failures are expected (DESTROY/weak refs) - Marked Phase 38 as complete Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <noreply@cognition.ai>
- Update YAML.pm version from 0.01 to 1.31 - CPAN.pm requires >= 0.60; this silences the "YAML version too low" warning - Our YAML.pm wraps YAML::PP which provides full functionality - Update cpan_client.md: mark YAML and DistnameInfo issues as resolved Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <noreply@cognition.ai>
- Fix JVM backend Dereference.java to check isStrictOptionEnabled for
${"name"}[index] syntax, using arrayDerefGetNonStrict when appropriate
- Add bytecode interpreter support for symbolic array element access
- Add File::Compare.pm for Module::Build dependency
- Add VERSION to File::Spec (3.95) and Encode (3.21) for CPAN detection
- Update YAML.pm version to 1.31 to silence CPAN.pm warning
Generated with [Devin](https://cli.devin.ai/docs)
Co-Authored-By: Devin <noreply@cognition.ai>
Key fixes: - FileHandle parser: Check for CODE ref before treating bareword as filehandle This fixes "print myconfig" where myconfig is an imported subroutine - jperl: Fix CLASSPATH handling to avoid adding current directory Empty CLASSPATH was causing ":$JAR_PATH" which added "." to classpath - Config.pm: Add myconfig() function for Module::Build compatibility - Module::Build::Base stub: Override have_forkpipe() to disable fork pipes JVM cannot support fork(), so Module::Build uses backticks instead Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <noreply@cognition.ai>
Required by Module::Build for MANIFEST file handling. Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <noreply@cognition.ai>
1. FileTestOperator: Handle null lastBasicAttr when using underscore (_) filehandle after testing a JAR path. Fall back to re-testing the file. 2. File::Path: Fix _make_path_perl to handle relative paths correctly. Previously "_build" became "/_build" (absolute). Now relative paths are preserved. These fixes allow Module::Build Build.PL to complete successfully. Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <noreply@cognition.ai>
When passing an array to system(@cmd) or exec(@cmd), each array element should be a separate command argument. Previously, the array was being stringified (concatenating elements without separator) instead of expanded into individual arguments. Added flattenToStringList() helper to properly expand RuntimeArray and RuntimeList elements into individual string arguments. Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <noreply@cognition.ai>
Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <noreply@cognition.ai>
- Fix ExtUtils::MakeMaker version to 7.70 (remove _perlonjava suffix that broke version comparison) - Add Fcntl VERSION (1.15) to fix version check errors - Add lib.pm (simplified version for @inc manipulation) - Sync Text::Abbrev, IO::Dir, JSON::PP, utf8, vars from perl5 - Mark File::Temp as protected (keep custom PerlOnJava implementation) - Update sync config with new modules Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <noreply@cognition.ai>
- Add SeekableJarHandle for JAR resources with seek support (needed by Module::Metadata for encoding detection) - Fix File::Spec to recognize jar: paths as absolute (prevents CPAN.pm from mangling @inc paths) - Fix circular dependency in ExtUtils::MM and ExtUtils::MY (removed unnecessary use ExtUtils::MakeMaker) Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <noreply@cognition.ai>
- Fix catdir() to preserve leading "/" for absolute paths when first element from splitdir() is empty (representing root directory) - Fix POSIX::access() to return "0 but true" on success instead of 0, matching Perl's semantics where it's false numerically but true in boolean context - Add POSIX access constants F_OK, R_OK, W_OK, X_OK and access() function - Add site installation paths to Config.pm for Module::Build This allows Module::Build to install successfully via jcpan. Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <noreply@cognition.ai>
Implements runtime emulation of Perl's fork-open pattern (open FH, "-|") which normally requires fork(). Since JVM cannot fork, we detect this pattern at runtime and handle it specially: 1. open FH, "-|" without command sets pending state, returns 0 (child) 2. exec @cmd detects pending state, runs command, captures output 3. Throws ForkOpenCompleteException caught by RuntimeCode.apply() 4. Subroutine returns captured output as if parent branch executed This transparently supports Module::Build's _backticks() pattern without requiring any patches to Module::Build itself. New files: - ForkOpenState.java: Thread-local pending state tracking - ForkOpenCompleteException.java: Control flow exception - dev/design/fork_open_emulation.md: Design documentation Modified: - IOOperator.open(): Detect 2-arg "-|" and set pending state - SystemOperator.exec(): Complete pending fork-open with captured output - RuntimeCode.apply(): Catch exception and return captured output Limitation: Only works when fork-open is inside a subroutine. Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <noreply@cognition.ai>
Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <noreply@cognition.ai>
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
Adds support for installing Module::Build via jcpan. This enables
jcpan install Module::Buildto complete successfully.Key fixes:
Fork-open emulation - Emulates Perl's
open FH, "-|"pattern at runtime without requiring fork(). When this pattern is detected, the subsequentexec @cmdcaptures command output and returns it as the subroutine's result. This transparently supports Module::Build's_backticks()without patches.Parser filehandle detection - Imported subroutines are no longer mistakenly parsed as filehandles (fixes
print myconfig)jperl classpath handling - Empty CLASSPATH no longer adds current directory
Config::myconfig() - Returns perl configuration string needed by Module::Build
File test on underscore - Handle null lastBasicAttr when using
_after testing JAR pathsFile::Path relative paths - Fix
_make_path_perlto preserve relative paths (was turning_buildinto/_build)system()/exec() array flattening - Properly expand array arguments into individual command args
File::Spec jar: paths - Recognize
jar:paths as absolute to prevent CPAN.pm from mangling @incFile::Spec::catdir() - Preserve leading
/for absolute paths when first splitdir element is emptyPOSIX::access() - Return
"0 but true"on success to match Perl semantics (numerically 0, boolean true)ExtUtils circular dependencies - Fix MM.pm and MY.pm circular dependency
SeekableJarHandle - JAR resources now support seek (needed by Module::Metadata)
New modules/features:
lib.pm- @inc manipulationFile::Compare.pm- File comparisonExtUtils::Manifest- MANIFEST handlinginstallsitelib, etc.)F_OK,R_OK,W_OK,X_OK)ForkOpenState,ForkOpenCompleteException)Design Documentation
See
dev/design/fork_open_emulation.mdfor detailed documentation of the fork-open emulation approach.Test plan:
makepasses all unit testsjperl -MModule::Build -e 'print "ok\n"'worksjcpan install Module::BuildGenerated with Devin