Skip to content
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

Call useWithStale instead of useWithStaleFast when calling ParseCabalFields #4294

Merged
merged 2 commits into from
Jun 9, 2024

Conversation

VeryMilkyJoe
Copy link
Collaborator

@VeryMilkyJoe VeryMilkyJoe commented Jun 8, 2024

Also adds some documentation about why we use each of these versions of use.
Fixes #4293.

@VeryMilkyJoe VeryMilkyJoe requested a review from fendor as a code owner June 8, 2024 16:37
@michaelpj
Copy link
Collaborator

This doesn't seem right to me. I thought completions were one of the typical examples where we definitely want fast response speed at the expense of stale output?

@VeryMilkyJoe VeryMilkyJoe force-pushed the cabal-completions-fix branch from 6763217 to be9c5f8 Compare June 9, 2024 10:19
@VeryMilkyJoe VeryMilkyJoe changed the title Call use instead of useWithStaleFast when calling ParseCabalFields Call useWithStale instead of useWithStaleFast when calling ParseCabalFields Jun 9, 2024
@VeryMilkyJoe VeryMilkyJoe force-pushed the cabal-completions-fix branch 2 times, most recently from 0412b6f to 5888db8 Compare June 9, 2024 10:33
@VeryMilkyJoe VeryMilkyJoe force-pushed the cabal-completions-fix branch from 5888db8 to c17d320 Compare June 9, 2024 12:51
@fendor
Copy link
Collaborator

fendor commented Jun 9, 2024

In general true, but readFields is incredibly fast as it is basically a single pass over the file contents.
In blow testing, this felt like the better default beaviour..

@michaelpj michaelpj enabled auto-merge (squash) June 9, 2024 15:25
@michaelpj michaelpj merged commit 59abb96 into haskell:master Jun 9, 2024
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Shown cabal completions are wrong when queried too quickly after a change in the file
3 participants