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

Đang mở
#203 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
43/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
java, rust
Lĩnh vực
backend, testing

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Java
Star
1
Fork
1
Merge trung bình
48 phút
Pull request đã merge (30 ngày)
2

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của CodeLaser/maddi

Tất cả issue của CodeLaser/maddi

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.