Improve hls runtime keep async only databse keys#26
Draft
soulomoon wants to merge 136 commits into
Draft
Conversation
… them to improve performance fix haskell#4381
…p error loading and cradle files
Renames getOptions to getOptionsWorker for clarity Removes redundant getOptionsLoop function Ensures session loading is called under the same `Action` context
There was a problem hiding this comment.
Pull Request Overview
This PR makes significant changes to HLS runtime to only keep async operations for database keys that are not affected by dirty keys. The changes implement a sophisticated asynchronous task management system using worker queues and database state preservation to improve performance and reliability.
Key changes include:
- Refactored the shake database to use a worker queue-based architecture with async task management
- Added computation to preserve only unaffected async operations when restarting builds
- Improved VFS handling with additional language kind metadata
Reviewed Changes
Copilot reviewed 40 out of 41 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/flaky-test-patterns.txt | Added pattern file for identifying flaky test cases |
| scripts/flaky-test-loop.sh | New bash script for looping flaky tests with enhanced configuration and logging |
| scripts/eventlog_dump.py | Python utility for dumping GHC RTS eventlogs with filtering capabilities |
| plugins/hls-signature-help-plugin/test/Main.hs | Updated import to hide conflicting getSignatureHelp function |
| plugins/hls-semantic-tokens-plugin/test/SemanticTokensTest.hs | Updated VirtualFile constructor call with language kind parameter |
| plugins/hls-semantic-tokens-plugin/src/Ide/Plugin/SemanticTokens.hs | Added comment explaining semantic tokens functionality |
| plugins/hls-class-plugin/src/Ide/Plugin/Class/Types.hs | Fixed GHC version compatibility for tidyOpenType function |
| hls-test-utils/src/Test/Hls.hs | Added logStdErr configuration for test sessions |
| hls-test-utils/src/Development/IDE/Test.hs | Commented out garbageCollectDirtyKeys function |
| hls-graph/test/DatabaseSpec.hs | Refactored tests to use new itInThread helper and updated database initialization |
| hls-graph/test/ActionSpec.hs | Major refactor to use worker thread architecture for database operations |
| hls-graph/src/Development/IDE/WorkerThread.hs | New worker thread management module with task queues and lifetime control |
| hls-graph/src/Development/IDE/Graph/Internal/Types.hs | Extensive changes to database types including async preservation and runtime reverse dependencies |
| hls-graph/src/Development/IDE/Graph/Internal/Key.hs | Added Pretty instances and unionKyeSet function |
| hls-graph/src/Development/IDE/Graph/Internal/Database.hs | Major refactor to async-based database operations with preservation logic |
| hls-graph/src/Development/IDE/Graph/Internal/Action.hs | Updated to support database-based async operations |
| hls-graph/src/Development/IDE/Graph/Database.hs | Added new database management functions for shutdown and preservation |
| hls-graph/src/Development/IDE/Graph.hs | Removed actionFork from exports |
| hls-graph/hls-graph.cabal | Added new dependencies for worker thread functionality |
| ghcide/src/Development/IDE/Types/HscEnvEq.hs | Removed unused imports and simplified file cache handling |
| ghcide/src/Development/IDE/Types/Action.hs | Added isActionQueueEmpty function |
| ghcide/src/Development/IDE/Plugin/Test.hs | Updated to use stateValues instead of state |
| ghcide/src/Development/IDE/Plugin/Completions/Logic.hs | Updated VirtualFile pattern matching |
| ghcide/src/Development/IDE/Main.hs | Updated worker thread initialization |
| ghcide/src/Development/IDE/LSP/LanguageServer.hs | Major refactor of LSP server initialization with proper shutdown handling |
| ghcide/src/Development/IDE/Core/Shake.hs | Extensive changes to implement async-preserving restart logic |
| ghcide/src/Development/IDE/Core/Rules.hs | Updated dependency logging and VFS handling |
| ghcide/src/Development/IDE/Core/FileStore.hs | Updated for new task queue and VFS handling |
| ghcide/src/Development/IDE/Core/Compile.hs | Updated indexing to use task queues |
| ghcide/session-loader/Development/IDE/Session/OrderedSet.hs | New ordered set implementation using STM |
| ghcide/session-loader/Development/IDE/Session/Ghc.hs | New GHC session management module |
| ghcide/session-loader/Development/IDE/Session/Dependency.hs | New dependency tracking module |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
54ec50a to
f5a540a
Compare
- Refactor test workflow to simplify test commands. - Introduce TestReporting style for progress reporting in IDE options.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.