Skip to content

fixes threading issue with context loading#132

Merged
brynrhodes merged 1 commit intomasterfrom
bugfix/ig-context-race-condition
Apr 6, 2026
Merged

fixes threading issue with context loading#132
brynrhodes merged 1 commit intomasterfrom
bugfix/ig-context-race-condition

Conversation

@raleigh-g-thompson
Copy link
Copy Markdown
Contributor

@raleigh-g-thompson raleigh-g-thompson commented Apr 3, 2026

fixes #130

When calling getContext, from the vscode extension, the LSP4J creates multiple threads that call getContext(). If the resource isn't in the cache the IgContext goes searching. This is a big issue with the hover provider, it can causes multiple threads to go out and search for the same files, when the cache is cold. If IgContext can't find the file locally, or in .fhir/packages then it attempts to download from the npm registry. Once the cache is loaded, not an issue but when starting up it is a problem.

@raleigh-g-thompson raleigh-g-thompson self-assigned this Apr 3, 2026
@raleigh-g-thompson raleigh-g-thompson added the bug Something isn't working label Apr 3, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 3, 2026

Formatting check succeeded!

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 3, 2026

Coverage Report

Overall Project 80.27% 🍏
Files changed 100% 🍏

Module Coverage
CQL Language Server - Server Component 79.7% 🍏
Files
Module File Coverage
CQL Language Server - Server Component IgContextManager.kt 53.31% 🍏

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.98%. Comparing base (5475d4f) to head (c7dd30a).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #132      +/-   ##
============================================
- Coverage     75.25%   73.98%   -1.28%     
+ Complexity      365      355      -10     
============================================
  Files            44       44              
  Lines          1160     1153       -7     
  Branches        171      167       -4     
============================================
- Hits            873      853      -20     
- Misses          189      210      +21     
+ Partials         98       90       -8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@raleigh-g-thompson raleigh-g-thompson marked this pull request as ready for review April 3, 2026 14:28
@brynrhodes brynrhodes merged commit 30a506b into master Apr 6, 2026
11 of 12 checks passed
@brynrhodes brynrhodes deleted the bugfix/ig-context-race-condition branch April 6, 2026 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Language server can make redundant network requests when opening a project for the first time

2 participants