diffplug / diffplug/selfie

`cacheSelfie().xxx_TODO()` should cascade through later `cacheSelfie` calls

Abierto
#237 0 comentarios 0 reacciones 0 asignados Ver en GitHub
enhancement
Lenguaje dominante
Kotlin
Estrellas
101
Forks
18
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

A classic problem in Jupyter / IPython workflows is:

- you run the whole notebook
- you make some changes and run just the first cell
- you look at the last cell which has cached results from the initial run, but has not updated since the changes in the first cell, and you are confused

If you use `//selfieonce` or `//SELFIEWRITE`, these sorts of problems don't happen. But with `_TODO` they can. We should probably have something like this in our settings:

```kotlin
enum CacheTodoCascade {
NONE, // This is our current behavior
WITHIN_TEST, // Once a _TODO is encountered in a test,
// it will rewrite everything after that in the test.
// This should probably be the default.
WITHIN_TEST_CLASS, // Rewrite everything in all the rest of the tests in that class
// This introduces coupling between tests, which is ill-defined if they are
// being executed in parallel. Might be not be a good idea...
}
```

This is quite hazardous with `cacheSelfie`. With `expectSelfie` it's not hazardous but can be annoying. I'm inclined for this functionality to be limited only to `CacheTodoCascade`, but it's worth considering just `TodoCascade` and use it for both `expectSelfie` and `cacheSelfie` calls.

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza localizando las implementaciones y las pruebas de cacheSelfie, expectSelfie y el comportamiento existente de _TODO. Lee en qué se diferencian //selfieonce y //SELFIEWRITE; después, determina si el cascading corresponde a CacheTodoCascade o a un TodoCascade compartido, y qué scope debería admitirse. Se considera terminado cuando las semánticas elegidas están documentadas y cubiertas por pruebas.

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

Evaluación

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

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.