Skip to content

[rustjava-bootstrap-argument-diagnostic-names-index-and-tag] fix(classfile): 부트스트랩 인자 거부가 어느 인자·무엇을 찾았는지 말한다 - #73

Merged
Jun025 merged 2 commits into
mainfrom
feat/rustjava-bootstrap-arg-index-tag
Sep 21, 2026
Merged

Jun025 merged 2 commits into
mainfrom
feat/rustjava-bootstrap-arg-index-tag

Conversation

@Jun025

@Jun025 Jun025 commented Sep 18, 2026

Copy link
Copy Markdown
Owner

The bootstrap-argument rule refused with a &'static str and threw away the two things it already held: which argument, and what it found there. The predicate returned bool from inside arguments.iter().all(|index| ...) — the index was in hand at the moment it said no.

Not a new diagnostic scheme. ClassFileError::UnsupportedVersion(u16) already carries a value through all three layers and format!s it at the boundary; this copies that shape.

Before / after on test-data/ldc/LdcDynamicBSMArgPastEnd.class, via the CLI:

BEFORE  java.lang.ClassFormatError: a bootstrap method argument names nothing or is not a loadable constant
AFTER   java.lang.ClassFormatError: bootstrap method #0 argument #0 names no constant pool entry

Three asks: 3/3 — expected, index (argument_index, plus method_index because OpenJDK's message omits it and is ambiguous when a class has several bootstrap methods), actual (the kind name of what the argument named).

The bidirectional test that matters: StringConcat carries one bootstrap argument, so argument_index is 0 whether the code computes it or hardcodes it. Lambda.class carries three — breaking #0 versus #2 moves the reported index 0 → 2.

Cost, measured: ClassFileError stays Copy and does not grow (a test asserts the size), so no allocation and no hot-path change. The &'static str variant and its other fourteen rules are untouched; the one structural consumer (From<ClassFileError> in jvm-bytecode) gained an arm rather than changing one.

Adopted proposal: 2026-09-18-bootstrap-argument-diagnostic-sequencing#p0

jun0 and others added 2 commits September 18, 2026 17:39
…sfile): 부트스트랩 인자 거부가 어느 인자·무엇을 찾았는지 말한다
…igin/main — 승인된 원장 2파일 합집합

충돌 = REPORT.md · STATE.md 2건(전건 원장 · 코드 충돌 0 · 측정 2026-09-21T16:35:24Z).
해소 = 양쪽 항목 전건 보존 합집합, 이 회차 항목을 커밋 시각(2026-09-18T17:39:56+09:00) 자리에 끼웠다.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Jun025
Jun025 merged commit 1ec83a1 into main Sep 21, 2026
13 checks passed
@Jun025
Jun025 deleted the feat/rustjava-bootstrap-arg-index-tag branch September 21, 2026 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant