`cacheSelfie().xxx_TODO()` should cascade through later `cacheSelfie` calls
- 主要言語
- Kotlin
- スター
- 101
- フォーク
- 18
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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.
コントリビューションガイド
調査の方向性
まず、cacheSelfie、expectSelfie、および既存の _TODO の動作の実装とテストを見つけます。//selfieonce と //SELFIEWRITE の違いを読み、次に cascading を CacheTodoCascade に属させるべきか、共有の TodoCascade に属させるべきか、またどの scope をサポートすべきかを決定します。選択したセマンティクスが文書化され、テストでカバーされていれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- kotlin
- 領域
- testing
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100