Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Cross-file Typescript support in vscode-web #169311
Cross-file Typescript support in vscode-web #169311
Changes from 39 commits
bd9e555
052c6a8
ea42f84
0102053
f79188b
bdee414
4f0ece1
6f6c491
21eac11
2afbf36
80d2729
9d88cc9
7db6575
f67a08e
092c565
bd93d21
293b6e3
124acc8
40a2626
060d671
fac861b
65b8c46
d8f495b
7a1eb58
4ee41e2
72a972c
6509c48
2c32ab4
6c56e69
673869c
741e3a8
a24ae56
6f1415e
4b19dee
c17bf33
6fade7c
68047c7
9ffdb8e
629804c
0f0e155
675401e
41be877
8639b4b
0138958
a8774f3
52506b6
6f1966f
a07f98c
0288f0f
1c52093
f48e065
f5dade7
cde1ffc
8f130c0
4952d5d
8a72e7d
98ae48e
9069220
6057abc
e36a6db
0b2a13c
aad4f87
6a1b2c3
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Can you put this logic in
this.tryCancelRequets
instead?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.
It fits quite nicely there, but I'm not sure it will work: Cancellation.addData needs to add information to a request that will be posted to tsserver's webworker. If there is no pending request the code will have to wait until there is one.
For now I put in
peek
method on RequestQueue and a busy wait in tryCancelRequests, but it seems wrong. Could be better than what I had before, though.@jrieken can you provide advice here?
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.
The latest commit provides the current
request
to tryCancelRequest so that . However, it might actually be worse, since I believe thatrequest
will have been sent to tsserver already, and thatCancellation.addData
won't actually transmit the request for cancellation. (again, @jrieken will know how this should work, I think)I haven't worked out how to test this, so advice on that would be helpful as well.
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.
Cancellation.addData
must be added before sending the request and the function that it returns need to be invoked in case of cancellation. I have some local changes on top of this PR that I am attempting to push. There was also an issue on the retrieving end. For that I for now inlines the implementation with a fixThere 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.
8639b4b it is. It would be nicer if this could be done with
serverProcess.browser.ts
but I couldn't find a neat/minimal way to doing thatThere 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.
We may be able to reuse the markdown watcher manager for this:
vscode/extensions/markdown-language-features/src/client/fileWatchingManager.ts
Line 18 in ab1a31a