-
Notifications
You must be signed in to change notification settings - Fork 59
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
tower_lsp::ClientSocket
is (potentially) missing some functionality from lspower::MessageStream
#341
Comments
Thanks for opening this ticket! If you check the
Do you think you could elaborate on what you mean by this? In the code snippet above, I cannot see how |
Thanks for the reply. I've been fighting trying to solve this bug for quite a bit; I don't see that much functional difference. We have an exported |
@rockstar I'm not really sure why the approach you described worked before but doesn't work now, but I am wondering if the problem might go away if you could avoid using the custom In the case of a wasm target, I believe you should be able to use the web Streams API. There is a wasm-streams crate that provides adapters between the Streams API from I've created a quick minimal example that demonstrates this approach at tower-lsp-web-demo. |
The wasm-based project that I linked to above is now a fairly complete example which fully demonstrates how to use |
I'm not sure I agree that the bug is fixed. Sure, you've provided a workaround, but there's a disconnect where "what worked then doesn't work now" in an absolutely public api. The workaround is definitely something to explore, but this would require an re-architecture of a large portion of more than one application. As it stands, the migration from |
Reopening this ticket in order to ensure this gets addressed! I happened to notice this was closed a while ago, despite noticeable reservations that it was actually resolved. |
In influxdata/flux-lsp#427, the flux-lsp moved from
lspower
totower-lsp
because the merge had occurred. The reason we had usedlspower
in the first place is because we needed to be able export the lsp server via wasm. We have a wasm interface that looks like this (expressed in TypeScript):The idea here was that you could request things from the server via
send
, and any time that the server needed to initiate diagnostics, logs, notifications, etc. via theonMessage
handlers. The way we implemented this is something similar to this (you can read the full source in the PR/repo)Somewhere between the change from
lspower::MessageStream
totower_lsp::ClientSocket
, that message firing from the server is broken. While trying to dig into the issue, a lot of the introspection isn't possible becauseClientSocket
has a lot of private interfaces (which probably isn't related to the issue, but maybe something to consider for debugging going forward). What am I missing? How did the interface change so thatmessages.next().await
doesn't ever loop, no matter how many messages the server sends to the client.The text was updated successfully, but these errors were encountered: