Skip to content

Fix cancel support with CompletableFuture compose#679

Merged
datho7561 merged 1 commit intoredhat-developer:masterfrom
angelozerr:cancelChecker-compose
Jul 28, 2022
Merged

Fix cancel support with CompletableFuture compose#679
datho7561 merged 1 commit intoredhat-developer:masterfrom
angelozerr:cancelChecker-compose

Conversation

@angelozerr
Copy link
Copy Markdown
Contributor

Fix cancel support with CompletableFuture compose

Signed-off-by: azerr azerr@redhat.com

Signed-off-by: azerr <azerr@redhat.com>
@angelozerr
Copy link
Copy Markdown
Contributor Author

I noticed that all feature (completion, codeAction, hover, etc) which uses

public <R> CompletableFuture<R> getTemplateCompose(TextDocumentIdentifier documentIdentifier,
are not canceled when client cancel the request. I mean when

cancelChecker.checkCanceled()

is called,it doesn't throw a CancellationException.

I noticed that with code action which can take some time sometimes, so it is hard to reproduce easily. But you can reproduce easily if you:

Without my PR, you will notice that the first call of cancelChecker.checkCanceled() will not throw a CancellationException.

@angelozerr angelozerr requested a review from datho7561 July 28, 2022 08:00
@angelozerr angelozerr force-pushed the cancelChecker-compose branch from d85d8db to 19c0694 Compare July 28, 2022 09:20
Copy link
Copy Markdown
Contributor

@datho7561 datho7561 left a comment

Choose a reason for hiding this comment

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

Works for me. Good catch! We should probably also copy this over to other language servers.

@datho7561 datho7561 added the bug Something isn't working label Jul 28, 2022
@datho7561 datho7561 added this to the 0.13.0 milestone Jul 28, 2022
@datho7561 datho7561 merged commit 69c93ad into redhat-developer:master Jul 28, 2022
datho7561 added a commit to datho7561/lsp4mp that referenced this pull request Jul 29, 2022
This method makes it easier to implement go to definition in properties
files.
Includes the recent bug fix to the method (see redhat-developer/quarkus-ls#679)

Signed-off-by: David Thompson <davthomp@redhat.com>
datho7561 added a commit to datho7561/lsp4mp that referenced this pull request Jul 29, 2022
This method makes it easier to implement go to definition in properties
files.
Includes the recent bug fix to the method (see redhat-developer/quarkus-ls#679)

Closes eclipse-lsp4mp#257

Signed-off-by: David Thompson <davthomp@redhat.com>
datho7561 added a commit to datho7561/lsp4mp that referenced this pull request Jul 29, 2022
This method makes it easier to implement go to definition in properties
files.
Includes the recent bug fix to the method (see redhat-developer/quarkus-ls#679)

Closes eclipse-lsp4mp#257

Signed-off-by: David Thompson <davthomp@redhat.com>
angelozerr pushed a commit to eclipse-lsp4mp/lsp4mp that referenced this pull request Aug 16, 2022
This method makes it easier to implement go to definition in properties
files.
Includes the recent bug fix to the method (see redhat-developer/quarkus-ls#679)

Closes #257

Signed-off-by: David Thompson <davthomp@redhat.com>
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.

2 participants