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
fix: support callv and proxies for lsp.js #10172
Conversation
Previously we added support for proxies in #9994. But it broke LSP.js networking as we were forced to use callv to support proxies as a workaround, and callv isn't supported in cohttp-jsoo!. So we have to patch callv and patch our XHR js library to enable proxies for this stuff. I'm going to try and make a bunch of PRs to cohttp and ca-certs etc to fix this upstream, but for now we have this fix
PR checklist:
If you're unsure about any of this, please see: |
📸 The pytest shapshots changed in your PR.
|
📸 The pytest shapshots changed in your PR.
|
📸 The pytest shapshots changed in your PR.
|
📸 The pytest shapshots changed in your PR.
|
let callv ?ctx (uri : Uri.t) stream = | ||
(* Differs from request uri if HTTP(S)_PROXY is set. But we handle this in | ||
the node_shared XHR*) | ||
ignore uri; |
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.
ignore uri; |
Dead 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.
Seems mostly good. I think we would benefit from some more documentation.
📸 The pytest shapshots changed in your PR.
|
📸 The pytest shapshots changed in your PR.
|
📸 The pytest shapshots changed in your PR.
|
semgrep-compare-github-uwue0 resultsRan benchmark on 38 repositories The number of findings differs for 3 repos Whole benchmark is 6.5% faster (a bit of noise is expected) Relative speed improvement is 1.01 on average
Relative memory improvement is 1.00 on average
|
📸 The pytest shapshots changed in your PR.
|
pro checks failing seem unrelated |
Previously we added support for proxies in #9994. But it broke LSP.js networking as we were forced to use callv to support proxies as a workaround, and callv isn't supported in cohttp-jsoo!. So we have to patch callv and patch our XHR js library to enable proxies for this stuff. I'm going to try and make a bunch of PRs to cohttp and ca-certs etc to fix this upstream, but for now we have this fix.
Test plan
For testing js w/out proxy
make build-semgrep-jsoo-debug make -C js build make -C js test
For testing JS + proxy
TODO add MIT license to VSCode