Java modules

Abierto
#640 6 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
20/100
Tipo de issue
Nueva funcionalidad
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
java
Área
build-system

Línea de trabajo

The issue compares four options for introducing JPMS in WDTK, including changing MANIFEST.MF or adding module-info.java, but names no project files or tests. First read the discussion and check whether maintainers reached a decision; the work is done when that decision is implemented and WDTK’s downstream workspace dependency resolution works as intended.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

I have been very busy during the last few months, so I couldn't contribute to WDTK. I would like to resume contributions, but meantime my projects moved to Java 11 or 17 and they are now all Java modules, which makes it much harder to test WDTK with them. So I would like to open discussion about how to introduce JPMS in WDTK. I see several options:

  1. Do nothing. Cons: Downstream libs and apps will see warnings about unstable automatic module name. Dependency resolution in workspace does not work, so libs/app cannot be easily tested with modified WDTK.
  2. Add Automatic-Module-Name to MANIFEST.MF. This will fix the warning about unstable module name. Cons: Workspace dependency resolution still does not work.
  3. Create multi-release JARs that target both Java 8 and Java 11. Java 11 version will have module-info.java. Cons: Complicated, poorly supported by Maven, likely unsupported in workspace dependency resolution, and likely to unearth a ton of bugs in various tools.
  4. Upgrade to Java 11 and add module-info.java. This is easy and trouble-free on WDTK side. Workspace dependency resolution works. Cons: Some downstream libs and apps are probably still on Java 8. Some dependencies of WDTK might not support JPMS yet, which will result in some warnings.

I am obviously in favor of option (4), because it makes my life much easier. It is also possible to upgrade only to Java 9, but AFAIK Java 9 provides negligible improvement in compatibility over Java 11. Java 11 also brings some nice features, notably var, possibly HttpClient. Downstream libs and apps still on Java 8 can likely upgrade to Java 11 without any downsides.

Second best choice is (2). I can still contribute in this case, but I would not be able to test my changes against my own libs and apps due to the broken dependency resolution in workspace. There are workarounds using local repository, but that's unwieldy and unproductive, so I would just submit stuff verified only using unit tests and then fix any integration issues with followup PR.

@Tpt @wetneb Opinion?

Lenguaje dominante
Java
Estrellas
412
Forks
116
Merge medio
3 d 23 h
PR fusionados (30 d)
2

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

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 Wikidata-Toolkit/Wikidata-Toolkit

Todos los issues de Wikidata-Toolkit/Wikidata-Toolkit

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.