[Gradle] Configuration.setVisible(boolean) deprecation warning on Gradle 9.8
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ó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 85/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- java
- Lĩnh vực
- build-system
Hướng nghiên cứu
Bắt đầu trong GradleProvisioner.java, đặc biệt là forConfigurationContainer quanh dòng 136, và kiểm tra thiết lập detached configuration được JarState.provisionWithTransitives sử dụng. Chạy bản tái hiện Gradle 9.8 được cung cấp với spotlessCheck và spotlessApply bằng warning-mode all. Được xem là hoàn tất khi việc provision formatter vẫn thành công mà không có cảnh báo deprecation của Configuration.setVisible(boolean).
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Environment
- Spotless Gradle plugin: 8.10.2
- Gradle: 9.8.0
- Reproduced with:
spotlessCheckandspotlessApply
Reproduction
A formatter that provisions external dependencies is enough to reproduce it, for example:
plugins {
id("com.diffplug.spotless") version "8.10.2"
}
repositories {
mavenCentral()
}
spotless {
java {
googleJavaFormat()
}
}
Run:
./gradlew spotlessCheck --warning-mode all -Dorg.gradle.deprecation.trace=true
Actual behavior
Gradle reports:
The Configuration.setVisible(boolean) method has been deprecated.
This is scheduled to be removed in Gradle 11.
The relevant stack trace is:
at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.setVisible(DefaultConfiguration.java:376)
at org.gradle.api.internal.artifacts.configurations.DefaultLegacyConfiguration_Decorated.setVisible(Unknown Source)
at com.diffplug.gradle.spotless.GradleProvisioner.lambda$forConfigurationContainer$2(GradleProvisioner.java:136)
at com.diffplug.gradle.spotless.GradleProvisioner$DedupingProvisioner.provisionWithTransitives(GradleProvisioner.java:91)
at com.diffplug.spotless.JarState.provisionWithTransitives(JarState.java:132)
In Spotless 8.10.2, GradleProvisioner.forConfigurationContainer configures the detached configuration with:
config.setCanBeConsumed(false);
config.setVisible(false);
I see the warning from formatters that provision external dependencies, including Gherkin, Java (google-java-format), JSON (Gson), and Kotlin (ktlint). The build still succeeds, but Gradle generates a problems report containing the warnings.
Gradle upgrade guide: https://docs.gradle.org/9.8.0/userguide/upgrading_version_9.html#deprecate-visible-property
Expected behavior
Spotless should run on Gradle 9.8 without deprecation warnings and remain compatible when Configuration.setVisible(boolean) is removed in Gradle 11.
- Ngôn ngữ chính
- Java
- Star
- 5.7k
- Fork
- 560
- Merge trung bình
- 1 ngày 6 giờ
- Pull request đã merge (30 ngày)
- 49
Chuẩn bị môi trường
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 khác của diffplug/spotless
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
diffplug/spotless#3067 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 66/100
diffplug/spotless#3040 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
diffplug/spotless#3013 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của diffplug/spotless
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
checkstyle/checkstyle#21755 · 1 bình luận ·
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 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
agentic-workflows
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
github/copilot-sdk#2782 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Make docs website more visibleĐang mởdocumentation Good for newcomer quick win
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
CodeForPhilly/benefit-decision-toolkit#519 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area-deployment triage:bot-seen triage:needs-human
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
microsoft/aspire#20533 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày