diffplug / diffplug/selfie

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

Ouverte
#237 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
enhancement
Langage dominant
Kotlin
Étoiles
101
Forks
18
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par localiser les implémentations et les tests de cacheSelfie, expectSelfie et du comportement _TODO existant. Examinez la différence entre //selfieonce et //SELFIEWRITE, puis déterminez si le cascading doit appartenir à CacheTodoCascade ou à un TodoCascade partagé, et quel scope doit être pris en charge. Le travail est terminé lorsque les sémantiques choisies sont documentées et couvertes par des tests.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
kotlin
Domaine
testing
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.