Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

J2K judge: kotlinc compiles against JDK 27 while the analysis resolves guava at --release 9 (Ordering.min/max override)

Abierto
#173 1 comentario 0 reacciones 0 asignados Ver en GitHub

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
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
java, kotlin
Área
testing, tooling

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:

  1. 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;
  2. or the printer emits override when 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

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de CodeLaser/maddi

Todos los issues de CodeLaser/maddi

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.