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

Generate notifications for cyclic dependencies to the LS client #41756

Merged
merged 2 commits into from
Dec 18, 2023

Conversation

nipunayf
Copy link
Contributor

Purpose

When there is a cyclic dependency, the project API is unable to provide compilation. Thus, the LS cannot fulfill any requests such as completions and code actions. This impacts user experience negatively, as it appears unresponsive to the user. As a solution, a notification is displayed to the user when there are cyclic dependencies.

Fixes #41111

Approach

In the same sequence of sending diagnostics to the LS client, alert the user if there is a cyclic dependency diagnostic.

Samples

image

Remarks

Requires adding a test to check if the notification is produced after a did change once issue #41755 is resolved.

Check List

  • Read the Contributing Guide
  • Updated Change Log
  • Checked Tooling Support (#)
  • Added necessary tests
    • Unit Tests
    • Spec Conformance Tests
    • Integration Tests
    • Ballerina By Example Tests
  • Increased Test Coverage
  • Added necessary documentation
    • API documentation
    • Module documentation in Module.md files
    • Ballerina By Examples

@nipunayf nipunayf requested a review from mohanvive as a code owner November 22, 2023 17:14
@nipunayf nipunayf changed the title Generate a notification for cyclic dependencies to the LS client Generate notifications for cyclic dependencies to the LS client Nov 22, 2023
Copy link

codecov bot commented Nov 22, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (690c82e) 76.64% compared to head (4d232fd) 76.68%.
Report is 10 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #41756      +/-   ##
============================================
+ Coverage     76.64%   76.68%   +0.04%     
- Complexity    52856    52857       +1     
============================================
  Files          2881     2881              
  Lines        199262   199262              
  Branches      25906    25906              
============================================
+ Hits         152730   152811      +81     
+ Misses        38096    38008      -88     
- Partials       8436     8443       +7     

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

@nipunayf nipunayf added the Team/LanguageServer Language Server Implementation related issues. #Compiler label Nov 24, 2023
@KavinduZoysa KavinduZoysa merged commit cbf8b0a into ballerina-platform:master Dec 18, 2023
18 checks passed
@nipunayf nipunayf added this to the 2201.9.0 milestone Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team/LanguageServer Language Server Implementation related issues. #Compiler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Language Server unresponsive after including a cyclic dependency
3 participants