Implement a Java-backed DB_File provider
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 20/100
調査の方向性
Start with src/main/perl/lib/XSLoader.pm, src/main/java/org/perlonjava/runtime/perlmodule/DBM.java, and the upstream DB_File.pm API to understand module registration and the existing storage boundary. Then add the unchanged upstream DB_File tests and fixtures and validate them first with system Perl, followed by both PerlOnJava backends. Done means the documented API and file format pass the supported upstream tests and the stated dependency chain no longer fails solely on XS loading.
索引モデルが issue の本文から書いたものです。
説明
Summary
Implement a Java-backed DB_File provider so PerlOnJava applications can use the CPAN module's Perl-facing database API without loading its XS extension.
This is separate from #1494 and #1495: those implement Perl's dbmopen/dbmclose over a PerlOnJava SQLite format. They do not implement DB_File, its tie classes, or Berkeley DB's API.
Evidence and impact
- In CPAN random run
20261109-091152-39587,Kwiki::GoogleLink0.01 pulled in Kwiki 0.39, then Spoon 0.24; Spoon requiresDB_File. The PerlOnJava run timed out during this dependency chain before the target distribution's tests started. - The archived system-Perl oracle passed the target tests:
Kwiki::GoogleLinkpassed 1 test and Kwiki passed 59 tests (with optional cycle tests skipped). - A bounded isolated run of
DB_File1.861 with PerlOnJava's launcher built its Perl files, then failed its tests becauseXSLoaderreportsXS module not supported on PerlOnJava. The failing upstream test files includedt/000prereq.t,t/db-btree.t,t/db-hash.t,t/db-recno.t, andt/db-threads.t. - The targeted CPAN reverse-dependency lookup found 63 unique released distributions with a runtime dependency on
DB_File, including 7 recent dependants. Examples include BioPerl, LaTeXML, Geo-Coder-Free, XML-TMX, and IP-Country-DB_File.
Current implementation boundary
src/main/perl/lib/XSLoader.pm explicitly lists DB_File as unsupported. The existing PerlOnJava::DBM implementation in src/main/java/org/perlonjava/runtime/perlmodule/DBM.java stores data in SQLite and explicitly does not read or write native Berkeley DB files.
The first provider may use SQLite or another Java implementation, but it must document its file format and must not claim interoperability with Berkeley DB files unless that is actually implemented. Existing DB_File users should receive a clear error for unsupported features rather than silently getting different semantics.
Proposed scope
- Preserve and expose the upstream
DB_File.pmPerl API while registering Java-backed operations through PerlOnJava's module/XSLoader mechanism. - Support the common tied-hash use cases for
DB_HASHandDB_BTREE, including open/create flags, byte-string keys and values,FETCH,STORE,DELETE,EXISTS,CLEAR, and stable key iteration. - Support the tied-array
DB_RECNOinterface, including array indexing and mutation behavior. - Implement and document the useful direct object methods (
get,put,del,seq,sync, and duplicate-record methods where supported), exported constants, and DB configuration objects. - Define behavior for unsupported native-only operations such as returning a real file descriptor; do not report success with a fabricated value.
- Keep the provider usable on both JVM and interpreter backends and independent of Berkeley DB libraries installed on the host for the initial Java-backed format.
A follow-up can add native Berkeley DB file interoperability if there is a supported, distributable cross-platform implementation. That requirement would add native-library packaging and platform work beyond this initial scope.
Acceptance criteria
use DB_Filesucceeds through the Java provider, without loading the XS extension.- Add the unchanged upstream
DB_Filetest suite and fixtures to the repository and use it to track supported behavior; do not modify upstream tests to hide gaps. - Validate Perl-level tests with system Perl first, then run the supported tests on both PerlOnJava backends.
- Cover persistence/reopen, binary keys and values, HASH/BTREE iteration, RECNO array semantics, read-only/error paths, duplicate behavior where implemented, close/untie, and documented unsupported operations.
- Re-run the CPAN dependency chain that exposed this gap and verify
DB_Filetests no longer fail solely because XS loading is unsupported. - Update bundled-module and feature documentation with the API and file-format boundaries.
- 主要言語
- Perl
- スター
- 67
- フォーク
- 8
- 平均マージ
- 5時間 12分
- マージ済み PR(30日)
- 131
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
fglock/PerlOnJava のほかの issue
-
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 日以内に返信
-
area:cpan-port bug
難易度 3/5 1〜2日 初心者へのやさしさ 62/100
fglock/PerlOnJava#2157 ·
メンテナーはふだん 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 日以内に返信