haskell / haskell-language-server

Official haskell ide support via language server (LSP). Successor of ghcide & haskell-ide-engine.
Apache License 2.0
2.61k stars 351 forks source link

Call useWithStale instead of useWithStaleFast when calling ParseCabalFields #4294

Closed VeryMilkyJoe closed 2 weeks ago

VeryMilkyJoe commented 2 weeks ago

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

michaelpj commented 2 weeks ago

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?

fendor commented 2 weeks ago

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..