Skip to content

unique type churn on file save intereferes with caching #5685

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

Open
ceedubs opened this issue May 8, 2025 · 0 comments
Open

unique type churn on file save intereferes with caching #5685

ceedubs opened this issue May 8, 2025 · 0 comments
Labels

Comments

@ceedubs
Copy link
Contributor

ceedubs commented May 8, 2025

Describe and demonstrate the bug

If you put this in your scratch file:

structural type Foo = Foo Nat

Foo.add : Foo -> Foo -> Foo
Foo.add = cases Foo n1, Foo n2 -> Foo (n1 + n2)

test> thing = test.verify do
  ensureEqual (Foo 3) (Foo.add (Foo 1) (Foo 2))

then it shows cached test results after the first save. But if you remove the structural (to make the type unique), it stops hitting the cache. I believe that this is because of unique type churn each time that you save the file. This means that it is also probably adding a lot of noise to the result cache.

Environment (please complete the following information):

Additional context

Discord discussion

@ceedubs ceedubs added the bug label May 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant