Rust runtime: java.nio.file, File and zip in crate::jrt, so fernflower's translated tests can run

オープン
#203 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
43/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
java, rust
領域
backend, testing

調査の方向性

Start with crate::jrt and the translated DecompilerTestFixture.setUp tests to see which file-system calls block the 170 tests. The issue names std::fs and std::path as likely mappings and identifies jar tests as needing zip support. Treat this as infrastructure groundwork: the decompiler core remains stubbed in #202, so this work alone will not make those tests pass.

索引モデルが issue の本文から書いたものです。

説明

enhancement front-end:rust

fernflower's tests now translate to Rust (#[test] runners; 217 tests from helper and manual), and the helper tests compile and run.

170 of the other tests stop in DecompilerTestFixture.setUp on the first file-system call. In crate::jrt, Files, Path, File, ZipFile, ZipEntry, ZipOutputStream, FileOutputStream, PrintStream and Manifest are opaque stand-ins without methods. The decompiler's own I/O, in ConsoleDecompiler and InterpreterUtil.copyFile/getBytes, is blocked by the same gap.

What the tests need first, roughly:

  • Files.createTempDirectory, createDirectories, isRegularFile, readString, walk/list, delete;
  • Path.resolve/toFile/getFileName, and File exists/isDirectory/listFiles/getName/getAbsolutePath;
  • reading a class file's bytes;
  • ZipFile/JarFile for the jar tests.

Most of this maps directly onto std::fs and std::path; zip needs a crate or a small reader.

This is necessary but not enough. Behind the fixture, the decompiler's core (ClassWriter.classToJava, ClassesProcessor.loadClasses) is still stubbed for struct-level reasons; those are listed in #202.

🤖 Generated with Claude Code

主要言語
Java
スター
1
フォーク
1
平均マージ
48分
マージ済み PR(30日)
2

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

CodeLaser/maddi のほかの issue

CodeLaser/maddi の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。