Skip to content

Try canceling TS Server geterr requests when document changes #49251

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

Closed
mjbvz opened this issue May 5, 2018 · 3 comments
Closed

Try canceling TS Server geterr requests when document changes #49251

mjbvz opened this issue May 5, 2018 · 3 comments
Assignees
Labels
verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@mjbvz
Copy link
Collaborator

mjbvz commented May 5, 2018

From microsoft/TypeScript#19458 (comment)

TS would like us to try cancelling the TS Server geterr requests if the document changes before a response is returned

@mjbvz mjbvz added this to the May 2018 milestone May 5, 2018
@mjbvz mjbvz self-assigned this May 5, 2018
@mjbvz mjbvz closed this as completed in 558635a May 7, 2018
@mjbvz mjbvz added the verification-needed Verification of issue is requested label May 25, 2018
@mjbvz
Copy link
Collaborator Author

mjbvz commented May 25, 2018

See microsoft/TypeScript#19458 for verification steps. Basically, in a file that requires sass.js, confirm that you can get completions in a timely manner. Previously completions blocked until geterr returned, which could take several seconds

@isidorn isidorn added the verified Verification succeeded label May 29, 2018
@isidorn
Copy link
Contributor

isidorn commented May 29, 2018

I actually still get this with the latest insiders
I am using vscode ts version 2.9.1
slow

@isidorn isidorn reopened this May 29, 2018
@isidorn isidorn added verification-found Issue verification failed and removed verified Verification succeeded labels May 29, 2018
@mjbvz
Copy link
Collaborator Author

mjbvz commented May 31, 2018

Yeah, the full fix for this looks like it is move to TS 3.0

To verify the specific fix on our side:

  • Set "typescript.tsserver.trace": "verbose"
  • Reload vs code
  • Open the file with the sass.js require and quickly type something to trigger completions
  • Open the output panel and go to typescript section
  • Look for the getErr requests and note the request number (55 here):
[Trace  - 11:14:40 PM] Sending request: geterr (55). Response expected: yes. Current queue length: 0
Arguments: {
    "delay": 0,
    "files": [
        "/Users/matb/projects/san/sub/foo.js"
    ]
}
  • Look for the geterr request being cancelled when a change request is sent if it has not completed yet:
[Trace  - 11:14:40 PM] Sending request: change (56). Response expected: no. Current queue length: 0
Arguments: {
    "file": "/Users/matb/projects/san/sub/foo.js",
    "line": 3,
    "offset": 4,
    "endLine": 3,
    "endOffset": 4,
    "insertString": "a"
}
[Trace  - 11:14:40 PM] TypeScript Service: trying to cancel ongoing request with sequence number 55

@mjbvz mjbvz closed this as completed May 31, 2018
@mjbvz mjbvz removed the verification-found Issue verification failed label May 31, 2018
@roblourens roblourens added the verified Verification succeeded label Jun 1, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Jul 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants