Rust printer: LinkedHashMap/LinkedHashSet map to HashMap/HashSet, losing insertion order
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
Direzione di ricerca
Read RustTypes around lines 70 and 76 to trace how Java linked collections are mapped. Then inspect ControlFlowGraph.subroutines, processJsrRanges, BytecodeSourceMapper, and the renamer's rename result to see where iteration order affects output. Check the fernflower tests that compare decompiled text; done means linked maps and sets preserve insertion order and those tests pass.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
RustTypes maps java.util.LinkedHashMap to HashMap and java.util.LinkedHashSet to HashSet (RustTypes ~l.70, ~l.76). Java guarantees insertion order for both; Rust's hash collections iterate in an arbitrary order that changes from run to run.
That matters wherever the iteration order reaches output or decisions. On fernflower:
ControlFlowGraph.subroutinesis aLinkedHashMap, and its order feeds the JSR-range sort inprocessJsrRanges;BytecodeSourceMapperand the renamer'srenameresult areLinkedHashMaps, and they decide the order of what the decompiler writes.
The fernflower tests compare decompiled text, so they would fail on order alone.
Options:
- an insertion-ordered map in
crate::jrt, a small wrapper of aVecplus aHashMapindex; - the
indexmapcrate, if the translation may have dependencies.
Either way the mapping should keep the guarantee Java's type gives. A HashMap should only be printed where the program never depends on the order, and the analysis cannot tell us that today.
🤖 Generated with Claude Code
- Lingua principale
- Java
- Stelle
- 1
- Fork
- 1
- Merge medio
- 48m
- PR unite (30g)
- 2
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di CodeLaser/maddi
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
Javadoc warnings are the only noise on an otherwise clean CI runForse di nuovo libera @jayeshamundkar06-bit l’ha presa 27 giorni fa e non c’è nessuna pull request aperta. Apertabuild/ci good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
Tutte le issue di CodeLaser/maddi
Issue simili
-
area:cpan-port area:performance bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
fglock/PerlOnJava#2230 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
federicoiosue/Omni-Notes#1044 ·
-
Industrial Center Text TypoApertaBug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Terraform releases proxy leaves a temp folder behind on every cache refreshForse già presa @dhananjay6561 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
terrakube-io/terrakube#4069 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno