Add bundled POSIX::strptime support
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start with the upstream POSIX-strptime 0.13 XS source and its test suite, which the issue links, and with t/02-credentials.t in Amazon-Credentials 2.0.1, which requires POSIX::strptime. The main decision is the implementation strategy: FFM calls to libc strptime() need correct struct tm handling, and Windows needs either a compatible implementation or an explicit unsupported result. Done means the unchanged upstream tests and the Amazon-Credentials suite pass on both JVM and interpreter backends.
由索引模型根据 Issue 内容生成。
描述
Summary
Add bundled PerlOnJava support for the CPAN module POSIX::strptime 0.13. Its XS implementation calls the platform C library strptime() and returns the resulting struct tm fields. PerlOnJava currently installs the module's .pm wrapper but cannot load its XS implementation, so applications that rely on it fail at runtime.
Evidence
In CPAN random run 20261121-154046-78188, the dependency install identified POSIX::strptime 0.13 as XS and installed its Perl wrapper without a Java provider. Amazon-Credentials 2.0.1 then failed when require POSIX::strptime reached the unavailable native implementation (t/02-credentials.t). After Module::Loaded was installed and the target retried, the run still reported 3/27 test programs failing and 1/145 subtests failing; the unsupported POSIX::strptime load is one confirmed cause.
The isolated system-Perl oracle passed the Amazon-Credentials 2.0.1 suite: 27 files, 161 tests, with only the two explicitly AWS-dependent tests skipped. The suite uses POSIX::strptime to parse ISO 8601 timestamps.
MetaCPAN reverse-dependency metadata for POSIX::strptime reports 2 released distributions with a required runtime dependency. One is recent (released in the last five years): Amazon-Credentials. The other is EntityModel. Other reverse-dependency records did not meet the released, required-runtime-dependency filter.
The upstream module's XS source and tests are in POSIX-strptime 0.13. Its tests cover time/date directives, unset fields, invalid input and Linux dates before 1900.
Porting scope
- Add a Java XSLoader provider for
POSIX::strptime::strptime, preserving the upstream wrapper, exports and list-return behavior. - Match the upstream XS semantics for the nine returned fields: seconds, minutes, hours, day of month, zero-based month, years since 1900, weekday, yearday and DST flag. Preserve
undeffor fields that upstream marks as unmodified where the platform provides that behavior. - Choose and document the implementation strategy. FFM calls to libc
strptime()provide the closest macOS/Linux behavior but require correctstruct tmABI handling. Windows has no POSIXstrptime()entry point and needs a compatible implementation or an explicit unsupported result matching upstream platform support. - Keep locale and timezone behavior aligned with the platform implementation where practical; do not silently report successful parses when the input does not match.
Acceptance criteria
- Preserve and run the unchanged upstream POSIX-strptime tests under system Perl and PerlOnJava.
- Add focused project-owned coverage for return-field ordering,
undeffields, invalid input, format directives, pre-1900 years and timezone/locale-sensitive cases supported by the implementation. - Verify both JVM and interpreter backends.
- Test or explicitly define behavior on macOS, Linux and Windows, including unsupported platform behavior.
- Verify
use POSIX::strptime qw(strptime)and the fully qualified call used by Amazon-Credentials. - Run Amazon-Credentials 2.0.1 against the bundled provider as integration coverage.
- 主要语言
- Perl
- 星标
- 67
- 派生
- 8
- 平均合并
- 4 小时 36 分钟
- 30 天内合并 PR
- 123
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
fglock/PerlOnJava 的其他 Issue
-
area:runtime bug
难度 2/5 1-3 小时 新手友好度 72/100
fglock/PerlOnJava#2164 ·
维护者通常 1 天内回复
-
area:cpan-port bug
难度 2/5 1-3 小时 新手友好度 70/100
fglock/PerlOnJava#2153 ·
维护者通常 1 天内回复
-
area:cpan-port area:parser bug
难度 2/5 1-3 小时 新手友好度 68/100
fglock/PerlOnJava#2137 ·
维护者通常 1 天内回复
-
area:backend area:cpan-port area:runtime bug
难度 2/5 1-3 小时 新手友好度 76/100
fglock/PerlOnJava#2071 ·
维护者通常 1 天内回复
-
area:runtime documentation enhancement
难度 2/5 1-3 小时 新手友好度 72/100
fglock/PerlOnJava#1579 ·
维护者通常 1 天内回复
查看 fglock/PerlOnJava 的全部 Issue
相似的 Issue
-
Dev-output directory preparation accepts file-valued lib/include paths and fails on dangling links未关闭team-cli
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
-
难度 1/5 1 小时以内 新手友好度 93/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 73/100
inverse-inc/packetfence#9728 ·
维护者通常 1 天内回复
-
fix(char-create): show the real reason a character is refused可能已有人在做 @baphomello 于 1 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复