Repair failed mod decompilation with Vineflower #16
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent: #5. Follow-up to #12.
Source recovery and selected-source validation pass. Evidence: vendor/pack-manifests/tekkit-lite/source-inventory.json and verification.json; docs/mod-source-recovery.md. Newly recovered mod compilation, bytecode agreement, and runtime integration are tracked in #18. Existing IC2 strict comparison still has 3627 matching entries and zero differences. No tests were written.
Implementation compiled with :tools:bytecode:compileJava. No tests, repair batch, mod builds, or game sessions were run. Wait for the first full recovery batch to finish, then run from the repository root:
JAVA_HOME=/home/rexlmanu/.local/share/mise/installs/java/temurin-21.0.12+101.0.LTS JAVA21_HOME=/home/rexlmanu/.local/share/mise/installs/java/temurin-21.0.12+101.0.LTS JAVA8_HOME=/home/rexlmanu/.local/share/mise/installs/java/temurin-8.0.504+1 ./gradlew :tools:bytecode:repairModSources
Optional filter: -PmodRecoveryIds=codechickencore,computercraft. The full first-batch reports and work archives must still exist, even for a filter, to reconstruct the original hierarchy. It verifies package SHA-256 and nested archive bytes, then repeats remapping for candidate artifacts and compares every remapped entry before Vineflower.
Original CFR files and recovery-report.json stay unchanged. Per package, vendor/upstream-mods//repair-report.json has id, originalReport, errors, and artifacts. Each artifact records path, inputSha256, remappedSha256, remappedProvenance, coveredClasses, coverageMethod, missingSources, unresolvedErrors, selections, stagingConflicts, and, when attempted, remappedVerified, vineflowerOutput, vineflowerLog and vineflowerExit. Selections name each source, selected decompiler, SHA-256 and staging outcome. Vineflower output and log are at decompiled//vineflower/ and vineflower.log.
A selected source replaces staged CFR only when staged bytes still equal that CFR source. BuildCraft and IC2 staging is skipped. Existing Vineflower output is preserved and blocks a rerun for that artifact; review it and the report before deciding how to proceed. Missing files, failed decompiler processes, detected failure markers, original log errors, and conflicts remain unresolved and make the task fail. Coverage checks mapped outer names before SourceFile, but file existence does not prove inner classes or methods were recovered. Marker scanning and a clean Vineflower log cannot prove source correctness, compilation, or bytecode agreement. The fallback remains unexecuted and may expose further errors or warnings; inspect its output.
Report and raw paths, with literal placeholders:
vendor/upstream-mods/{id}/repair-report.json,vendor/upstream-mods/{id}/decompiled/{artifact}/vineflower/, andvendor/upstream-mods/{id}/decompiled/{artifact}/vineflower.log. The original CFR output remains indecompiled/{artifact}/java/andcfr.log.Coordinator started repairModSources for the 11 packages with CFR/source-coverage problems. Before execution I fixed mapped anonymous-class outer attribution (EnclosingMethod points to the mapped outer name), treated CFR summary.txt as diagnostic metadata when its Java failures are already listed, and made staging accept already-selected identical fallback files. Raw original reports remain intact. Generated signing/summary staging cleanup completed with zero remaining conflicts via cleanRecoveredModMetadata.
Lumy #17 split recovery has source for all 248 class entries, including every version. CFR reports whole-class analysis failures for standalone obfuscated inner classes in 1.7.2 (bpk) and 1.7.10 (bps, brk, brl, brm, brn, bro). These reference-only variants are under vendor/upstream-mods/lumyskinpatch/decompiled/variants/. The 1.4.7 and shared groups have no detected CFR errors. If your fallback supports these split jars, please coordinate before touching Lumy outputs.
The first repair attempt exposed an integration mismatch: Lumy now has a variant recovery report rather than generic artifacts, so prepareHierarchy initially stopped before decompilation. Fixed this by reading and hash-checking its original nested jar directly for the shared hierarchy while leaving Lumy source repair to #17. The repair batch has restarted; no source errors were suppressed.
The isolated CodecJOrbis repair succeeded. The fallback now decompiles only requested failed classes and their inner classes, using the full remapped archive as a library. This avoids unrelated platform enum-switch failures without selecting their broken Vineflower output. All 11 repair reports now have no unresolved errors or staging conflicts, and the staged 1.4.7 source tree has no explicit CFR failure markers. Lumy reference variants remain tracked separately in #17. No tests have been added or run.
Source repair is complete at the source-acquisition level: the full selected-source inventory and Java 8 syntax parser both pass. Syntax-driven fallback repaired malformed unmarked CFR output; two reviewed exact-input patches restore Factorization local class naming and Rei static receiver access. Full source compilation, bytecode equivalence for new mods, and runtime integration remain in #18. Existing baseline verification is running after recovery, as requested.