-
Notifications
You must be signed in to change notification settings - Fork 495
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
LS: Cancellation support #6263
LS: Cancellation support #6263
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @Arcticae, @mkaput, and @orizi)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Arcticae, @Draggu, and @mkaput)
crates/cairo-lang-language-server/src/lib.rs
line 152 at r1 (raw file):
let (service, socket) = Backend::build_service(tricks); Server::new(stdin, stdout, socket).concurrency_level(100).serve(service).await;
Suggestion:
Server::new(stdin, stdout, socket).concurrency_level(SOME_CONSTANT_WITH_A_GOOD_NAME).serve(service).await;
a6a7ad2
to
f774b6c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 6 unresolved discussions (waiting on @Arcticae and @Draggu)
Suggestion:
- f774b6c: LS: Cancellation support
fix #6131
commit-id:c6b3800a
crates/cairo-lang-language-server/src/lib.rs
line 120 at r2 (raw file):
/// [lib]: crate#running-with-customizations #[non_exhaustive] #[derive(Default, Clone)]
We should avoid changing Tricks
at all costs. The whole purpose of this thing is to be super stable, so that we won't bother downstream users.
crates/cairo-lang-language-server/src/lib.rs
line 139 at r2 (raw file):
/// Number of LSP requests that can be processed concurently. /// Higher number than default 4 because cancellation will skip not needed ones, and latest ones can /// be processed.
this sentence is hard to parse: what are ones
in this context? where does the default come from? what do you mean be needed
?
crates/cairo-lang-language-server/src/lib.rs
line 331 at r2 (raw file):
catch_unwind(AssertUnwindSafe(|| f(&db))).map_err(|err| { if err.is::<Cancelled>() { info!("LSP worker thread was cancelled");
not sure we need info
level for this. this is probably going to be noisy in long-term, and this is not actionable to the user and self-fixing, isn't it?
Suggestion:
debug!("LSP worker thread was cancelled");
crates/cairo-lang-language-server/src/lib.rs
line 514 at r2 (raw file):
.with_db({ let open_files = open_files.clone(); let tricks = self.tricks.clone();
why not just construct new_db
outside with_db
and move it into it? this way you'd avoid needing to clone tricks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @Arcticae and @Draggu)
crates/cairo-lang-language-server/src/lib.rs
line 120 at r2 (raw file):
Previously, mkaput (Marek Kaput) wrote…
We should avoid changing
Tricks
at all costs. The whole purpose of this thing is to be super stable, so that we won't bother downstream users.
discussed this offline. let's add this Clone
due to all the issues lack of it brings in this PR
f774b6c
to
9abb5b4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 1 files reviewed, 4 unresolved discussions (waiting on @Arcticae, @mkaput, and @orizi)
-- commits
line 4 at r2:
Done.
crates/cairo-lang-language-server/src/lib.rs
line 152 at r1 (raw file):
let (service, socket) = Backend::build_service(tricks); Server::new(stdin, stdout, socket).concurrency_level(100).serve(service).await;
Done.
crates/cairo-lang-language-server/src/lib.rs
line 139 at r2 (raw file):
Previously, mkaput (Marek Kaput) wrote…
this sentence is hard to parse: what are
ones
in this context? where does the default come from? what do you mean beneeded
?
Done.
crates/cairo-lang-language-server/src/lib.rs
line 331 at r2 (raw file):
Previously, mkaput (Marek Kaput) wrote…
not sure we need
info
level for this. this is probably going to be noisy in long-term, and this is not actionable to the user and self-fixing, isn't it?
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Arcticae and @orizi)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @orizi)
9abb5b4
to
c61cce6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r4, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @orizi)
fix #6131 commit-id:c6b3800a
c61cce6
to
036e194
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r5, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @orizi)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @Draggu)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @Draggu)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r5, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @Draggu)
fix #6131
This change is