clangd / vscode-clangd

Visual Studio Code extension for clangd
https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.vscode-clangd
MIT License
592 stars 97 forks source link

Use GitHub OAuth session to circumvent rate limiting when checking for updates #612

Open arijun opened 3 months ago

arijun commented 3 months ago

Because there are many users at my workplace, the company's IP gets rate-limited on GitHub API requests. That makes attempts to check for an update fail sometimes:

Failed to check for clangd update: Error: Can't fetch release: rate limit exceeded

I assume there is a proper way to deal with the greater issue at a company level, but it wouldn't help in other realistic instances, such as an internet cafe.

As a workaround to the whole issue, I think clangd could ask VS Code for access to the GitHub OAuth session (if available), and use the user's rate limit, rather than the one tied to the IP address. I am also happy to open an issue in node-clangd if needed.