J2K judge: kotlinc compiles against JDK 27 while the analysis resolves guava at --release 9 (Ordering.min/max override)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 38/100
Línea de trabajo
Start by reading the J2K ratchet and JavaToKotlinRatchet configuration, then trace how source-set sourceRelease is passed to javac and kotlinc. Compare the two proposed approaches for matching Kotlin compilation to the Java build API level. Done means the decision is implemented and the guava J2K ratchet gains the expected compiling file.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Two of guava's remaining kotlinc errors in the J2K ratchet are 'min'/'max' hides member of supertype 'Comparator' and needs an 'override' modifier in Ordering.kt.
Cause. guava's main source set (guava/9) has sourceRelease: 9. The inspection's javac therefore resolves the JDK API as of Java 9, where java.util.Comparator has no min/max, so Ordering.<E extends T> min(E, E) correctly overrides nothing and prints open fun. The judge's kotlinc (JavaToKotlinRatchet, -jvm-target 21, no -jdk-release) compiles against the full JDK 27 API, where Comparator has default <U extends T> U min(U, U) / max (since JDK 26), and demands override.
Checked on the Mac: a guava parse reports overrides=[] for all eight Ordering.min/max while its Comparator lists min and max; a printer test with the same class (with Iterator/Iterable/varargs overloads and a jspecify T extends @Nullable Object bound) and no source release prints override fun <E : T> min(.
Decision needed. Translation and judge disagree on the JDK API:
- the judge compiles each source set's Kotlin with
-jdk-release <sourceRelease>(for guava's main: 9), matching the Java build. kotlinc then also refuses any JDK API newer than 9 in the translation, which is what guava's own javac does. Test source sets have no release and keep the full JDK; - or the printer emits
overridewhen the running JDK's supertype has the member even if the source release's does not. That yields Kotlin that compiles only against new JDKs.
Option 1 looks right to me: the Kotlin is held to the Java build's own API level. It moves the guava J2K ratchet (expected: +1 compiling file), so it waits for your call.
- Lenguaje dominante
- Java
- Estrellas
- 1
- Forks
- 1
- Merge medio
- 1 h 55 min
- PR fusionados (30 d)
- 8
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de CodeLaser/maddi
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
CodeLaser/maddi#166 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
build/ci good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
-
Java printer: a class literal in an annotation value prints by simple name, without an importAbiertobug
Dificultad 3/5 1-2 días Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
Java printer: a static interface method called from an implementing class prints unqualifiedAbiertobug
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
Todos los issues de CodeLaser/maddi
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
quarkiverse/quarkus-google-cloud-services#1187 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
locationtech/jts#1250 ·
-
type/improve
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 71/100
linagora/twake-calendar-side-service#1235 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Good First Issue
Dificultad 1/5 Menos de una hora Aptitud para principiantes 75/100
hiero-ledger/hiero-sdk-java#3025 ·
Los mantenedores suelen responder en 1 día