Revamp RPC; Make devtools build safe #19
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ton of changes here. This fixes #17 and was spawned from the fact that the RCP layer needs the flexibility to return different types in different situations. I replaced the original
WebViewEvent
/ClientEvent
language with a more familiarRequest
/Response
model... sort of.There's the general idea of a
Message
. That's something that's sent from the webview to the client. AMessage
is either aNotification
(which is something client didn't ask for, but is open to) or aResponse
(which is in direct response to a client's request). ANotification
represents a global client state change... started, closed, etc. Responses are for specific requests so I've added an ID on both the request and response side that way it's easy to map which response was intended for which request. That's necessary because all these messages are multiplexed over one channel (stdio).It's really feeling like it's coming together! The nice thing is that I really didn't have to make any updates to my send/receive threads in the webview.