[rustjava-upstream-sync-approach-plan] docs: settle upstream sync approach (19 conflicts, 7 staged rounds) - #10
Merged
Conversation
…roach (19 conflicts, 7 staged rounds) Re-measured today (prior 2026-08-15 numbers are stale): - rev-list origin/main...upstream/main: 9/32 -> 10/33 - conflicts: 17 -> 19 files, entirely caused by upstream ba5797b (dlunch#201, 319 files +20118/-5729). Cross-check: merge-tree on the prior tips (2e61e93 vs 95ebc5c) still yields 17. - baseline green: fmt --check rc=0, cargo test --all 149 passed/0 failed. Disposition of all 19 conflicts: upstream 13 / both 5 / regenerate 1 / ours 0. Corrects two premises the prior round left behind: - The add/add pair (unsupported_encoding_exception.rs, class_format_error.rs) is NOT a head-on conflict: the two sides differ only by the ba5797b access flags sweep and an Ok(()) style. The single real design decision is classfile/src/error.rs, and upstream wins there (4 Java exceptions vs 1). - charset regression is confined to input_stream_reader.rs, not string.rs: upstream independently implemented the same charset set and alias normalization in String::decode_str/encode_str, and is more JDK-correct on the default-charset paths (falls back instead of throwing). Names three breakages that carry NO conflict marker: - tests/test_class_format.rs merges clean, then 3 of 4 tests fail on message substrings that upstream flattens to "Invalid class file". - both Cargo.toml files auto-merge to our PR #4 state (no attributes feature), while upstream thread.rs still carries #[tracing::instrument] -> taking it verbatim breaks the build, restoring the feature reverts PR #4. - java_runtime/src/charset.rs survives clean and becomes dead code -> clippy -D warnings red. Staging: conflicts are front-loaded (16 of 19 arrive in the first 7 commits, the remaining 26 commits add 3), so splitting by commit count is worthless. Split by axis into 7 rounds: S1 tracing / S2 charset / S3 error taxonomy carry every judgement call; S4-S7 are volume with zero resolutions. No merge was run: 0 conflicts resolved, 0 code changes, docs only. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
무엇을 / 왜
티켓
rustjava-upstream-sync-approach-plan. upstream 동기화의 접근안(설계) 확정.★머지 실행 0 · 충돌 해소 0 · 코드 변경 0 — 전부
merge-tree/show/grep읽기전용 조회.정본:
docs/upstream-sync-approach.md.STATE.md## 다음① 에 요약을 심었다.재실측 — 선행(2026-08-15) 수치는 낡았다
rev-list --left-right --count origin/main...upstream/main9 3210 332e61e93/95ebc5c85f294a/ba5797b증분 2건의 원인은 upstream 신규 커밋
ba5797b(dlunch#201, 319파일 +20,118/−5,729) 하나다.교차확인: 선행 tip 쌍(
2e61e93vs95ebc5c)으로 다시 돌리면 지금도 17 ⇒ 선행 수치는그 시점에 옳았고 upstream 이 움직여서 바뀌었다. ⇒ ★충돌 목록은 반감기가 짧다.
baseline green:
cargo fmt --all -- --checkrc=0 ·cargo test --all149 passed / 0 failed / 1 ignored.처분표 요약
upstream 채택13 ·양쪽 병합5 ·재생성1(Cargo.lock) ·우리 유지0 ·별 회차0.★선행 전제 2건을 실측으로 정정했다
(
unsupported_encoding_exception.rs·class_format_error.rs)의 충돌 hunk를 전량 확인한 결과의미 차이 0 — 차이는
ba5797b접근플래그 스윕과Ok(())문체뿐이다.진짜 설계 결정은
classfile/src/error.rs한 파일이고, 거기서도 upstream 이 이긴다(Java 관측면 예외 4종 대 1종). PR [rustjava-classfile-parse-error-propagation] fix: unreadable class files raise ClassFormatError instead of panicking #3 의 목적은 upstream 에서도 그대로 성립 = 삼킴.
input_stream_reader.rs하나다. upstream 이String::decode_str/encode_str에서 동일한 charset 집합과 동일한 별칭 정규화를 독립 구현했다(
UTF-8|UTF8·EUC-KR|EUCKR|KS-C-5601-1987|MS949|CP949·ISO-8859-1|LATIN1·US-ASCII|ASCII).★게다가 기본 charset 경로에서 폴백해 JDK 규격상 upstream 이 더 옳다(우리는 네 경로 전부에서 던진다).
★★충돌 목록에 «없는» 파일이 더 위험하다
merge-tree는 충돌만 보고한다. 아래 셋은 충돌 0으로 조용히 머지된 뒤 깨진다.tests/test_class_format.rs"Truncated"/"tag 18"/"magic"문구 단정 ↔ upstream 평문"Invalid class file"Cargo.toml×2 vsthread.rsCargo.toml은 조용히 우리 쪽(PR #4,attributes피처 없음) 으로 머지되는데 upstreamthread.rs에는#[tracing::instrument]가 있다 ⇒ 그대로 취하면 컴파일 파괴, 피처를 되살려 고치면 PR #4 통째 되돌림java_runtime/src/charset.rs-D warningsred회귀 잠금
★
test_data/UnsupportedCharset.class+.txt는 이미 실재하고 이미 돈다 —tests/test_class.rs가test_data/*.class를 디렉터리 스캔으로 자동 발견하고 기대 출력에3/aéb가 박혀 있어ISO-8859-1 의 InputStreamReader 통과를 종단 잠금한다(드라이버는 양쪽 동일 = 충돌 없음).
추가로 이식 3건 + US-ASCII Reader 잠금 신규 1건.
단계 분할 — ★커밋 수로 자르지 마라
컷별
merge-tree실측: ★19충돌 중 16이 앞쪽 7커밋(dlunch#173~dlunch#180)에서 발생하고, 뒤 26커밋이 더하는 것은 3뿐이다.⇒ 「32커밋 4등분」류는 1회차에 16충돌을 다 만나고 나머지는 빈손 = 무의미. 축으로 7회차:
1f356aeaf4f6f8822504b3296139c4665b095ebc5cba5797b★S1~S3 이 판단의 전부다. S4~S7 은 우리 해소분이 0이라 검수는 green + 「해소가 정말 0인가」의
증명으로 짧게 끝난다 — 회차가 커도 검수가 읽는 양은 작다(티켓의 「검수가 실제로 읽을 수 있는 양」).
green 기준은 전 회차 CI
rust.yml4종 동일 + 회차별 추가 조건(문서 §5).경계 준수
git merge실행 0 · 코드 변경 0 · 변경 파일 =STATE.md·REPORT.md·docs/upstream-sync-approach.mddlunch/RustJava) 발신 0 —fetch와 읽기 조회만main무접촉 · 리베이스/force-push/git gc/--no-verify0gh호출에-R Jun025/RustJava명시★머지 금지 — 게이트③은 별
*-merge티켓 몫.