-
-
Notifications
You must be signed in to change notification settings - Fork 378
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
Decouple the session loader into reader and writer over the cache #4445
base: master
Are you sure you want to change the base?
Conversation
… them to improve performance fix haskell#4381
…p error loading and cradle files
ba7379b
to
79a43a0
Compare
Renames getOptions to getOptionsWorker for clarity Removes redundant getOptionsLoop function Ensures session loading is called under the same `Action` context
When we fail to load some files X, we want to know exactly what files Y we actually did try to load. Where Y ⊆ X. In the context of HLS, X is the set of files which we already tried to load with the file that we want to additionally load into our HLS session. Y is a subset of X, chosen based on the Cradle type (bios and stack cradles do not support loading a component with the context information), and GHC and cabal-install version. In particular, cabal cradles can make use of the full set of X for initialising a session if and only if the GHC and cabal-install version is recent enough, *and* the user explicitly requested a multi-repl session. By tracking which files we have actually tried to load, HLS can then try to reduce the number of files we put into sequential loading loop once batch load is failed for haskell/haskell-language-server#4445
I don't understand why it fails to build for ghc version before 9.10.1.
@fendor Can you help me on this ? I am puzzled.
give me
|
@soulomoon That was a tricky one! The ultimate conflict is that Then, the latest version of Adding to the
works for me. |
Thank you so much for your help @fendor. |
Follow up of and already include the changes in #4439
Refactored session loader to use architecture that having multiple readers and writer over the cache .
In bigger project, HLS usually loading up slow. One of the main obstacle is that we are loading ghc options for files in strict sequential order.
I have made an attemp to improve the situation by refactoring this loading into reader and writer over cache. This way, the long laoding file won't be blocking already loaded files, making hls more responsive and smooth.
Also it eliminates session loading for the same file from being multiply requested, by lining up in an ordered set in stead of a list.