Skip to content

Conversation

@tamird
Copy link
Collaborator

@tamird tamird commented Aug 1, 2024

  • Remove obsolete dependencies.
    • abort-controller; AbortController is stable since Node 15.4.0.
  • Update dependencies.

Depends on clangd/node-clangd#32.

@tamird tamird force-pushed the modernize branch 4 times, most recently from 46f3ab7 to b14fc62 Compare February 10, 2025 21:29
@tamird
Copy link
Collaborator Author

tamird commented Feb 21, 2025

@HighCommander4 I've updated this now that @clangd/install 0.1.19 is released.

Copy link
Contributor

@HighCommander4 HighCommander4 left a comment

Choose a reason for hiding this comment

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

Thanks for the patch!

"icon": "icon.png",
"engines": {
"vscode": "^1.65.0"
"vscode": "^1.75.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you specify which change(s) in this patch necessitate this bump of the minimum required vscode version?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't remember exactly :(

package.json Outdated
"vscode:prepublish": "npm run prepare && npm run esbuild -- --minify --keep-names",
"compile": "npm run esbuild -- --sourcemap",
"check-ts": "tsc -noEmit -p ./",
"prepare": "tsc -p ./",
Copy link
Contributor

Choose a reason for hiding this comment

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

Why remove -noEmit? The emission of javascript is done by esbuild, so now we're doing it twice in prepublish.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Don't remember! Will revert.

}
getState(): vscodelc.FeatureState { return {kind: 'static'}; }
dispose() {}
clear() {}
Copy link
Contributor

Choose a reason for hiding this comment

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

Adding some context for my own reference / posterity: vscode-languageclient renamed the dispose() method of the StaticFeature interface to clear() in microsoft/vscode-languageserver-node#1298.

I couldn't find an explanation of why; if you happen to know, I'd be curious.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

package.json Outdated
"@clangd/install": "0.1.17",
"abort-controller": "^3.0.0",
"vscode-languageclient": "8.0.2"
"@clangd/install": "0.1.19",
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess we need to do a new node-clangd release to pick up clangd/node-clangd@d567269 first.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah, I guess so. I'll bump this to 0.1.20.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Er, let me know when you've released and I'll update.

Copy link
Contributor

Choose a reason for hiding this comment

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

});
return Promise.resolve(result); // Thenable to real promise.
}
localize(message: string, ...args: Array<string|number|boolean>): string {
Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, nice! I forgot about this. Looks like the person who contributed this support to node-clangd only cared about having it in coc-clangd 😆

This also partially answers my question about the vscode engine version: per the original discussion at #560, localization requires 1.73.

(You can add "Fixes #560" to the commit message.)

@tamird tamird force-pushed the modernize branch 3 times, most recently from 3d509f7 to 0344527 Compare March 25, 2025 23:16
@tamird
Copy link
Collaborator Author

tamird commented Mar 25, 2025

@HighCommander4 have a look at the CI failure. Seems the great minds behind unzipper decided to add a dynamic require in ZJONSSON/node-unzipper#325 for the AWS SDK for some reason, which is inherently incompatible with esbuild.

@tamird tamird force-pushed the modernize branch 2 times, most recently from 15798a0 to f540978 Compare March 25, 2025 23:25
@tamird
Copy link
Collaborator Author

tamird commented Mar 25, 2025

Ah, I was able to mark it external and that seems to work.

package.json Outdated
"@types/mocha": "^10.0.7",
"@types/node": "^22.0.2",
"@types/sinon": "^17.0.3",
"@types/vscode": "1.97.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems wrong. I think this needs to match engines.vscode, because when I try to run npm run package locally, I get:

ERROR @types/vscode 1.97.0 greater than engines.vscode ^1.75.0. Either upgrade engines.vscode or use an older @types/vscode version

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Matched the engine version.

tamird added 2 commits March 26, 2025 06:20
- Remove obsolete dependencies.
  - abort-controller; `AbortController` is stable since Node 15.4.0.
- Update dependencies.
  - @clangd/install; required as `AbortController` is part of the API
    surface so be the same type.

Fixes clangd#560.
Copy link
Contributor

@HighCommander4 HighCommander4 left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM! CI is green and a local build is successful as well -- I'll go ahead and merge.

@HighCommander4 HighCommander4 merged commit 16efcdc into clangd:master Mar 27, 2025
1 check passed
@tamird tamird deleted the modernize branch March 27, 2025 06:02
"main": "./out/bundle",
"scripts": {
"esbuild": "esbuild ./src/extension.ts --bundle --outfile=out/bundle.js --external:vscode --format=cjs --platform=node",
"esbuild": "esbuild ./src/extension.ts --bundle --outfile=out/bundle.js --external:@aws-sdk/client-s3 --external:vscode --format=cjs --platform=node",
Copy link
Member

Choose a reason for hiding this comment

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

why do we need aws-sdk dependency here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I believe this is saying that we don't bundle this package. I don't remember why I had to add this flag. Try removing it and see?

Copy link
Member

Choose a reason for hiding this comment

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

sent out #815

@tamird tamird mentioned this pull request Jun 16, 2025
somedude72 pushed a commit to somedude72/vscode-clangd-fork that referenced this pull request Jun 18, 2025
* Modernize

- Remove obsolete dependencies.
  - abort-controller; `AbortController` is stable since Node 15.4.0.
- Update dependencies.
  - @clangd/install; required as `AbortController` is part of the API
    surface so be the same type.

Fixes clangd#560.

* Remove redundant activation events

These are not required since VSCode 1.74.0. See
https://code.visualstudio.com/api/references/activation-events#onCommand.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants