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

feat(language server): removed async code and switched to lsp_server #295

Merged
merged 2 commits into from
Jan 16, 2021

Conversation

baszalmstra
Copy link
Collaborator

Depends on #294

This PR removes all async code and switch to the use of the lsp_server crate instead of using our own.

@baszalmstra baszalmstra added pri: intermediate An issue resulting in non-critical functionality loss and no significant effect on usability type: refactor Refactor existing code labels Jan 11, 2021
@baszalmstra baszalmstra self-assigned this Jan 11, 2021
@codecov
Copy link

codecov bot commented Jan 12, 2021

Codecov Report

Merging #295 (7119fe0) into master (044ba56) will increase coverage by 2.00%.
The diff coverage is 58.41%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #295      +/-   ##
==========================================
+ Coverage   78.76%   80.77%   +2.00%     
==========================================
  Files         236      237       +1     
  Lines       13866    13864       -2     
==========================================
+ Hits        10922    11199     +277     
+ Misses       2944     2665     -279     
Impacted Files Coverage Δ
crates/mun_language_server/src/cancelation.rs 30.00% <0.00%> (+30.00%) ⬆️
crates/mun_language_server/src/config.rs 100.00% <ø> (ø)
crates/mun_language_server/src/conversion.rs 22.22% <ø> (+22.22%) ⬆️
crates/mun_language_server/tests/initialization.rs 100.00% <ø> (ø)
crates/mun_vfs/src/monitor.rs 66.12% <0.00%> (-8.42%) ⬇️
crates/mun_language_server/src/lib.rs 6.66% <12.50%> (+6.66%) ⬆️
crates/mun_language_server/src/state/workspace.rs 73.33% <16.66%> (ø)
crates/mun_project/src/project_manifest.rs 48.14% <33.33%> (ø)
...n_language_server/src/state/protocol/dispatcher.rs 34.54% <34.54%> (ø)
crates/mun_language_server/src/state/protocol.rs 38.57% <38.57%> (ø)
... and 20 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 044ba56...c7e0c7b. Read the comment docs.

@baszalmstra
Copy link
Collaborator Author

I also added some basic functionalities for testing the language server properly. This now also fixes the shortcomings in #293 where the language server was slower than the tests. With the new vfs we can now wait until the entire workspace is loaded before requesting information about it.

Copy link
Collaborator

@Wodann Wodann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall. Some minor change requests.

crates/mun_language_server/src/db.rs Outdated Show resolved Hide resolved
crates/mun_language_server/src/state.rs Outdated Show resolved Hide resolved
crates/mun_language_server/src/state.rs Outdated Show resolved Hide resolved
crates/mun_language_server/src/state.rs Outdated Show resolved Hide resolved
crates/mun_language_server/src/state.rs Outdated Show resolved Hide resolved
crates/mun_language_server/tests/support.rs Outdated Show resolved Hide resolved
crates/mun_language_server/tests/support.rs Outdated Show resolved Hide resolved
crates/mun_language_server/tests/support.rs Outdated Show resolved Hide resolved
crates/mun_language_server/tests/support.rs Outdated Show resolved Hide resolved
@baszalmstra baszalmstra merged commit b7a638e into mun-lang:master Jan 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pri: intermediate An issue resulting in non-critical functionality loss and no significant effect on usability type: refactor Refactor existing code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants