Palantir Java Format does not work with latest 7.0.0 spotless plugin
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Java
- Star
- 5.7k
- Fork
- 561
- Merge trung bình
- 1 ngày 14 giờ
- Pull request đã merge (30 ngày)
- 43
Mô tả
## Summary of Problem:
Encountered a NoSuchMethodError when trying to use the palantirJavaFormat() method in the Spotless configuration. The error suggests a version mismatch or compatibility issue between the Spotless plugin and the Palantir Java Format library.
## Gradle Version:
8.11.1
## Spotless Version:
Using latest.release in the build script, which resolves to the latest stable version at the time of the build.
## Operating System and Version: macOS Monterey 12.6
## Spotless Configuration Block:
```
groovy
spotless {
java {
palantirJavaFormat()
removeUnusedImports()
target project.fileTree(project.projectDir) {
include '**/*.java'
excludes.each {
exclude it
}
}
}
}
```
## Link to Public Git Repo:
Unfortunately, I do not have a public repository that reproduces the problem at this time.
## Console Errors:
```
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':spotlessApply'.
> Could not create task ':spotlessJavaApply'.
> Could not create task ':spotlessJava'.
> 'com.diffplug.spotless.FormatterStep com.diffplug.spotless.FormatterStep.createLazy(java.lang.String, com.diffplug.spotless.ThrowingEx$Supplier, com.diffplug.spotless.ThrowingEx$Function)'
```
Hướng dẫn đóng góp
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.
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện lỗi với Gradle 8.11.1, bản phát hành Spotless mới nhất và cấu hình palantirJavaFormat() được nêu. Truy vết các lỗi tạo task ':spotlessApply' và ':spotlessJavaApply' xung quanh FormatterStep.createLazy; được xem là hoàn tất khi cấu hình được tạo và chạy thành công, nhưng không cung cấp reproducer công khai.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java
- Lĩnh vực
- build-system
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100