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

Add AST module caching support for LSP #5251

Merged
merged 29 commits into from
Nov 10, 2023
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
2429c3f
Add AST module caching support to the LSP.
tritao Aug 21, 2023
5315d5f
add ModuleId type
JoshuaBatty Oct 24, 2023
2180a78
garbage collection in lsp
JoshuaBatty Oct 31, 2023
9b83cfe
rebase master
JoshuaBatty Oct 31, 2023
8b3cfd5
rebase tritao:caching-modules-lsp work
JoshuaBatty Oct 31, 2023
b4b1881
clean up after rebase
JoshuaBatty Oct 31, 2023
9105414
tweak gc
JoshuaBatty Oct 31, 2023
289b419
store metrics
JoshuaBatty Nov 1, 2023
12cc076
add did change benchmark
JoshuaBatty Nov 1, 2023
e36ca8b
info_to_source_id
JoshuaBatty Nov 1, 2023
c5301cf
dont clean TypeInfo::Array during gc
JoshuaBatty Nov 2, 2023
20a525d
doc comments
JoshuaBatty Nov 2, 2023
6d80f9b
rebase master
JoshuaBatty Nov 2, 2023
6d3ae73
fmt
JoshuaBatty Nov 2, 2023
31d8002
fmt and clippy
JoshuaBatty Nov 2, 2023
6c2e0e1
add Cargo.lock
JoshuaBatty Nov 2, 2023
a865aba
clippy
JoshuaBatty Nov 2, 2023
d0dbf14
fix CI
JoshuaBatty Nov 2, 2023
c888acc
rebase master
JoshuaBatty Nov 3, 2023
892aade
remove unwrap
JoshuaBatty Nov 3, 2023
7445382
rebase master
JoshuaBatty Nov 7, 2023
15d6c79
feedback
JoshuaBatty Nov 7, 2023
44c1d53
clean up
JoshuaBatty Nov 7, 2023
febcd23
fix garbage collect call to not hold onto read lock
JoshuaBatty Nov 8, 2023
db414cd
only call garbage collection on every 10th keystroke
JoshuaBatty Nov 8, 2023
1edc954
clippy
JoshuaBatty Nov 8, 2023
610e35d
rebase
JoshuaBatty Nov 9, 2023
57994a9
remove stress test as its killing CI and we already stress test in th…
JoshuaBatty Nov 9, 2023
e103a15
add did_change_stress_test back
JoshuaBatty Nov 9, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions sway-lsp/tests/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,25 +112,6 @@ async fn did_cache_test() {
shutdown_and_exit(&mut service).await;
}

#[tokio::test]
JoshuaBatty marked this conversation as resolved.
Show resolved Hide resolved
async fn did_change_stress_test() {
let (mut service, _) = LspService::build(ServerState::new)
.custom_method("sway/metrics", ServerState::metrics)
.finish();
let uri = init_and_open(&mut service, doc_comments_dir().join("src/main.sw")).await;
let times = 20;
for _ in 0..times {
let _ = lsp::did_change_request(&mut service, &uri).await;
let metrics = lsp::metrics_request(&mut service, &uri).await;
for (path, metrics) in metrics {
if path.contains("sway-lib-core") || path.contains("sway-lib-std") {
assert!(metrics.reused_modules >= 1);
}
}
}
shutdown_and_exit(&mut service).await;
}

#[tokio::test]
async fn lsp_syncs_with_workspace_edits() {
let (mut service, _) = LspService::new(ServerState::new);
Expand Down
Loading