-
Notifications
You must be signed in to change notification settings - Fork 13
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
Modernize #32
Modernize #32
Conversation
@HighCommander4 would you be willing to review this? |
My preference is for changes to a piece of code to be reviewed by the original author of that code, since that person has more familiarity with the code and the reasons it was doing things a certain way. In this case the original author of most of If you don't get a response in a few weeks, please feel free to flag me as a fallback. |
We're formatting TypeScript, not C/C++.
Thank you. In the meantime, could you hit the CI once more? I've replaced |
@HighCommander4 could you take a look at this please? It has been 2 weeks now. |
@HighCommander4 3 more weeks elapsed. Could you please give this a review? |
@tamird I'm sorry, I'm a volunteer contributor and I have limited free time to contribute to clangd. I get a higher volume of review requests than I'm able to keep up with. I will try to get to this, but I can't promise any particular time frame. |
Hello! Gentle nudge to have a look at this please! |
Apologies for the long turnaround time. I've had a look at the patch and the changes look reasonable to me, thank you for putting it together. I just triggered CI and there is a failure, do you understand the reason for it? |
This bumps the version to 0.1.19 because the type of `AbortController` is not backwards compatible. - Remove obsolete dependencies. - abort-controller; `AbortController` is stable since Node 15.4.0. - source-map-support; `--enable-source-maps` is supported since Node 12.12.0. - Update dependencies. - Enable strict mode in `tsconfig.json`. - Use `which(..., {nothrow: true})` and distinguish between binary-not-in-PATH and binary-access-failed. Log an error. - Check for presence of clangd binary in zip archive before extracting. - Use native promises APIs instead of `promisify`. - Assign severity to all logs (no more `console.log`).
I do now! I had update node-fetch to 3, which moves to ESM, but there's still a transitive dependency on node-fetch 2, so that's what was being resolved on my local machine. In CI though, the ESM version was being resolved, causing the ESM-related error we saw in CI. I've downgraded node-fetch to 2 (which is still supported). Things should be green now. |
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.
Thanks! LGTM.
I've merged the patch, and the CI workflow is green, however the "publish" workflow failed with:
|
That workflow is using a very old version of Node: node-clangd/.github/workflows/publish.yml Line 10 in 3f8afdb
Do you know why? |
I suspect that's the node version that was in common use at the time it was written and no one's updated it since. Would you like to send a PR to bump it to a more modern version? |
Thanks -- publishing was now successfully and the new version is up at https://www.npmjs.com/package/@clangd/install |
This bumps the version to 0.1.19 because the type of
AbortController
is not backwards compatible.
AbortController
is stable since Node 15.4.0.--enable-source-maps
is supported since Node12.12.0.
tsconfig.json
.which(..., {nothrow: true})
and distinguish betweenbinary-not-in-PATH and binary-access-failed. Log an error.
promisify
.console.log
).The debugging changes here are what motivated the work; I'm having some problems using vscode-clangd on a remote machine where the path to clangd is absolute, and the current implementation doesn't log anything actionable.