Should the value of `error` be mutable?
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Área
- testing
Línea de trabajo
Review the perfect-numbers canonical-data.json example and problem-specifications PR 1691, then inspect the immutability CI check and any tests.toml assertions mentioned in the discussion. Decide whether error-only wording changes preserve test meaning; done means the policy is recorded and the relevant validation or assertions are updated consistently.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Example
In perfect-numbers we have this test case:
https://github.com/exercism/problem-specifications/blob/8df6cb2ed8e77aa3ac0c02744cd9ddb83920f5f2/exercises/perfect-numbers/canonical-data.json#L121-L130
And we notice (see https://github.com/exercism/problem-specifications/pull/1691) that we would like to make this change:
{
"uuid": "72445cee-660c-4d75-8506-6c40089dc302",
- "description": "Zero is rejected (not a natural number)",
+ "description": "Zero is rejected (not a positive integer)",
"property": "classify",
"input": {
"number": 0
},
"expected": {
- "error": "Classification is only possible for natural numbers."
+ "error": "Classification is only possible for positive integers."
}
We seem to have decided that description is allowed to mutate when the "meaning is unchanged" (that is, we do not add a reimplements test case for e.g. a simple description-only typo fix).
The question is: should the contents of an error also be considered mutable when the "meaning is unchanged", or should that require a new test case?
Discussion
My initial opinion is something like:
- We said that
descriptionshould be mutable if we don't change the "meaning" of the test. - There are some useful error-message changes that don't change the "meaning" of the test either, and the value of
erroris similar to the "description" of the error. In the limiting case, it seems messy to add a new test case just to fix a typo in anerrorvalue. - Therefore, directly mutating the
errorvalue should similarly be allowed when the "meaning is unchanged".
Drawbacks:
- Is there a track that asserts something about the contents of the error message for this kind of test? Such a track would have to update that assertion, even though their
tests.tomldidn't change. - The CI check for immutability would need to check that
expecteddoesn't change, but make a special case for anerror-only change.
- Lenguaje dominante
- Ruby
- Estrellas
- 362
- Forks
- 566
- Merge medio
- 15 h 13 min
- PR fusionados (30 d)
- 8
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
- 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 exercism/problem-specifications
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
exercism/problem-specifications#2686 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
exercism/problem-specifications#2704 · 21 comentarios · 8 reacciones ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 35/100
exercism/problem-specifications#2153 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
exercism/problem-specifications#2120 · 7 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
exercism/problem-specifications#2108 · 1 comentario · 5 reacciones ·
Los mantenedores suelen responder en 1 día
Todos los issues de exercism/problem-specifications
Issues similares
-
Bug Ruby Waiting for: Product Owner
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
getsentry/sentry-ruby#3228 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
開発用DockerイメージにPlaywrightのシステム依存を追加するPosiblemente ocupada @momocus la tomó hoy. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
sakazuki-org/sakazuki#1453 ·
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
jenkins-infra/jenkins.io#9615 · 1 comentario ·
Los mantenedores suelen responder en 1 día