-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Tokens - cleanup #8350
chore: Tokens - cleanup #8350
Conversation
I advise to revert this, how does this PR make things better? |
Happy to hear the reason for revert. Otherwise, hard to discuss. Why I raised those changes?
|
Sure 👍 The first assertion is good to make sure the check on l398 did really make it's job. (as it uses cache, this asserts the cache was in consistent state) The 2nd assertion should be extended to check if really the removed empty tokens match the cache state, if yes, the cache can be set to zero. As I discovered several bugs of cache update in the past, I find these assertions very valueable as hunting the bugs was very time consuming. |
please convert those cases to tests. We barely have any assertions in src/ and I prefer to keep those ensuring mechanisms in tests. |
That is not possible as you told me you do not want private internals tested. |
I am not a fan of |
I disagreed to have them added in first place, I believe Kuba too (and we both complained about messing with internals). they failed to us to provide value in first place. i decided to merge PR as-is and apply fixes separately, instead of having another few weeks discussion in PR that was having good bunch of optimizations |
100%! |
depends on #8349