CI never compiles the integration project, so its four src/it trees have no rot guard

Abierto Apto para principiantes
#230 0 comentarios 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
2/5
Tiempo estimado
Menos de una hora
Aptitud para principiantes
83/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
github-actions, scala
Área
ci-cd, testing

Línea de trabajo

Empieza por .circleci/config.yml y la definición del proyecto integration en build.sbt; el issue menciona ambos y proporciona el comando de compilación propuesto. Comprueba cómo invoca CI a sbt y, después, añade un paso que solo compile integration/Test/compile. Confirma que el comando de CI se ejecuta correctamente sin ejecutar pruebas de integración ni requerir los archivos de datos y el broker de Kafka.

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

Descripción

The integration project gathers the four src/it/scala trees and is deliberately left out of root's aggregate, which build.sbt states plainly:

// They're not aggregated by root, so neither `sbt test` nor CI runs them: use `sbt integration/test`.
lazy val integration = (project in file("integration"))

That decision is reasonable — the tests want 69 MB data files and a Kafka broker, and keeping them out of sbt test keeps the normal loop fast. This issue is not asking for it to be reversed.

The gap is narrower: nothing in CI so much as compiles them, so there is no guard against the sources rotting. .circleci/config.yml runs sbt Test/compile, sbt test, sbt mimaReportBinaryIssues, sbt unidoc and sbt clean coverage test coverageAggregate — every one of those is scoped to root, which does not aggregate integration. The four directories are therefore never compiled by anything automated:

  • core/src/it/scala (support classes)
  • cats/src/it/scala (5 suites)
  • kafka-cats/src/it/scala (1 suite)
  • kafka-zio/src/it/scala (1 suite)
Why this is worth a cheap guard

Found by an audit of test discovery across all twelve Phasmid libraries. Two siblings show exactly what an uncompiled it tree becomes:

  • Comparer (rchillyard/Comparer#29) — src/it/scala wired into nothing; its two suites stopped compiling (List[Long] vs Array[Long]) and nobody noticed for two years.
  • Number (rchillyard/Number#216) — core/src/it/scala wired into nothing; its eight suites still import core.{AbsoluteFuzz, FuzzyNumber, Number, …} from before the module split, so they fail on the first import line.

In both cases the sources were rotting in plain sight, because an unbuilt directory and a passing build look identical.

TableParser is not in that state today. Checked on origin/main (57037a8):

$ sbt integration/Test/compile
[info] compiling 8 Scala sources to .../integration/target/scala-3.9.0/test-classes ...
[success] Total time: 22 s

It compiles cleanly. The point is that nothing would tell you when it stops — and the module is coupled to five others by test->test, so an ordinary refactor in core or cats can break it without touching a file in integration.

Suggestion

A compile-only CI step costs seconds and needs no data files and no broker:

- run:
    name: Integration test compile
    command: cat /dev/null | sbt integration/Test/compile

That keeps the deliberate decision intact — the tests still do not run in CI — while making rot a build failure instead of a discovery years later. XmlDoc is the reference for the other end of the same tradeoff: kmlIt and kafkaIt are equally unaggregated, but .circleci/config.yml runs each explicitly.

Lenguaje dominante
Scala
Estrellas
11
Forks
4
Merge medio
13 h 28 min
PR fusionados (30 d)
23

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 rchillyard/TableParser

Todos los issues de rchillyard/TableParser

Issues similares

Más issues de Scala

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.