Port Const::XS read-only variable API

Aberta
#2,082 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
5/5
Tempo estimado
Mais de uma semana
Facilidade para iniciantes
35/100
Tipo de issue
Funcionalidade
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
java, perl
Domínio
backend

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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

Linguagem predominante
Perl
Estrelas
67
Forks
8
Merge médio
5h 12min
PRs com merge (30d)
131

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de fglock/PerlOnJava

Todas as issues de fglock/PerlOnJava

Issues semelhantes

Mais issues de Perl

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.