Clean up Java 27 compatibility hack
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
- 52/100
Hướng nghiên cứu
Bắt đầu trong src/main/java/software/coley/sourcesolver/util/compat và kiểm tra commit tương thích 05b54eb0fabf4b57702d875d808d9ea219c4283d, tập trung vào lời gọi factory của JavacParser và contract Java 27 của nó. Xem xét các thay đổi OpenJDK được tham chiếu trước khi quyết định nên xử lý việc tạo parser như thế nào; hoàn thành có nghĩa là logic tương thích được dọn dẹp mà không làm hỏng việc phân giải phạm vi AST.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Compatibility commit: 05b54eb0fabf4b57702d875d808d9ea219c4283d
Compatibility logic: https://github.com/Col-E/SourceSolver/tree/master/src/main/java/software/coley/sourcesolver/util/compat
Somehow the parser factory call didn't totally break.
// Build parser for source and extract the end-pos table so that we can resolve AST ranges
JavacParser parser = factory.newParser(source,
false /* keepJavadoc */,
true /* keepEndPos */,
false /* keepLineMap */
);
The contract is different now, but doesn't immediately cause problems.
// Build parser for source and extract the end-pos table so that we can resolve AST ranges
JavacParser parser = factory.newParser(source,
false /* keepJavadoc */,
true /* keepLineMap */,
false /* parseModuleInfo */
);
We may want to also have some compat logic for building the parser instances...
Rant
This dogshit compatibility hack exists because we don't have maven/gradle support for Java 27 yet, but people already noticed because they try and run consuming projects on bleeding edge releases... yay.
I would have liked to use multi-release jars, but oh my god this is impossible. Because we use --add-exports we cannot use --release. And guess what mutli-release support in Maven/Gradle loves to use? Yeah.
I'm sure there's a way around it but I wasted 2.5 hours on this already...
Most javac internal changes can be found here:
https://github.com/openjdk/jdk/pulls?q=is%3Apr+author%3Acushon- 31058: Clean up calls to deprecated getStartPosition and getEndPosition methods
- 29994: Don't require a CompilationUnit for end position APIs
- 29463: Store end positions on more trees
- 28610: Store end positions directly in JCTree
- Ngôn ngữ chính
- Java
- Star
- 12
- Fork
- 2
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue tương tự
-
Bug feat:Syntax
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
ignatov/intellij-erlang#1342 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Flaky EnrollmentCoordinatorTest.theNewSettingsShouldNotInheritTheFormerOnesBackoff on WindowsCó thể đã có người làm @NassimBtk đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
MetricsHub/metricshub-community#1636 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] no hint/error message for max picture sizeCó thể đã có người làm @flahamue đã nhận hôm nay. Đang mởType: Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
it-at-m/raumreservierung#439 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Copy/paste broken on Linux: ClassCastException (HeapByteBuffer → byte[]) in ClipboardActions.pasteĐang mở3rd party problem bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100