-
-
Notifications
You must be signed in to change notification settings - Fork 111
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
RPC example code appears incorrect #203
Comments
Can you paste your |
module test go 1.17 require ( replace ( |
Thanks! Ok, two more quick things:
Failing that, I'll take a deeper look but I probably won't have time until the weekend. ( |
Thanks for your help Louis. Answers inline below: On 12/15/21 12:25, Louis Thibault wrote:
It does:
Trying on a new VM (no capnpc-go), I get an error:
However, it does install something:
Perhaps the install is not working as expected?
|
GO111MODULE=off go get -u capnproto.org/go/capnp/v3/
You actually want:
```
GO111MODULE=off go get -u capnproto.org/go/capnp/v3/go-capnpc
```
(note the last part of the path).
I suspect that probably won't fix it though, since the paths in the
generated code looked right. I'll see if I can find some time to have a
closer look soonish.
…-Ian
|
Quoting Ian Denhardt (2021-12-15 18:18:42)
You actually want:
```
GO111MODULE=off go get -u capnproto.org/go/capnp/v3/go-capnpc
```
Sorry, should be capnpc-go at the end.
|
Thanks - but yeah, that doesn't help ;) |
It might be worth dropping into the Matrix support channel, as I suspect there will be a bit of trial an error here. Ian and I are on US Eastern time.
https://matrix.to/#/!pLcnVUHHRZrUPscloW:matrix.org?via=matrix.org <https://matrix.to/#/!pLcnVUHHRZrUPscloW:matrix.org?via=matrix.org>
… On Dec 16, 2021, at 10:22 AM, John Kemp ***@***.***> wrote:
Thanks - but yeah, that doesn't help ;)
—
Reply to this email directly, view it on GitHub <#203 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ACIDYEORLD5NKKKCSGLTXNTURH7Z5ANCNFSM5KCONUJQ>.
You are receiving this because you commented.
|
Finally found time to sit down and try this out. What does your (building) server code look like? I noticed it looks like in addition to erroneously reusing variable names in the client, the server code in https://github.com/capnproto/go-capnproto2/wiki/Getting-Started#remote-calls-using-interfaces is using the v2 api, so that doesn't build for me either. (I suspect in the case of the server we went through and did a find & replace for the import path at some point, but neglected to actually update the example for v3). |
My server and client were cut and pasted from your "hashes" example. Since I was having problems writing my own server, I decided to try building your example, and making it into a full program. So I made a go module, fixed the import paths etc. and then tried to build it... hence this issue :)
OK. You can see my full example so far at https://github.com/frumioj/go-capnproto2/tree/main/example/hashes If there are any hints about where I could get started to change this to work, please let me know. |
Not sure I have time for real-time comms at the moment, but thanks for that. Will try to appear there... |
Fixed via #204 |
When I copy and paste the RPC client example code:
I get lots of errors, since the futures return different types. I tried assigning to different variables which makes the program compile, but it doesn't return a result when I do that.
The text was updated successfully, but these errors were encountered: