`cacheSelfie().xxx_TODO()` should cascade through later `cacheSelfie` calls
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start by locating the implementations and tests for cacheSelfie, expectSelfie, and the existing _TODO behavior. Read how //selfieonce and //SELFIEWRITE differ, then resolve whether cascading belongs to CacheTodoCascade or a shared TodoCascade and which scope should be supported. Done means the chosen semantics are documented and covered by tests.
Written by the indexing model from the issue text.
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:
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.
- Dominant language
- Kotlin
- Stars
- 101
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from diffplug/selfie
-
Selfie JVM Snapshot Garbage Collection is overly zealous when using multiple test suites in gradle Openbug jvm
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
enhancement jvm
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
bug jvm
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
bug docs jvm
Difficulty 2/5 1-3 hours Newbie friendliness 50/100
-
bug jvm py
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
index-request triaged
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Anthonyy232/Paperize#614 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
bitcoindevkit/bdk-ffi#1125 ·
-
🌑 nextgen
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
CCBlueX/LiquidBounce#9214 · 1 comment ·