-
Notifications
You must be signed in to change notification settings - Fork 853
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
Update Typescript Language Server to 4.4.3 #7732
Update Typescript Language Server to 4.4.3 #7732
Conversation
matthiasblaesing
commented
Sep 4, 2024
- Update typescript to 5.5.4 (implies minimal node version 10)
- Update typescript-language-server to 5.5.4
- Add PublishDiagnosticsCapabilities to declared capabilities
- Added handling of SematicHighlighting for tokenTypeId -1: Assume this means "only consider modifier"
- Document update procedure
- Add @todo for handling mapping mimetype -> languageId
bebc2eb
to
8cb00f8
Compare
@Chris2011 if I remember correctly, you are a user of the typescript support. Could you give the testbuild from this a spin? |
Sure, will do today and will let you know. Thx :) |
I created a new ts file and when I have this piece of code:
when call code completion after the end of the Record token and when I remove charaacter by character from the end of the Record token, I got this exception:
|
Another one for this piece of code const t = (obj) => {
}
t({
name: 2
}) When I remove character by character from the end of the file until beginning of name, I got this exception:
|
@Chris2011 thanks for the test. Could reproduce the second problem, but failed for the first one. I asked google for similar problems and it seems the typescript-language-server is regressing. Similar reports can be found for Webstorm/IntelliJ. There were indications, that typescript 5.5.X might be the problem, but downgrading to 5.4.X did not help. I have to see whether manually patching the current lsp integration to be runnable with up-to-date node versions or whether there is a "known-good" set of typescript and node. |
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.
Please see the inline comment on a license text.
@@ -1,6 +1,6 @@ | |||
Name: typescript | |||
Description: TypeScript is a language for application scale JavaScript development | |||
Version: 4.1.4 | |||
Version: 5.5.4 |
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.
Sorry, but this seems highly suspicious to me. The typescript-5.5.4.zip
file contains typescript/ThirdPartyNoticeText.txt
, and I don't see the content of the file here. Is there a reason to believe the typescript/ThirdPartyNoticeText.txt
does not apply 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.
Valid point. I admit, I did not check, on the other hand, the relevant file would be NOTICE, but so be it.
@matthiasblaesing for the first problem, you need to open the code completion first and delete char by char. For the second error, in the first line you can see this: TypeScript Server Error (5.2.2) dunno whether this is the TS version or not. But I guess so. Lemme know what I can check more |
I read the news, that TypeScript 5.6 was released. I dunno whether this will fix the bug or not, but is it maybe possible to handle TS as maven too? So we bundle typescript hard to NetBeans and everytime an update was released we need to update it. Afaik maven is bundled with NetBeans, but you can choose your own version of it. Similar to bower, grunt, gulp, node, karma etc. It is just an idea but could be part of a different PR. |
8cb00f8
to
110c7db
Compare
@lahodaj I updated the Could you please both have another look? |
@matthiasblaesing FYI will do it today. |
@matthiasblaesing So it seems, that the second issue is gone, the first still exists. I created a screen capture, hope it helps. It happens, when you first open the code completion, than delete a character or sometimes a whole word. Aufzeichnung.2024-09-18.211905.mp4But it also seems, for the first view, that it is not affecting the editor as far as I can see. |
@Chris2011 thank you. Indeed I was able to reproduce. The issue is not as easily fixable as 110c7db and I also think the server should be able to handle delayed resolve of completion and not raise an exception. As I can't prevent it, I only reduced log level to INFO, so problem is logged, but user can continue working. For me this fixes the problem. Can you confirm? |
@matthiasblaesing I can confirm that I can't see any exception anymore. Thx :) |
@Chris2011 thanks for taking the time to test, reproduce and recheck! |
- Update typescript to 5.6.2 (implies minimal node version 10) - Update typescript-language-server to 4.4.3 - Add PublishDiagnosticsCapabilities to declared capabilities - Added handling of SematicHighlighting for tokenTypeId -1: Assume this means "only consider modifier" - Document update procedure - Add @todo for handling mapping mimetype -> languageId
…tic beyond document, reduce log level) - Log errors in DiagnosticFixList#getFixes by using LOG#log with level INFO, instead of Exceptions#printStackTrace which logs on level SEVERE. This reduces the level so much, that is not raised as a user visible (exception error marker in status line) message anymore. - it could happen, that the fixlist for a position outside the document range is queried, when characters at the end of a document were deleted. This is no prevented.
…ser visible error bubble
2d9b5d0
to
16ce7f1
Compare
I cleaned up the history. @jlahoda you requested changes. Could you please check if they were addressed? I'd like to get this in. |
I intent to merge this next saturday. Typescript LSP fails to run on windows with node LTS and that is fixed by this. The change request was addressed, I ran with this the last weeks, so I think this is good to be merged. If anyone wants to object, please do so now. |