Port Const::XS read-only variable API

オープン
#2,082 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
java, perl
領域
backend

調査の方向性

Start by reading PerlOnJava's existing read-only support and the Const::XS 1.04 interface and XS source; validate the documented behavior with system Perl first. Add focused project-owned tests for the exports and scalar, array, hash, nested-reference, and mutation cases, then run them on both JVM and interpreter backends alongside the upstream tests. Done means the Claude-Agent-Code-Review load test passes through the stated dependency chain and any unsupported Perl semantics are documented and tested.

索引モデルが issue の本文から書いたものです。

説明

area:cpan-port enhancement

Goal

Provide a PerlOnJava implementation of Const::XS so CPAN distributions that depend on it can load and use its read-only variable API without a native XS shared library.

Evidence

The archived CPAN run 20261117-153921-75160 reports Claude::Agent::Code::Review 0.03 failing its first load test. The module loads Claude::Agent 0.15, which imports Const::XS from Claude::Agent::Hook and Claude::Agent::Permission. PerlOnJava installs Const::XS 1.04's .pm file, but that file calls XSLoader::load; the .xs implementation is not built. The resulting error is Can't load loadable object for module Const::XS: no Java XS implementation available.

The same archived run's system-Perl oracle passed the full Claude::Agent::Code::Review suite: 87 tests passed; author-only tests were skipped. PerlOnJava's run used Perl 5.044001 and failed at t/00-load.t before the remaining tests could run. The distribution's XS source defines the native operations; this is a missing PerlOnJava implementation, not a missing OS library prerequisite.

MetaCPAN's reverse-dependency endpoint returned 5 unique released distributions whose metadata requires Const::XS at runtime. All 5 have release dates within the last five years: Claude-Agent, Rope, MooX-Keyword-Readonly, MooX-Readonly-Attribute, and Eliza-Chatbot.

Porting scope

Implement the Const::XS 1.04 interface in PerlOnJava, including exports and the behavior of const, make_readonly, make_readonly_ref, unmake_readonly, and is_readonly. Preserve Perl behavior for scalar, array, and hash variables, including deep read-only behavior for nested references, and error behavior on attempted mutation. Reuse the runtime's read-only support where it matches Perl semantics; identify and fill gaps needed by this API rather than silently treating the XS load as successful while leaving calls unsupported.

Acceptance criteria

  • use Const::XS and the documented exports work on both JVM and interpreter backends without requiring XS compilation.
  • Add project-owned focused regression tests for the public operations and important nested/reference cases; validate expected behavior with system Perl first.
  • Run the relevant upstream Const-XS tests under system Perl and both PerlOnJava backends, and make Claude::Agent::Code::Review's load test pass with the exact dependency chain from the archived run.
  • Document any Perl semantics that cannot be represented and keep them explicit in tests or module compatibility notes.

References

主要言語
Perl
スター
67
フォーク
8
平均マージ
5時間 12分
マージ済み PR(30日)
131

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

fglock/PerlOnJava のほかの issue

fglock/PerlOnJava の issue をすべて見る

似ている issue

Perl の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。