Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

NoGuava Recipe – Summary of the analysis on the Sirius-Desktop codebase

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

Maintainer thường phản hồi trong vòng 1 ngày

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

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
30/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
java
Lĩnh vực
devtools

Hướng nghiên cứu

Bắt đầu với sample minimal-app đính kèm, đặc biệt là GuavaConversionSamples_AllOK và GuavaConversionSamples, rồi đọc Javadoc trong từng class để biết các bước xác minh được nêu. Chạy lệnh Maven được ghi lại với recipe NoGuava và so sánh các trường hợp đã được xử lý với các trường hợp còn lại; issue không xác định thay đổi cụ thể hoặc tiêu chí hoàn thành.

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

Mô tả

bug enhancement guava recipe

This ticket is not really a bug report, but rather a summary of the tests and fixes I’ve made regarding the NoGuava recipe, based on the Sirius-Desktop codebase.
I started this analysis about two weeks ago. At that time, the version of rewrite-migrate-java I used was v3.19.0. Running the migration resulted in around 437 compilation errors.

After several issues and PRs (thanks to @timtebeek), I now get down to around 179 compilation errors.
Most of these remaining errors come from cases that are not yet handled, including some that are difficult to support because doing so could impact performance (there’s no direct Java equivalent).

To make my analysis easier (and faster), I created a minimal example, minimal-app, containing all the test cases used in the NoGuava recipes, as well as the remaining unhandled cases - with the goal of getting as close as possible to 100% coverage on the Sirius-Desktop codebase. This minimal example may be useful to others as well, so I’m attaching it here: minimal-app.zip.

For the moment, I think I'll leave it at that.

What version of OpenRewrite are you using?

Initially I was using:

  • Maven v3.9.5
  • Rewrite Maven Plugin v6.21.1
  • org.openrewrite.recipe:rewrite-migrate-java v3.19.0

And now, I am using:

  • Maven v3.9.5
  • Rewrite Maven Plugin v6.23.0
  • org.openrewrite.recipe:rewrite-migrate-java v3.21.0

How are you running OpenRewrite?

I used the Maven command line to launch the recipe on the minimal-app sample :

mvn -U org.openrewrite.maven:rewrite-maven-plugin:6.23.0-SNAPSHOT:run \
    -Drewrite.recipeArtifactCoordinates=org.openrewrite.recipe:rewrite-migrate-java:3.21.0-SNAPSHOT \
    -Drewrite.activeRecipes=org.openrewrite.java.migrate.guava.NoGuava \
    -Drewrite.exportDatatables=true \
    -Dmaven.repo.local=./.repositoryMaven

You may need to update the versions depending on the current SNAPSHOT version.

What is the smallest, simplest way to reproduce the problem?

This minimal example, minimal-app, includes two classes:

  • GuavaConversionSamples_AllOK: Contains all the handled cases and helps ensure there are no regressions overall.
  • GuavaConversionSamples: Contains the same cases as above, plus all those still producing errors.

What did you expect to see?

The expected outcome and the verification steps to perform after the migration are detailed in the Javadoc of each class.

Ngôn ngữ chính
Java
Star
159
Fork
130
Merge trung bình
6 giờ 49 phút
Pull request đã merge (30 ngày)
47

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 openrewrite/rewrite-migrate-java

Tất cả issue của openrewrite/rewrite-migrate-java

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.